fix: include deploy trigger in build dedupe key to prevent dropped deploys#218
Open
vigneshrajsb wants to merge 1 commit into
Open
fix: include deploy trigger in build dedupe key to prevent dropped deploys#218vigneshrajsb wants to merge 1 commit into
vigneshrajsb wants to merge 1 commit into
Conversation
…ploys The resolve/build queue dedupe key was derived only from a build configuration fingerprint, not the commit being deployed. When two deploys of the same build were triggered close together (e.g. two pushes to a tracked branch landing within the queue's dedupe window) both produced an identical key. The build job is keyed by jobId, so a duplicate enqueue is a no-op: the second deploy was silently coalesced into the first and the newer commit never built, with no error and no log line. Append a per-trigger ref to the resolve dedupe id and build jobId: the pushed head commit for branch pushes, or a unique run id for manual redeploys. Distinct triggers now get distinct keys, while genuine duplicates of the same trigger (such as a redelivered webhook) still coalesce. Thread the ref from the resolve step into the build step so both queue layers agree, and log when an enqueue is deduped so the drop is observable.
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.
Problem
The resolve/build queue dedupe key was derived only from a build configuration fingerprint, not the commit being deployed. When two deploys of the same build were triggered close together — for example, two pushes to a tracked branch landing within the queue's dedupe window — both produced an identical key.
The build job is keyed by
jobId, and a duplicatejobIdenqueue is a no-op. So the second deploy was silently coalesced into the first: the newer commit never built, with no error and no log line. The only visible symptom is a missing deploy and a stale release.Fix
jobId:Tests