An app has been stuck at `Syncing` for an hour with `waiting for completion of hook batch/Job/db-migrate`.
IntermediateTroubleshootingSync Operations, Hooks & Health
Answer
Likely causes → The hook Job never finishes: its pod is Pending (no capacity, missing secret, image pull error), or the migration hangs on a DB lock. Argo CD waits for hooks indefinitely unless the Job has a deadline.
Diagnose →
kubectl -n web get job db-migrate
kubectl -n web describe pod -l job-name=db-migrate
kubectl -n web logs job/db-migrate
Fix → Fix the pod problem, or end the operation: argocd app terminate-op web, then delete the Job and sync again.
Prevent → Set activeDeadlineSeconds and backoffLimit on every hook Job; alert on operations running longer than 15 minutes.
More on Sync Operations, Hooks & Health
Sync fails with `one or more synchronization tasks are not valid` and `the server could not find the requested resource` for a custom resource.Intermediate`one or more objects failed to apply, reason: Deployment.apps "web" is invalid: spec.selector: Invalid value: ...: field is immutable`.BeginnerSync of a large CRD fails with `metadata.annotations: Too long: must have at most 262144 bytes`.BeginnerA PreSync hook fails with `jobs.batch "db-migrate" already exists`.BeginnerA PostSync smoke-test hook never runs, even though the sync says succeeded.IntermediateAn Ingress stays `Progressing` forever, holding the app at Progressing.Intermediate