feat: infer app dependencies for change-based rendering - #452
feat: infer app dependencies for change-based rendering#452szhekpisov-katanox wants to merge 1 commit into
Conversation
Infers each application's local-repo file dependencies (spec.source.path and helm.valueFiles, including $ref values for remote charts) and renders it only when those files change. Opt-in flag, unioned with existing watch-pattern / manifest-generate-paths annotations. ApplicationSets bypass the files-changed filter so generated Applications are filtered instead.
argocd-diff-preview
argocd-diff-preview|
Thank you so much for the PR. I really appreciate new people wanting to contribute. This is a fairly big functional change that combines multiple independent changes in one PR. That makes it harder to review, test, and evaluate each part separately. Would you mind splitting this into maybe 3 PRs?
That way we can evaluate, test, and merge them independently. |
ea045d5 to
3cec40f
Compare
|
Hi @dag-andersen , thank you for your prompt response, I've splited this PR into three, all of them are now available for review. And thank you very much for this tool, it's very useful, convenient and well-thought! |
|
Hi @szhekpisov-katanox, sorry for the late answer. I am on vacation 🏝️ I have been thinking about this a bit, and wanted to ask: is this feature not mostly the same as automatically injecting the If so, I think that could be a simpler implementation. Instead of adding a separate dependency inference and matching path, we could add something like That way we can reuse the existing What do you think about changing the implementation in that direction? :) |
Thanks — enjoy the vacation! I love that we're after the same goal here (no repo changes needed - inject/infer at runtime), so it really comes down to what the matcher can express. I think the implementation is less duplicated than it seems: The reason I don't think a plain There's also the ApplicationSet handling (generate the set, filter the generated children) that's needed regardless of which matcher we use. Happy to rename the flag or reshape the API if that helps, but I'd lean toward keeping the inference so we don't lose the value-files / |
Adds
--infer-app-dependencies(defaultfalse): infers each application's local-repo file dependencies (spec.source.pathandhelm.valueFiles, including$refvalues for remote charts) and renders it only when those files change. Opt-in, and unioned with the existing watch-pattern / manifest-generate-paths annotations. ApplicationSets bypass the files-changed filter so their generated Applications are filtered instead.It requires no changes to the source repos holding your ArgoCD Applications/ApplicationSets. Fewer applications to render means faster runs.
Result: reduced execution time from 4m30s to 1m30s on 130 ArgoCD Applications.
Combine with
--watch-if-no-watch-pattern-found=falseto render only affected applications.Originally submitted as a combined PR; split per review. The other changes now live in:
--skip-appset-generation-errors