-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
App of apps sync-waves not working in 1.8.1 #5146
Comments
So I've circled back around on this, and sync-waves are definitely broken in an app-of-apps. Everything syncs at once. Don't want to downgrade, so if anyone can get this working, please share. Thanks. |
it's also broken in the |
After further tests, I found that version 1.7.11 works as expected. Versions 1.8.0 and later don't. |
Yeah - we had to downgrade. Which is really too bad as 1.8 has some nice features we want. |
Hopefully this is going to be fixed, I'd need some of the 1.8 features too |
Hello everyone, Tried to reproduce the bug using app-of-apps and just regular resources with sync-waves, no luck, unfortunately. Everything looks normal. I think I'm missing something. Can someone help me to replicate the issue? Here is what I've got so far: https://github.com/alexmt/argocd-example-apps/tree/5146/5146 App-of-apps application creates two child apps argocd app create apps \
--repo https://github.com/alexmt/argocd-example-apps.git \
--revision 5146 \
--path 5146 \
--dest-server https://kubernetes.default.svc \
--dest-namespace argocd Tried to sync parent app first, then deleted child apps, committed a change to repo and synced parent app again. In both cases app1 was synced first. |
@alexmt I have auto-sync off on the parent app, and auto-sync on for the child apps. There are about 15 child apps in 5 waves.
All the child apps syncing at the same time instead of using waves. I can get you more detail later tonight. Thanks for looking into this! |
Thank you @michaelajr! Trying to increase the number of apps in my sample app. |
In my case I have autosync on at all levels (parent-children), don't know if this has an impact or not. |
@alexmt doing more testing... still seeing child apps sync at once. They seem to appear in waves... but they do not wait until the previous wave is done before starting their sync. So one wave appears - starts to sync - and then a few seconds later - the next wave appears without the previous wave completing first. |
@alexmt we also installed using the helm chart. I had multiple application controllers (3) - but not sure we need them - so I am now running 1 - but see the same issue regardless. I also have the new path annotation on each child Application.
|
@alexmt to test - I have it down to 3 waves with 1 app each. When I sync the bootstrap app, all the child apps appear at or around the same time. The app in wave 1 starts, then the app in wave 3 starts (before the one in wave 1 finishes), and then the one in wave 2 starts. Definitely not working. |
@alexmt oddly enough - deleting the bootstrap app - removes the child apps in reverse order as expected. |
Ok - still not working - but adding the Note that this is seen in a brand new argocd installation - and seen when the first app created and synced in the new installation... is an app of apps. Is it possible something lazily loaded and gets missed on the first app create/sync? |
I'm sorry. Got distracted by meetings and did not have time to work on it. Keep trying to reproduce the issue today. |
I can join in and say that this does not work for me either as of today. Version 1.8.2 Thanks for acting so swiftly @alexmt! |
I'm also trying to reproduce this issue. Fresh installation of Argo CD v1.8.3, fresh K8s cluster. The only thing I modified is adding the health customization to I then went to the UI and created an app that spawns the parent app, from a test repository at https://github.com/jannfis/app-of-apps with name When I manually trigger the sync of This is basically the reproduction steps in the OP, but work for me as expected. Is there something I have overseen? |
@jannfis After looking at your example - I think I got it to work. I noticed you set a sync-wave of Note that my parent/bootstrap app is a Helm chart of other Application resources - that are also Helm charts in the same repo (mono-repo pattern you guys talk about in the release notes):
Going to test more. Will let you know. Thanks. M |
@alexmt @jannfis That did it. Tested a few times now. Is this something new? Did I miss documentation? If so my apologies. Without the annotation on the bootstrap app the behavior I saw (not working on initial sync, but working on subsequent syncs when there were not new commits) makes sense I guess, but it was not needed in 1.7.x. @luddskunk @irizzant @pydo - Does this fix your issues as well? |
No, it is not even mandatory - I just included it for it completeness. In my tests, it also works without the sync-wave of |
Ok - preliminary testing shows that removing However returning to our production branch (using chart v2.10.0) and simply adding the health customization and upgrading the binary to v1.8.2 does NOT work. Also upgrading the chart to 2.11.0 and using a StatefulSet for the application-controller does not work. In both cases, I see the same issue as the OP. I tried adding the As other people are seeing issues as well - I do believe there is a breaking change somewhere. Just hard to pin down. |
v1.8 has introduced a bug: sync tasks sorting could've been broken intermittently if app includes namespace or CRD. The bug was fixed in: https://github.com/argoproj/argo-cd/releases/tag/v1.8.5 @michaelajr , can you please try to upgrade to v1.8.5 + version ? |
Didn't have a chance to try 1.8.5 yet, as soon as I can I'll leave a feedback |
@alexmt that is interesting. I did have a namespace in the bootstrap app. But then I moved it to a child app (along with some other "set up" manifests). So maybe that is what caused my stuff so start working. Will test soon. Thanks! |
@alexmt |
@alexmt I added a namespace back to our bootstrap app, and sync-waves stopped working. All the child apps go at once again. v1.8.7. Any chance this has been addressed in v2? |
This still is an issue in v1.8.x as well as V2.0.x. In my app of apps setup it only works with v1.7.x but in that version I have to work around the issue that Postsync hooks keep hanging on “waiting for hook...” (only on initial creation of the app of apps) |
The |
I have the same issue when migrating to 1.7.11 to 1.8.7 (same with 2.0) with app of apps and argocd app custom health check. When argocd create the first child app, it is directly healthy and after move back to processing but the others child apps (with different wave) have been created and start to sync theirs content. After some digging, i found a bad initialization in lua script. By default, the status is set to I updated the default status to The final lua script: resource.customizations: |
argoproj.io/Application:
health.lua: |
hs = {}
hs.status = "Progressing"
hs.message = ""
if obj.status ~= nil then
if obj.status.health ~= nil then
hs.status = obj.status.health.status
hs.message = obj.status.health.message
end
end
return hs |
Using your custom lua script i got the following error:
|
@llavaud Try this |
it works, thanks ! |
Looks like @ymmt2005 and @LucasBoisserie fixed the issue: #6281 . Sorry for introducing the bug :( |
Closing issue since #6281 is merged. |
Describe the bug
Using 1.8.1 - app of app sync waves are not working - all the apps sync at once. If I delete them, and sync again, sync waves then work. Can delete/re-sync, several times after, and each time sync-waves work. But if I make a new commit to the target brach, delete all the apps and sync - same thing happens - all the apps sync at once. Delete them, and re-sync - then sync waves work. Seems there is an issue honoring sync-waves when the repo is first cloned and/or refreshed.
I am using a mono repo and have the new path annotation on each app. Auto sync is on for all the child apps, and I manually issue the sync command for the bootstrap app.
I have added the required
resource.customizations
block to the argocd config map.To Reproduce
argocd app create
on the bootstrap manifest. You will see the bootstrap app get created.argocd app sync
on the bootstrap app. You will see the bootstrap app sync, and then all the child apps will begin to sync without waiting for the previous wave to sync first and become healthy.argocd app delete
on the bootstrap app (or just do it all in the UI) and wait for the everything to get removed).Expected behavior
Sync waves should wrk the first time around
Version
The text was updated successfully, but these errors were encountered: