Conversation
Member
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
NicoHinderling
approved these changes
Apr 8, 2026
Comment on lines
+666
to
+682
| try: | ||
| PreprodSnapshotComparison.objects.get_or_create( | ||
| head_snapshot_metrics=head_metrics, | ||
| base_snapshot_metrics=snapshot_metrics, | ||
| defaults={"state": PreprodSnapshotComparison.State.PENDING}, | ||
| ) | ||
| except IntegrityError: | ||
| pass | ||
|
|
||
| compare_snapshots.apply_async( | ||
| kwargs={ | ||
| "project_id": project.id, | ||
| "org_id": project.organization_id, | ||
| "head_artifact_id": head_artifact.id, | ||
| "base_artifact_id": artifact.id, | ||
| }, | ||
| ) |
Contributor
There was a problem hiding this comment.
nit: shall we extract this into a helper method since it's a copy pasta of code from line 606?
Member
Author
There was a problem hiding this comment.
I personally don't think it cleans things up much and just adds more indeterminism to track down a shared helper, so I'm fine lightly duplicating to avoid redirection
| commit_comparison__base_sha=base_sha, | ||
| commit_comparison__base_repo_name=base_repo_name, | ||
| project_id=project_id, | ||
| preprodsnapshotmetrics__isnull=False, |
Contributor
There was a problem hiding this comment.
shouldn't we also exclude builds that have size metrics in this query too?
Member
Author
There was a problem hiding this comment.
In practice I don't think there will ever be a case where snapshotmetrics and size metrics are both set
cf92c2f to
d2e185e
Compare
george-sentry
pushed a commit
that referenced
this pull request
Apr 9, 2026
…f-order (#112474) We discovered some cases where base is being uploaded after head. This results in comparisons not being fired for the HEAD snapshots, which ends up as a no base build found error. This wires up snapshots to be triggered when a base is uploaded and has a head that contains no comparison yet. Resolves EME-1019
3 tasks
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.

We discovered some cases where base is being uploaded after head. This results in comparisons not being fired for the HEAD snapshots, which ends up as a no base build found error.
This wires up snapshots to be triggered when a base is uploaded and has a head that contains no comparison yet.
Resolves EME-1019