Repository navigation
ci(android): Add a links-only mode to the verify-pr test workflow - #7185
Merged
Merged
Conversation
Co-Authored-By: Antonis Lilis <antonis.lilis@sentry.io>
Contributor
Semver Impact of This PR⚪ None (no version bump detected) 📋 Changelog PreviewThis is how your changes will appear in the changelog. This PR will not appear in the changelog. 🤖 This preview updates automatically when you update the PR. |
Contributor
Contributor
PR risk: mediumFor commit Main concerns: public contract, data sent to Sentry, host performance. Rules that block low also fired:
This label is a hint for reviewers, not an approval. |
antonis
approved these changes
Dec 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📢 Type of change
📜 Description
Adds a
links_onlymode toverify-pr-spike.yml(#7127) for PRs whose evidence is a metric. The fetch job's token can't read metrics, because it lacksorg:read, and that stays as it is. The run builds and exercises both sides, reads nothing back from Sentry, and leaves a person what they need to check the metrics by hand.Sample (
samples/react-native/src/verifyRun.ts): metrics ignore tags, soverify.run_id,verify.prandverify.commitare now also set withSentry.setAttributes(...). The tags stay, now set in oneSentry.setTags(...)call.setAttributesis re-exported from@sentry/core10.78.0, the version on main, and it writes to the isolation scope, the same scope assetTag. Metric capture merges the isolation and current scope attributes into every metric.setAttributessets all three in one call with a plainRecord<string, string>, whichsetAttributecan't do.Workflow,
links_only: true:results.jsongetsflow_start_utcandflow_end_utcunderruns.<side>, next to the existingrun_id. Both are runner time, taken right before and aftermaestro test.verify.run_idand flow window. It has no Sentry links.links_onlytogether withtransactions, anyfetch_*input, orprobe_metricis refused in the build job's first step, before checkout. Only input names are printed. In this mode the build job runs even when a fetch-only or probe input is set, so the refusal can happen.With
links_only: false, nothing changes: same job conditions, sameresults.jsonkeys, same summary. The workflow is still dispatch-only. The build job still has no secrets, and there is no new token or permission.How to tell a side's metrics really reached Sentry. Nothing in the run confirms it. For each side, separately:
sentry-sdks/sentry-react-native, open the metrics explorer for the metric (for feat(core): Add the task context to the long task metric #7119,react_native.long_task.duration). Filter onverify.run_id:<that side's run id from the summary>, over that side's flow window. Widen the window by a few minutes on both ends, because metric timestamps come from the emulator's clock and the window comes from the runner's clock.verify.run_idmeans the side's metrics arrived. Run ids are unique to a run and side, so nothing else can match.verify-pr-spikeartifact (<run_id>/<run_id>.logcat). A'Metric beforeSend:', '<name>'line means the SDK produced the metric.Envelope sent successfullymeans it was sent. If both are there and Sentry has nothing, the metric got lost in ingestion or the query is wrong. If neither is there, the flow never triggered the metric.For #7119, the expected difference is on the metric's attributes: the "with" side should carry the new route, foreground and start-phase attributes, and the "without" side shouldn't.
💡 Motivation and Context
Metric-only PRs such as #7119 can't be verified with the current modes: the build fails without an error event id, and the fetch job can't read metrics. Part of #7127. #skip-changelog
📝 Checklist
sendDefaultPIIis enabled.packages/core/etc/sentry-react-native.api.md) reviewed by another Mobile SDK team member or implemented according to the develop docs spec.🔮 Next steps
Needs a decision:
verify/*branch must contain this sample change. The build uses the sample fromref, and feat(core): Add the task context to the long task metric #7119's head is older than this PR. So itsverify/*branch has to merge main after this lands. Otherwise its metrics carry noverify.run_idand step 1 finds nothing. Should the skill do that merge for links-only runs, or should it check for it?probe_metricis refused as well. The ask was to refusetransactionsand the fetch-only inputs.probe_metricis refused too because it is also a fetch-job mode. Keep it or drop it?via Antonis Lilis.
--
View Session [Sentry]