feat(DO-7930): stamp deployment_id into config.yaml for per-attempt notification dedupe - #2
Closed
gokul-das-ext wants to merge 1 commit into
Closed
feat(DO-7930): stamp deployment_id into config.yaml for per-attempt notification dedupe#2gokul-das-ext wants to merge 1 commit into
gokul-das-ext wants to merge 1 commit into
Conversation
…otification dedupe ArgoCD's notification oncePer key is moving from app.status.sync.revision to app.metadata.annotations.app_commit to stop unrelated GitOps-repo commits from re-arming notifications for idle apps. That fix breaks rollback: replaying a previously-deployed commit reuses an app_commit value that was already notified, silently suppressing the rollback's own status. Adding a deployment-id input, stamped into config.yaml alongside app_commit, gives the dedupe key a value that's unique per deploy attempt instead of per code state - covering rollback and same-SHA CI re-runs without reintroducing the original over-posting bug. Backward compatible: new input is optional with an empty default, existing callers are unaffected until they pass it explicitly.
Author
|
Third PR now open: DriveWealth/dwt-infra#2702 (draft, blocked on this and dw-github-workflows#308). |
Author
|
Superseded by #3 — syncing with cloudposse's upstream deployment-id implementation (cloudposse/github-action-deploy-argocd#92, released v1.11.0) instead of carrying our own hand-rolled patch. Their version is better engineered: yq+strenv stamping (avoids YAML type-coercion issues), and conditional on non-empty input (avoids a spurious config-only commit + ArgoCD sync for every app on first deploy after upgrading, which our version would have caused). |
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.
Summary
deployment-idinput, defaulted to empty, stamped intoconfig.yamlalongsideapp_commitWhy
ArgoCD's notification
oncePerdedupe key is moving fromapp.status.sync.revisiontoapp.metadata.annotations.app_commitin a related change, to stop unrelated GitOps-repo commits from re-arming notifications for idle apps.That fix has one gap: rollback. Replaying a previously-deployed commit reuses an
app_commitvalue ArgoCD already marked notified, so the rollback's own success/failure is silently suppressed — no GitHub status at all, not even a wrong one.Keying the dedupe on something unique per deploy attempt instead of per code state closes that gap. This PR adds the field this action needs to produce that value; it doesn't change dedupe behavior on its own.
Backward compatibility
deployment-idis optional with an empty default — existing callers are unaffected until they pass it explicitly.Part of a 3-repo change
deployment-idinput/fieldDriveWealth/dw-github-workflows— passesdeployment-id: ${{ github.run_id }}-${{ github.run_attempt }}through, pinned to this PR's merge SHADriveWealth/dwt-infra— flips ArgoCD'soncePerto readdeployment_id(held in draft until 1 and 2 are merged and verified live — see that PR for why)