-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
Honor manifest-generate-paths
annotation during CompareWithLatest
#14242
Comments
Since work appears to be in-progress here, I'll add that there's an older related issue from 2022 #10679 where it was pointed out that one of the other major side effects here is that this effectively equates to 'self heal' being enabled for every app in the monorepo, as any time a commit occurs it will re-sync the state of all apps. We are eagerly watching for this to get resolved as it blocks our use of autosync from a large monorepo of app configs. |
… (#15636) * squash commits Signed-off-by: Alexy Mantha <alexy@mantha.dev> * Update util/git/client.go Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Signed-off-by: Alexy Mantha <alexy@mantha.dev> * fix error message Signed-off-by: Alexy Mantha <alexy@mantha.dev> * add git client options Signed-off-by: Alexy Mantha <alexy@mantha.dev> * Update generated code Signed-off-by: Alexy Mantha <alexy@mantha.dev> * run fmt Signed-off-by: Alexy Mantha <alexy@mantha.dev> * fix tests Signed-off-by: Alexy Mantha <alexy@mantha.dev> * failed gen Signed-off-by: Alexy Mantha <alexy@mantha.dev> * tweak logs and rename cache Signed-off-by: Alexy Mantha <alexy@mantha.dev> * validate revisions Signed-off-by: Alexy Mantha <alexy@mantha.dev> * fix tests Signed-off-by: Alexy Mantha <alexy@mantha.dev> * fix tests Signed-off-by: Alexy Mantha <alexy@mantha.dev> * fmt Signed-off-by: Alexy Mantha <alexy@mantha.dev> * fix linting Signed-off-by: Alexy Mantha <alexy@mantha.dev> * fixes from review Signed-off-by: Alexy Mantha <alexy@mantha.dev> * generate Signed-off-by: Alexy Mantha <alexy@mantha.dev> * fix Signed-off-by: Alexy Mantha <alexy@mantha.dev> * use log context Signed-off-by: Alexy Mantha <alexy@mantha.dev> --------- Signed-off-by: Alexy Mantha <alexy@mantha.dev> Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
…roj#14242) (argoproj#15636) * squash commits Signed-off-by: Alexy Mantha <alexy@mantha.dev> * Update util/git/client.go Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Signed-off-by: Alexy Mantha <alexy@mantha.dev> * fix error message Signed-off-by: Alexy Mantha <alexy@mantha.dev> * add git client options Signed-off-by: Alexy Mantha <alexy@mantha.dev> * Update generated code Signed-off-by: Alexy Mantha <alexy@mantha.dev> * run fmt Signed-off-by: Alexy Mantha <alexy@mantha.dev> * fix tests Signed-off-by: Alexy Mantha <alexy@mantha.dev> * failed gen Signed-off-by: Alexy Mantha <alexy@mantha.dev> * tweak logs and rename cache Signed-off-by: Alexy Mantha <alexy@mantha.dev> * validate revisions Signed-off-by: Alexy Mantha <alexy@mantha.dev> * fix tests Signed-off-by: Alexy Mantha <alexy@mantha.dev> * fix tests Signed-off-by: Alexy Mantha <alexy@mantha.dev> * fmt Signed-off-by: Alexy Mantha <alexy@mantha.dev> * fix linting Signed-off-by: Alexy Mantha <alexy@mantha.dev> * fixes from review Signed-off-by: Alexy Mantha <alexy@mantha.dev> * generate Signed-off-by: Alexy Mantha <alexy@mantha.dev> * fix Signed-off-by: Alexy Mantha <alexy@mantha.dev> * use log context Signed-off-by: Alexy Mantha <alexy@mantha.dev> --------- Signed-off-by: Alexy Mantha <alexy@mantha.dev> Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
…roj#14242) (argoproj#15636) * squash commits Signed-off-by: Alexy Mantha <alexy@mantha.dev> * Update util/git/client.go Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Signed-off-by: Alexy Mantha <alexy@mantha.dev> * fix error message Signed-off-by: Alexy Mantha <alexy@mantha.dev> * add git client options Signed-off-by: Alexy Mantha <alexy@mantha.dev> * Update generated code Signed-off-by: Alexy Mantha <alexy@mantha.dev> * run fmt Signed-off-by: Alexy Mantha <alexy@mantha.dev> * fix tests Signed-off-by: Alexy Mantha <alexy@mantha.dev> * failed gen Signed-off-by: Alexy Mantha <alexy@mantha.dev> * tweak logs and rename cache Signed-off-by: Alexy Mantha <alexy@mantha.dev> * validate revisions Signed-off-by: Alexy Mantha <alexy@mantha.dev> * fix tests Signed-off-by: Alexy Mantha <alexy@mantha.dev> * fix tests Signed-off-by: Alexy Mantha <alexy@mantha.dev> * fmt Signed-off-by: Alexy Mantha <alexy@mantha.dev> * fix linting Signed-off-by: Alexy Mantha <alexy@mantha.dev> * fixes from review Signed-off-by: Alexy Mantha <alexy@mantha.dev> * generate Signed-off-by: Alexy Mantha <alexy@mantha.dev> * fix Signed-off-by: Alexy Mantha <alexy@mantha.dev> * use log context Signed-off-by: Alexy Mantha <alexy@mantha.dev> --------- Signed-off-by: Alexy Mantha <alexy@mantha.dev> Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Summary
When the monorepo pattern is used and multiple Applications synchronize sources from different folders in the same repo, the
timeout.reconciliation
will cause all Applications in that repo to be refreshed withCompareWithLatest CompareWith = 2
. If the applications revision points to a branch that was updated, their manifest will all be regenerated by the repo-server because the last revision changed.The
argocd.argoproj.io/manifest-generate-paths
exist to support the monerepo use case, but is only honored during the GitHub webhooks and not during theCompareWithLatest
sync.Slack thread: https://cloud-native.slack.com/archives/C04SURUPDL2/p1686849819036059
Motivation
Avoiding regenerating the Application manifest when the sources did not change would reduce the load on the repo-server. Since the CompareWithLatest is performed by a timeout, this is currently causing spikes in the repo-server. The repo-server operation queue will fill up based on the limit defined in
reposerver.parallelism.limit
and the number of replicas.We can see that the repo-server has to do a lot more work every
timeout.reconciliation
period happening during business hours - when the monorepos have new commits. During the night - when developers are not working as much - the repo-server is more stable.This can also be mitigated further in combination with #14241
Proposal
The suggestion is to add a new method on the repo-server. This would prevent the application-controller to perform git operation during the already complex GenerateManifest method.
The text was updated successfully, but these errors were encountered: