Open scubbo opened 6 months ago
D'oh - I found the issue:
$ argocd app diff --help | grep 'local-include'
--local-include stringArray Used with --server-side-generate, specify patterns of filenames to send. Matching is based on filename and not path. (default [*.yaml,*.yml,*.json])
When I ran $ argocd app diff --local $PWD argocd-jsonnet-app-diff-demo --server-side-generate --local-include '*.yaml' --local-include '*.jsonnet'
, the behaviour was as-expected.
Keeping this open in case this is still considered a bug - I would expect the defaults for argocd app diff
to match the default behaviour of Argo itself, i.e. to handle *.jsonnet
files without any special flags being passed - but I do agree that this is working as documented and could justifiably be closed.
Checklist:
argocd version
.Describe the bug
For an intra-repo app-of-apps (i.e. a top-level manifest which declares a
spec.source.path
as a directory containing otherApplication
definitions)argocd app diff --local
correctly identifies when a.yaml
file is changed, but perceives a (no-op) migration from a.yaml
file to a.jsonnet
file as the removal of the (sub-)application from local specification.To Reproduce
source
to your own forked repo):app diff --local
shows no diff when applied to the top-level app:app diff --local
does identify a trivial change to a local file:argocd app diff
to recognize a no-op local reformatting when the deployed Application has not been changed):Expected behavior
$ argocd app diff --local $PWD argocd-jsonnet-app-diff-demo --server-side-generate
should show a no-op, as the local jsonnet definition of the sub-apphelm-guestbook
matches the deployed ApplicationActual Behaviour
app diff
indicates thathelm-guestbook
is a deployed Application which is entirely unrepresented in the local files.Screenshots
(The console output goes on, but you get the idea)
Version
Logs
N/A
Motivation
The reason I'm doing this in the first place is - I have a bunch of very repetitiously-defined Applications that I would like to convert to a jsonnet representation so that I can extract all the boilerplate to jsonnet functions and just specify the parameters that vary - but I want to validate that the jsonnet representation is a no-op diff before I deploy it.