argoproj / argo-cd

Declarative Continuous Deployment for Kubernetes
https://argo-cd.readthedocs.io
Apache License 2.0
17.78k stars 5.43k forks source link

Incorrect health status for app of apps #6708

Open LS80 opened 3 years ago

LS80 commented 3 years ago

Describe the bug

The health status of a parent app is briefly 💚 when a child app has status "missing". This becomes "progressing" as soon as the child application changes from "missing" to "progressing". This means that applications with a higher sync wave number start syncing before they should.

To Reproduce

  1. Follow the instructions at https://argoproj.github.io/argo-cd/operator-manual/health/#argocd-app to add the recommended custom health check.

  2. Add the repository https://github.com/LS80/argocd-app-of-apps

  3. Run this

    argocd app create ls-sync-wave-issue \
    --repo https://github.com/LS80/argocd-app-of-apps.git \
    --path apps \
    --dest-namespace argocd \
    --dest-server https://kubernetes.default.svc \
    --helm-set namespace=ls-sync-wave-issue \
    --helm-set branch=ls-sync-wave-issue \
    --revision ls-sync-wave-issue \
    --sync-policy auto \
    --project default
  4. Observe the health status changes of ls-sync-wave-issue.

Expected behavior

The parent application should not have a 💚 status until all child applications are 💚 .

Screenshots

Screen Shot 2021-07-13 at 22 26 54

⬇️

Screen Shot 2021-07-13 at 22 27 08

⬇️

Screen Shot 2021-07-13 at 22 10 14

⬇️

Screen Shot 2021-07-13 at 22 10 27

⬇️

Screen Shot 2021-07-13 at 22 33 33

Version

argocd: v2.0.1+33eaf11.dirty
  BuildDate: 2021-04-21T18:44:28Z
  GitCommit: 33eaf11e3abd8c761c726e815cbb4b6af7dcb030
  GitTreeState: dirty
  GoVersion: go1.16.3
  Compiler: gc
  Platform: darwin/amd64
argocd-server: v2.0.4+0842d44
  BuildDate: 2021-06-23T01:27:53Z
  GitCommit: 0842d448107eb1397b251e63ec4d4bc1b4efdd6e
  GitTreeState: clean
  GoVersion: go1.16
  Compiler: gc
  Platform: linux/amd64
  Ksonnet Version: v0.13.1
  Kustomize Version: v3.9.4 2021-02-09T19:22:10Z
  Helm Version: v3.5.1+g32c2223
  Kubectl Version: v0.20.4
  Jsonnet Version: v0.17.0
AnjaliSrivastava29 commented 2 years ago

Hello! Has there been any resolution for this?

akolliakou commented 6 months ago

Hi! Any chance this might get looked into some time soon as the issue is persisting?

jackspirou commented 4 months ago

I am running into this issue as well. Really hurts the ability to leverage app of apps pattern with sync-waves. Feels like this issue deserves more attention given its impact.

crenshaw-dev commented 3 weeks ago

Looks like maybe we need a better health check: https://github.com/argoproj/argo-cd/issues/10550#issuecomment-1251088236

Probably related to the fact that an Argo CD App can consider itself "healthy" even though it's not intuitively in a healthy state: https://github.com/argoproj/argo-cd/issues/10088