-
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
feat: transmit manifest-generate-path resources to the cmp-server for plugin-based applications #19209
feat: transmit manifest-generate-path resources to the cmp-server for plugin-based applications #19209
Conversation
…r plugin-based applications Signed-off-by: Javier Solana <javier.solana@cabify.com>
❌ Preview Environment deleted from BunnyshellAvailable commands (reply to this comment):
|
❌ Preview Environment deleted from BunnyshellAvailable commands (reply to this comment):
|
Hi @todaywasawesome! |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #19209 +/- ##
==========================================
+ Coverage 55.81% 55.87% +0.05%
==========================================
Files 320 321 +1
Lines 44431 44490 +59
==========================================
+ Hits 24800 24859 +59
+ Misses 17066 17060 -6
- Partials 2565 2571 +6 ☔ View full report in Codecov by Sentry. |
cc: @crenshaw-dev , cause you were also related to this issue 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this is breaking behavior, should we allow the CMP author to opt in via the CMP config?
Signed-off-by: Javier Solana <javier.solana@cabify.com>
Sounds cool! We could define a "EnableUseGeneratePathsAnnotation". wdyt? Which approach do you prefer?
Then the better approach is to define a new environment variable for Repo Server and document it |
… configurable by environment variable Signed-off-by: Javier Solana <javier.solana@cabify.com>
New environment variable added! Let me know your thoughts (Im really terrible naming things 😅 ) |
Signed-off-by: Javier Solana <javier.solana@cabify.com>
…alse by default Signed-off-by: Javier Solana <javier.solana@cabify.com>
…FEST_GENERATE_PATHS_ANNOTATION properly Signed-off-by: Javier Solana <javier.solana@cabify.com>
…FEST_GENERATE_PATHS_ANNOTATION properly Signed-off-by: Javier Solana <javier.solana@cabify.com>
Any news? |
It would be fabulous to have this merged, together with depth flag and sparse checkout - we have the whole team of engineers excitedly following these PRs, in hope that they resolve our major problems with argocd (as otherwise we will probably need to migrate to something more appropriate for monorepos). Please do let me know if there is anything I could do to help progress these PR - happy to help. 🙏 |
@momilo if you have engineering resources to put behind those features, there are some challenges to overcome: #16064 (comment) |
…ation-manifests-for-plugin Signed-off-by: Javier Solana <javier.solana@cabify.com>
For visibility, after discuss with @crenshaw-dev, next steps:
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: guestbook
annotations:
argocd.argoproj.io/manifest-generate-paths: ./manifests
spec:
source:
repoURL: https://github.com/argoproj/argocd-example-apps.git
targetRevision: HEAD
path: my-application
# ... The common root path calculated must be |
Signed-off-by: Javier Solana <javier.solana@cabify.com>
Signed-off-by: Javier Solana <javier.solana@cabify.com>
Hi mates! Here is the diagram describing how graph TD
A[GetApplicationRootPath] --> B{Is argocd.argoproj.io/manifest-generate-paths empty?}
B -->|Yes, for backward compatibility| C[Return repoPath]
B -->|No| D[Set common root path to appPath]
D --> E[Iterate over each path in argocd.argoproj.io/manifest-generate-paths]
E --> F{disjoint path and common root path in some point?}
F -->|Yes, use deepest common path| G[Update common root path]
F -->|No| I{non disjoint and path is higher than current common root path?}
I -->|Yes, use path| G
G -->H[return common root path]
|
…tion Signed-off-by: Javier Solana <javier.solana@cabify.com>
Signed-off-by: Javier Solana <javier.solana@cabify.com>
Signed-off-by: Javier Solana <javier.solana@cabify.com>
Let me know if everything is ok to move the summary of the whole conversation to the issue for better discoverability of the decisions taken |
Hi! @crenshaw-dev, do you think it is ok to merge it or miss anything? Thanks! |
This is not a |
Let me know if it is ok now Thanks! |
…ation-manifests-for-plugin Signed-off-by: Javier Solana <javier.solana@cabify.com>
…sts-for-plugin-plus tweaks from @crenshaw-dev
Thanks @crenshaw-dev really nice names now!! (among other tweaks) 🙇 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @jsolana!
… plugin-based applications (argoproj#19209) * chore: transmit manifest-generate-path resources to the cmp-server for plugin-based applications Signed-off-by: Javier Solana <javier.solana@cabify.com> * use SecureJoin Signed-off-by: Javier Solana <javier.solana@cabify.com> * make cmp manifests generation using manifest generate path annotation configurable by environment variable Signed-off-by: Javier Solana <javier.solana@cabify.com> * fix missing doc running codegen-local Signed-off-by: Javier Solana <javier.solana@cabify.com> * set reposerver.plugin.enable.manifests.generation.using.annotations false by default Signed-off-by: Javier Solana <javier.solana@cabify.com> * define ARGOCD_REPO_SERVER_PLUGIN_ENABLE_GENERATE_MANIFESTS_USING_MANIFEST_GENERATE_PATHS_ANNOTATION properly Signed-off-by: Javier Solana <javier.solana@cabify.com> * define ARGOCD_REPO_SERVER_PLUGIN_ENABLE_GENERATE_MANIFESTS_USING_MANIFEST_GENERATE_PATHS_ANNOTATION properly Signed-off-by: Javier Solana <javier.solana@cabify.com> * Fix conflict Signed-off-by: Javier Solana <javier.solana@cabify.com> * autogenerate install manifests Signed-off-by: Javier Solana <javier.solana@cabify.com> * add note about common root path calculation for manifest paths annotation Signed-off-by: Javier Solana <javier.solana@cabify.com> * log common root path calculated Signed-off-by: Javier Solana <javier.solana@cabify.com> * app path must be the lower common path Signed-off-by: Javier Solana <javier.solana@cabify.com> * tweaks Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> --------- Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Co-authored-by: Javier Solana <javier.solana@cabify.com> Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Signed-off-by: Carl in 't Veld <carl@intveld.nl>
… plugin-based applications (argoproj#19209) * chore: transmit manifest-generate-path resources to the cmp-server for plugin-based applications Signed-off-by: Javier Solana <javier.solana@cabify.com> * use SecureJoin Signed-off-by: Javier Solana <javier.solana@cabify.com> * make cmp manifests generation using manifest generate path annotation configurable by environment variable Signed-off-by: Javier Solana <javier.solana@cabify.com> * fix missing doc running codegen-local Signed-off-by: Javier Solana <javier.solana@cabify.com> * set reposerver.plugin.enable.manifests.generation.using.annotations false by default Signed-off-by: Javier Solana <javier.solana@cabify.com> * define ARGOCD_REPO_SERVER_PLUGIN_ENABLE_GENERATE_MANIFESTS_USING_MANIFEST_GENERATE_PATHS_ANNOTATION properly Signed-off-by: Javier Solana <javier.solana@cabify.com> * define ARGOCD_REPO_SERVER_PLUGIN_ENABLE_GENERATE_MANIFESTS_USING_MANIFEST_GENERATE_PATHS_ANNOTATION properly Signed-off-by: Javier Solana <javier.solana@cabify.com> * Fix conflict Signed-off-by: Javier Solana <javier.solana@cabify.com> * autogenerate install manifests Signed-off-by: Javier Solana <javier.solana@cabify.com> * add note about common root path calculation for manifest paths annotation Signed-off-by: Javier Solana <javier.solana@cabify.com> * log common root path calculated Signed-off-by: Javier Solana <javier.solana@cabify.com> * app path must be the lower common path Signed-off-by: Javier Solana <javier.solana@cabify.com> * tweaks Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> --------- Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Co-authored-by: Javier Solana <javier.solana@cabify.com> Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Signed-off-by: Carl in 't Veld <carl@intveld.nl>
… plugin-based applications (argoproj#19209) * chore: transmit manifest-generate-path resources to the cmp-server for plugin-based applications Signed-off-by: Javier Solana <javier.solana@cabify.com> * use SecureJoin Signed-off-by: Javier Solana <javier.solana@cabify.com> * make cmp manifests generation using manifest generate path annotation configurable by environment variable Signed-off-by: Javier Solana <javier.solana@cabify.com> * fix missing doc running codegen-local Signed-off-by: Javier Solana <javier.solana@cabify.com> * set reposerver.plugin.enable.manifests.generation.using.annotations false by default Signed-off-by: Javier Solana <javier.solana@cabify.com> * define ARGOCD_REPO_SERVER_PLUGIN_ENABLE_GENERATE_MANIFESTS_USING_MANIFEST_GENERATE_PATHS_ANNOTATION properly Signed-off-by: Javier Solana <javier.solana@cabify.com> * define ARGOCD_REPO_SERVER_PLUGIN_ENABLE_GENERATE_MANIFESTS_USING_MANIFEST_GENERATE_PATHS_ANNOTATION properly Signed-off-by: Javier Solana <javier.solana@cabify.com> * Fix conflict Signed-off-by: Javier Solana <javier.solana@cabify.com> * autogenerate install manifests Signed-off-by: Javier Solana <javier.solana@cabify.com> * add note about common root path calculation for manifest paths annotation Signed-off-by: Javier Solana <javier.solana@cabify.com> * log common root path calculated Signed-off-by: Javier Solana <javier.solana@cabify.com> * app path must be the lower common path Signed-off-by: Javier Solana <javier.solana@cabify.com> * tweaks Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> --------- Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Co-authored-by: Javier Solana <javier.solana@cabify.com> Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Signed-off-by: ratulbasak <ratulbasak93@gmail.com>
Closes #17951
Transmit only the necessary information to the
cmp-server
to improve the performance. More info here and hereWe are gonna transmit
manifest-generate-paths
annotation.This value is not propagated right now . Because this annotation only affects manifests generation maybe make sense to modify
ManifestRequest
:repository.proto
Checklist: