Skip to content

fix(component-deploy): emit ArgoCD deployment-url when sync wait is skipped - #335

Merged
JesperTerkelsen merged 1 commit into
mainfrom
fix/argocd-deployment-url-when-sync-skipped
Aug 28, 2026
Merged

fix(component-deploy): emit ArgoCD deployment-url when sync wait is skipped#335
JesperTerkelsen merged 1 commit into
mainfrom
fix/argocd-deployment-url-when-sync-skipped

Conversation

@JesperTerkelsen

Copy link
Copy Markdown
Member

Summary

Release messages for services whose ArgoCD app has auto-sync disabled (disableAutoSync: true) or that pass wait-for-argocd-sync: false were missing the "Deployment" (ArgoCD) link — the revert-target pointer used during incidents.

Root cause: the deploy job's deployment-url output came only from the argocd-sync step (steps.argocd-sync.outputs.deployment-url). That step is gated on wait-for-argocd-sync && detect-autosync && creds, so when it's skipped the output is empty and the changelog renders no Deployment link.

Fix: add a Resolve deployment URL step that uses the sync step's URL when present and otherwise derives the (deterministic) ArgoCD app URL from inputs:
https://<argocd-server>/applications/argocd/<app>-<stage> (v2 honours argocd-app-name). Guarded on a non-empty argocd-server so non-ArgoCD deploys are unchanged. Applied to both component-deploy.yml and component-deploy-v2.yml.

Scope: this restores the link only. Deployment timing still requires the sync wait to run (unchanged). Affected services (auto-sync off / wait off): App API v2, Portal API, OCPP Gateway, IP, OCPP Proxy, Data Broker, Grid.

Found via an SRE audit of ArgoCD syncs vs #info-releases posts.

Ticket: https://montaapp.atlassian.net/browse/SRE-422

🤖 Generated with Claude Code

…wait is skipped

The deploy job's `deployment-url` output was sourced solely from the
`argocd-sync` step, which is skipped when auto-sync is disabled on the app
(`disableAutoSync: true`) or `wait-for-argocd-sync: false`. In that case the
output was empty and the changelog release message lost its "Deployment"
(ArgoCD) link — the revert-target pointer — even though the app URL is fully
deterministic from the inputs.

Add a `Resolve deployment URL` step that prefers the sync step's URL when
present and otherwise derives it as
`https://<argocd-server>/applications/argocd/<app>-<stage>` (v2 honours
`argocd-app-name`). Guarded on a non-empty `argocd-server`, so non-ArgoCD
deploys are unaffected. Timing still requires the sync wait; this only
restores the link.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@JesperTerkelsen
JesperTerkelsen force-pushed the fix/argocd-deployment-url-when-sync-skipped branch from 54ee043 to bc548b5 Compare August 28, 2026 15:30
@JesperTerkelsen
JesperTerkelsen marked this pull request as ready for review August 28, 2026 15:33
@JesperTerkelsen
JesperTerkelsen requested a review from a team as a code owner August 28, 2026 15:33
@JesperTerkelsen
JesperTerkelsen requested review from sudheer-monta and removed request for a team August 28, 2026 15:33
@JesperTerkelsen
JesperTerkelsen merged commit 61fbc82 into main Aug 28, 2026
2 checks passed
@JesperTerkelsen
JesperTerkelsen deleted the fix/argocd-deployment-url-when-sync-skipped branch August 28, 2026 15:34
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.

2 participants