-
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
feat: cmp/stream - allow to exclude all('*') #18810
Conversation
❌ Preview Environment deleted from BunnyshellAvailable commands (reply to this comment):
|
❌ Preview Environment deleted from BunnyshellAvailable commands (reply to this comment):
|
adc44ea
to
ee95e55
Compare
Signed-off-by: Amit Marcus <marxus@gmail.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #18810 +/- ##
==========================================
- Coverage 50.30% 50.30% -0.01%
==========================================
Files 315 315
Lines 43126 43124 -2
==========================================
- Hits 21695 21693 -2
- Misses 18951 18955 +4
+ Partials 2480 2476 -4 ☔ View full report in Codecov by Sentry. |
❌ Preview Environment deleted from BunnyshellAvailable commands (reply to this comment):
|
❌ Preview Environment deleted from BunnyshellAvailable commands (reply to this comment):
|
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.
So.... I'm not violently opposed to making the change. After all, you're the admin, you could do the same thing but probably in a worse way. But I really wanna know...... exactly what are you doing with this gitopsless gitops deployment? |
Hey, thanks for responding 1st of all, Argo is great, and also the plugin system. it changed the way we think and design our solution and probably made some of our CI obsolete (like, generating manifests, commit them, and then consume them "statically") + gave us the possibility to create on the fly dynamic envs by injecting parameters and such. we're basically using mostly the plugin system as an entry-point in our Apps without using the built in tools like "Helm" or "Kustomize" (we do actually use them, but inside our plugin...since we need to pipe output to Okay, To the PR title's usecase: We only have one generic plugin that we maintain that does not change the filesystem during run time (so we keep the git state clean..). we have 500 apps on the same monorepo. a commit triggers a cache miss on all of them at once. we have approx 3000 files, they don't weight that much, but it's the numbers of files that's heavy on the i/o so we merely looking for an escape hatch.
|
@crenshaw-dev Hey. I've took the time to try and express via a real example with real code snippets. please take a look at: https://github.com/marxus/argo-cd/tree/cmp-required-changes-demo |
I think the project is better-served by improving monorepo support for plugins in general rather than facilitating a hack. I think the combination of these two would largely solve the performance problem:
For now, I think you could accomplish basically what you need by excluding every file extension in the repo except one that you know is super lightweight. For example:
This change would make that hack a bit easier: #16146 The PR isn't actually 288 files, there was a botched rebase. |
I agree, we should improve monorepo support even that from a configuration wise, the changes for PLUGIN_TAR_EXCLUSIONS and for On another topic: after
incase for a non static inclusion, like the one that offered using manifest-path annotation, we can use them as intermediate TarGzs |
@marxus - your hack to use a shared volume is a very interesting idea (acknowledging the risks, naturally). Our engineers have been desperately looking for a solution (....or abandonment of argo-cd...) ever since the migration of CMP to the sidecar, which rendered all our deployments very painful (and unreliable - timeout issues etc). I'll definitely try the suggestion. And, needtless to say, we would also welcome an option to either "exclude all", or to simply have "--include-only" param (which might be more palatable to argo-cd maintainers, from a philosophical perspective). In general, when operating monorepo, there is no need to include anything beyond a very small subset of folders - hence having only an option "--exclude" does not seem to be a fitting design choice. |
Yep, this is an anti-traversal mechanism.
It sounds like what you're describing is basically introducing a persistent cache in the CMP. We've intentionally avoided that for these reasons:
Of course, once user namespaces has broad cloud provider support, we'll be able to abandon the sidecar-based isolation strategy and avoid the network overhead/flakiness. I'm gonna close this for now, since I think you can accomplish the same thing pretty today easily:
I do recommend following these two and reviewing/testing: |
Closing just to express that I don't think we'll merge the PR, obviously more discussion is very welcome. :-) |
Checklist:
happen depending on risk/complexity).
This one is regarding:
https://argo-cd.readthedocs.io/en/stable/operator-manual/config-management-plugins/#plugin-tar-stream-exclusions
This one is a tricky one. It's not a "new feature", yet it's not really a "bug fix", it's just merely allowing to set
ARGOCD_REPO_SERVER_PLUGIN_TAR_EXCLUSIONS='*'
No need to edit the current document since the document doesn't suggest anything about not excluding all the files
In practice, if you actually try to exclude all the files you will get the 'no files to send' error
Why should we allow exclude everything?
So is it backward compatible?
Why was it not allowed so far?
My use case:
we have a monorepo, we do not change files in the file system during generation yet we can not use the same source to generate manifests. the default tar-gz/stream/untar-gz per generation operation takes a heavy toll on the Disk I/O.
our quick workaround this problem could be:
argocd-repo-server
and the plugin sidecar. (shared /tmp/_argocd-repo)I'm not claiming this is a way to go. or such methods should be the preferred way of doing stuff, there are probably more pitfalls one might think about, such as multiple plugins needs extra attention, discovery rules needed to be carefully crafted, generate operations that do change the filesystem in order to manipulate the manifests, etc etc etc
but all those concerns are offloaded to the admin and are not part of the argocd scope
for us it's a quick win by enabling something which is only logical - allowing the admin to exclude what ever he want.
this can allow other quick wins for admins, without being too hacky or have a customized forked binary that they don't want to maintain, i've collected issues that could benefit or in someway related:
#16146
#15763
#17775
#18054
#17951
#16837
#18795
@crenshaw-dev @jsolana @czchen @momilo @clement-heetch @woehrl01
and this is the PR the introduced the big change CMP way of operation #8600
my PR doesn't revert anything. just allows one to have a logical escape hatch