Skip to content

ci(android): Pass event ids from the device log to the verify-pr test fetch job - #7141

Merged
antonis merged 1 commit into
mainfrom
ci/verify-pr-spike-event-ids
Nov 30, 2026
Merged

antonis merged 1 commit into
mainfrom
ci/verify-pr-spike-event-ids

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

verify-pr-spike.yml and .github/verify-pr-spike/spike.py stop searching Sentry for a run's events. The build job now reads the event ids from the device log, and the fetch job reads each event by id.

Build job (spike.py)

  • After each side's flow, run collects the ids from the sample's 'Event beforeSend:', '<32 hex>' log lines, in order and without duplicates. They go into event_ids in that side's entry in results.json. The step fails if a side has none.
  • A new step, Pass the event ids to the fetch job (spike.py outputs), writes the job outputs without_event_ids and with_event_ids, one comma-separated list per side.

Fetch job

  • The search is removed, along with SEARCH_ENDPOINT, SEARCH_PERIOD, urllib.parse, and the ready retry condition that only the search used.
  • It takes each side's ids from the build job. Before any request, it checks each id against [0-9a-f]{32} and accepts at most 5 per side. More than 5, none, or a malformed id fails the job before any request is made, and the value is never printed.
  • Each event is still read through /events/<id>/json/ and /events/<id>/. The expected run ids are still built in the job from github.run_id, and an event whose verify.run_id differs is refused. The output keeps exceptions (frames), tags, and errors, and drops search_endpoint.

Fetch-only mode

  • There are three new optional inputs: fetch_run_id (digits), and fetch_without_ids and fetch_with_ids (comma-separated 32-hex ids).
  • When fetch_run_id is set, the build job is skipped and only the fetch job runs, with those ids. The expected run ids are gh<fetch_run_id>-without and -with. The fetch job checks these inputs itself before any request.
  • ref, pr, base_sha, and flow are now required: false, so this mode can leave them out. In a normal run, the build job's Validate the inputs step still rejects an empty value for each of them.
  • fetch_without_ids and fetch_with_ids are ignored when fetch_run_id is empty.

Nothing else changes: triggers, permissions, the token guard, the checkouts, the build and run steps, and the artifacts.

💡 Motivation and Context

SENTRY_AUTH_TOKEN is refused on the search endpoint, /organizations/sentry-sdks/events/ (HTTP 403 on both sides in run 46398841347). The single-event endpoints have accepted it. This is the fallback named in #7139.

The ids come from the build job, which runs PR code, so the fetch job checks them against a fixed pattern and still refuses any event from another run. Fetch-only mode lets a finished run's events be read again without rebuilding.

#skip-changelog

💚 How did you test it?

📝 Checklist

  • I added tests to verify changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • All tests passing.
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec.
  • No breaking changes.

🔮 Next steps

  • Open question: a side with more than 5 ids fails the fetch job instead of reading the first 5.
  • Open question: the fetch job keeps its 20-minute timeout. With 5 ids per side, a 404 that never clears on every request (180 s each) would take longer than that.

via Antonis Lilis.

--

View Session [Sentry]

… fetch job

Co-Authored-By: Antonis Lilis <antonis.lilis@sentry.io>
@github-actions

Copy link
Copy Markdown
Contributor

Semver Impact of This PR

⚪ None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


This PR will not appear in the changelog.


🤖 This preview updates automatically when you update the PR.

@github-actions

Copy link
Copy Markdown
Contributor
Fails
🚫 Pull request is not ready for merge, please add the "ready-to-merge" label to the pull request

Generated by 🚫 dangerJS against b452f44

@antonis
antonis marked this pull request as ready for review November 30, 2026 11:10
@antonis
antonis enabled auto-merge (squash) November 30, 2026 11:10
@antonis
antonis merged commit c2375fa into main Nov 30, 2026
49 of 65 checks passed
@antonis
antonis deleted the ci/verify-pr-spike-event-ids branch November 30, 2026 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant