Interview Prep/GitOps & Argo CD/Sync Operations, Hooks & Health

`argocd app rollback web 12` fails with `rollback cannot be initiated when auto-sync is enabled`.

BeginnerTroubleshootingSync Operations, Hooks & Health
Answer

Likely causes → By design: with auto-sync on, Git is the only source of truth, so a rollback would be undone immediately.

Diagnose → argocd app get web -o yaml | yq '.spec.syncPolicy.automated'.

Fix → The GitOps way: git revert <bad-commit> and push. For an emergency, disable auto-sync (argocd app set web --sync-policy none), roll back, then fix Git and re-enable.

Prevent → Teach on-call that rollback means revert in Git; keep the emergency path in the runbook with a reminder to re-enable auto-sync.

All GitOps & Argo CD questions Roadmap: Argo CD (GitOps)

More on Sync Operations, Hooks & Health