-
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
fix(app): use jsonpatch to check for changes in status field (#15126) #15227
Conversation
50f7680
to
3f533d8
Compare
I couldn't really find a good spot for the utility function. It should be moved in |
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.
LGTM, thanks for fixing this!
I agree that it should move into gitops-engine later on. We probably need to revive lifecycle management between gitops-engine and Argo CD before, or migrate gitops-engine back into Argo CD though.
For now, I'm fine with this code living in the application controller.
Just for clarification and my understanding, this only affects valuesObject
introduced in 2.8, right?
@jannfis this fixes a problem with the new field, but it changes how we calculate the app status for every field, so it's pretty darn central. |
@crenshaw-dev Yes, I was rather referring to the bug it fixes. So the bug is only in 2.8, and we need to cherry-pick only into that? |
@jannfis yep! |
And I would assume that since every test, including end-to-end, pass without changes that the change itself is fine. The only concern might be a performance impact of |
@jannfis the You have valid points about adding changes to a critical point. I figured it's safe since I can dig a bit to see if there's another way to handle this fix. It seems the problem lies in how the object is being stored in PS: I'm out next week, but I can take another approach after I'm back, or if someone else has input until then, feel free. |
@vladfr I think a good first step would be to use a recent version of jsonpatch, e.g. |
Hi, is this PR still watched? :) |
Hi, sorry for my big delay here. I've looked for a different way to address this. Unfortunately, it's not really clear how I can change the logic to store the valuesObject field separately; besides which, I'm not really sure what's causing the issue with the quotes. So I've modified the patching code to:
PS: I'd like to add an e2e test for this, but I'm still struggling a bit with running these locally. |
Signed-off-by: Michael Crenshaw <[email protected]>
…oproj#15583) Bumps library/node from 20.6.1 to 20.7.0. --- updated-dependencies: - dependency-name: library/node dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…er (argoproj#15585) Bumps library/node from 20.6.1 to 20.7.0. --- updated-dependencies: - dependency-name: library/node dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: pasha-codefresh <[email protected]>
…in "high availibility" doc (argoproj#5348) (argoproj#13258) Signed-off-by: Sridhar Nandigam <[email protected]>
Signed-off-by: gdsoumya <[email protected]>
…oproj#15595) * feat: added patch_ms to reconciliation logs Signed-off-by: Soumya Ghosh Dastidar <[email protected]> * feat: added patch_ms and setop_ms timings to logs Signed-off-by: Soumya Ghosh Dastidar <[email protected]> --------- Signed-off-by: Soumya Ghosh Dastidar <[email protected]>
* chore(action): add newlines at eof Signed-off-by: Josh Soref <[email protected]> * chore(action): fix whitespace indentation Signed-off-by: Josh Soref <[email protected]> * chore(action): use local annotations Signed-off-by: Josh Soref <[email protected]> --------- Signed-off-by: Josh Soref <[email protected]>
…j#15615) Signed-off-by: Michael Crenshaw <[email protected]>
…rting API-Server (argoproj#15574) * feat: auto configure extensions Signed-off-by: Leonardo Luz Almeida <[email protected]> * feat: auto-reload extension configs without restarting api-server Signed-off-by: Leonardo Luz Almeida <[email protected]> * clean unused gorilla mux Signed-off-by: Leonardo Luz Almeida <[email protected]> * update docs Signed-off-by: Leonardo Luz Almeida <[email protected]> * Address review comments Signed-off-by: Leonardo Luz Almeida <[email protected]> * Add more test cases Signed-off-by: Leonardo Luz Almeida <[email protected]> * refactoring to reduce unnecessary function Signed-off-by: Leonardo Luz Almeida <[email protected]> * Add log Signed-off-by: Leonardo Luz Almeida <[email protected]> * fix bugs found during manual tests Signed-off-by: Leonardo Luz Almeida <[email protected]> --------- Signed-off-by: Leonardo Luz Almeida <[email protected]>
…oc (argoproj#15619) The supported version policy mentioned in the operator manual installation document diverges from the official policy that is mentioned in the security policy and the release cadence. This change brings the version policy in line by referring the readers to the release and cadence documentation to check the specified policy. Signed-off-by: Muhammad Mooneeb Hussain <[email protected]>
Signed-off-by: Timoses <[email protected]>
…rollback for tree view (argoproj#15572) * app sync and app wait tree view changes Signed-off-by: schakrad <[email protected]> * documentation changes Signed-off-by: schakrad <[email protected]> * included the json,yaml and wide formats and removed the value assignment to the flag Signed-off-by: schakrad <[email protected]> * Reoved extra spaces Signed-off-by: schakrad <[email protected]> * removed extra spaces Signed-off-by: schakrad <[email protected]> * refactored the code Signed-off-by: schakrad <[email protected]> * better log statements Signed-off-by: schakrad <[email protected]> --------- Signed-off-by: schakrad <[email protected]>
* Migrate Application Controller from Statefulset to Deployment Signed-off-by: ishitasequeira <[email protected]> * Add sharding deployment logic Signed-off-by: ishitasequeira <[email protected]> * Update sharding logic and add comments Signed-off-by: ishitasequeira <[email protected]> * Add heartbeat as an environment variable Signed-off-by: ishitasequeira <[email protected]> * Add retry logic, heartbeat timeout environment variable Signed-off-by: ishitasequeira <[email protected]> * use the logic of pre-specified shard number on application controller pod Signed-off-by: ishitasequeira <[email protected]> * fix manifests Signed-off-by: ishitasequeira <[email protected]> * fix lint and e2e tests Signed-off-by: ishitasequeira <[email protected]> * comment out failing e2e test Signed-off-by: ishitasequeira <[email protected]> * increase readiness probe interval period Signed-off-by: ishitasequeira <[email protected]> * "comment out readiness probe to see if e2e tests succeed" Signed-off-by: ishitasequeira <[email protected]> * revert commented readiness probe Signed-off-by: ishitasequeira <[email protected]> * revert commented test case Signed-off-by: ishitasequeira <[email protected]> * read environment variable for application controller deployment name Signed-off-by: ishitasequeira <[email protected]> * Add nil check on replica count for deployment of application controller Signed-off-by: ishitasequeira <[email protected]> * Address comments Signed-off-by: ishitasequeira <[email protected]> * Add Informer, Update documentation, add unit tests Signed-off-by: ishitasequeira <[email protected]> * update godoc Signed-off-by: ishitasequeira <[email protected]> * remove unwanted code and logs Signed-off-by: ishitasequeira <[email protected]> * Add more documentation Signed-off-by: ishitasequeira <[email protected]> * revert ApplicationController manifest to StatefulSet Signed-off-by: ishitasequeira <[email protected]> * reverting updated docs Signed-off-by: ishitasequeira <[email protected]> * Add documentation for the new dynamic distribution feature Signed-off-by: ishitasequeira <[email protected]> * update documentation Signed-off-by: ishitasequeira <[email protected]> * Add an overlay for application controller deployment and update documentation Signed-off-by: ishitasequeira <[email protected]> * fix nit Signed-off-by: ishitasequeira <[email protected]> * Marking the feature as alpha Signed-off-by: ishitasequeira <[email protected]> * Add feature status link Signed-off-by: ishitasequeira <[email protected]> * revert go,mod changes Signed-off-by: ishitasequeira <[email protected]> * update docs to avoid focusing on StatefulSet/Deployment (argoproj#26) * update docs to avoid focusing on StatefulSet/Deployment Signed-off-by: Michael Crenshaw <[email protected]> --------- Signed-off-by: Michael Crenshaw <[email protected]> * minor update to the doc Signed-off-by: ishitasequeira <[email protected]> --------- Signed-off-by: ishitasequeira <[email protected]> Signed-off-by: Michael Crenshaw <[email protected]> Co-authored-by: Michael Crenshaw <[email protected]>
* chore(deps): bump node version Signed-off-by: Michael Crenshaw <[email protected]> * fix version Signed-off-by: Michael Crenshaw <[email protected]> * update lockfile Signed-off-by: Michael Crenshaw <[email protected]> --------- Signed-off-by: Michael Crenshaw <[email protected]>
* self service notification Signed-off-by: May Zhang <[email protected]> * revert back the changes for redis-ha Signed-off-by: May Zhang <[email protected]> * revert back the changes for redis-ha Signed-off-by: May Zhang <[email protected]> * update notification engine Signed-off-by: May Zhang <[email protected]> * re-trigger build Signed-off-by: May Zhang <[email protected]> * self service notification Signed-off-by: May Zhang <[email protected]> * revert back the changes for redis-ha Signed-off-by: May Zhang <[email protected]> * revert back the changes for redis-ha Signed-off-by: May Zhang <[email protected]> * update notification engine Signed-off-by: May Zhang <[email protected]> * re-trigger build Signed-off-by: May Zhang <[email protected]> * fix conflict Signed-off-by: May Zhang <[email protected]> * fix conflict Signed-off-by: May Zhang <[email protected]> * fix conflict Signed-off-by: May Zhang <[email protected]> * fix conflict Signed-off-by: May Zhang <[email protected]> * update notification enginer version Signed-off-by: May Zhang <[email protected]> * update notification enginer version Signed-off-by: May Zhang <[email protected]> * fixing go tidy Signed-off-by: May Zhang <[email protected]> * fixing go tidy Signed-off-by: May Zhang <[email protected]> * fixing go tidy Signed-off-by: May Zhang <[email protected]> * fixing go tidy Signed-off-by: May Zhang <[email protected]> * fixing go tidy Signed-off-by: May Zhang <[email protected]> * add back checkAppNotInAdditionalNamespaces Signed-off-by: May Zhang <[email protected]> * add cm and secret to clusterRole Signed-off-by: May Zhang <[email protected]> * if applicationNamespaces is not used, then use namespaced appClient Signed-off-by: May Zhang <[email protected]> * fix merge conflict Signed-off-by: May Zhang <[email protected]> * fix doc and test based on review Signed-off-by: May Zhang <[email protected]> * self service notification Signed-off-by: May Zhang <[email protected]> * revert back the changes for redis-ha Signed-off-by: May Zhang <[email protected]> * revert back the changes for redis-ha Signed-off-by: May Zhang <[email protected]> * update notification engine Signed-off-by: May Zhang <[email protected]> * re-trigger build Signed-off-by: May Zhang <[email protected]> * fix conflict Signed-off-by: May Zhang <[email protected]> * self service notification Signed-off-by: May Zhang <[email protected]> * revert back the changes for redis-ha Signed-off-by: May Zhang <[email protected]> * revert back the changes for redis-ha Signed-off-by: May Zhang <[email protected]> * update notification engine Signed-off-by: May Zhang <[email protected]> * re-trigger build Signed-off-by: May Zhang <[email protected]> * fix conflict Signed-off-by: May Zhang <[email protected]> * fix conflict Signed-off-by: May Zhang <[email protected]> * fix conflict Signed-off-by: May Zhang <[email protected]> * update notification enginer version Signed-off-by: May Zhang <[email protected]> * update notification enginer version Signed-off-by: May Zhang <[email protected]> * fixing go tidy Signed-off-by: May Zhang <[email protected]> * fixing go tidy Signed-off-by: May Zhang <[email protected]> * fixing go tidy Signed-off-by: May Zhang <[email protected]> * fixing go tidy Signed-off-by: May Zhang <[email protected]> * fixing go tidy Signed-off-by: May Zhang <[email protected]> * add back checkAppNotInAdditionalNamespaces Signed-off-by: May Zhang <[email protected]> * add cm and secret to clusterRole Signed-off-by: May Zhang <[email protected]> * if applicationNamespaces is not used, then use namespaced appClient Signed-off-by: May Zhang <[email protected]> * fix doc and test based on review Signed-off-by: May Zhang <[email protected]> * disable defining and using secrets within notification templates for self-service Signed-off-by: May Zhang <[email protected]> * tweaks Signed-off-by: Michael Crenshaw <[email protected]> * fix docs formatting Signed-off-by: Michael Crenshaw <[email protected]> * more docs and Procfile update for local run convenience Signed-off-by: Michael Crenshaw <[email protected]> --------- Signed-off-by: May Zhang <[email protected]> Signed-off-by: Michael Crenshaw <[email protected]> Co-authored-by: Michael Crenshaw <[email protected]>
* fix: Tooltips point in wrong direction#11935 Signed-off-by: Teng, Jessie <[email protected]> * fix: Tooltips point in wrong direction#11935 Signed-off-by: Teng <[email protected]> --------- Signed-off-by: Teng, Jessie <[email protected]> Signed-off-by: Teng <[email protected]> Co-authored-by: Teng, Jessie <[email protected]>
* fix(11164): Advanced templating using patchTemplate Signed-off-by: gmuselli <[email protected]> * small changes Signed-off-by: Michael Crenshaw <[email protected]> --------- Signed-off-by: gmuselli <[email protected]> Signed-off-by: Michael Crenshaw <[email protected]> Co-authored-by: Michael Crenshaw <[email protected]>
…sInAnyNamespaceEnabled flag is set (argoproj#16249) Signed-off-by: Eilers, Jonas <[email protected]>
…rgoproj#16062) (argoproj#16241) * fix(appset): store sha from webhook to get latest change during reconcile (argoproj#16062) Signed-off-by: dhruvang1 <[email protected]> * fix(appset): Don't use revision cache when reconciling after webhook(argoproj#16062) Signed-off-by: dhruvang1 <[email protected]> --------- Signed-off-by: dhruvang1 <[email protected]>
Signed-off-by: gmuselli <[email protected]>
…ssue argoproj#16523) (argoproj#16520) * Update cert-manager.opcertificate health.lua Signed-off-by: Chris Murray <[email protected]> * adding test case for cert issuing Signed-off-by: Chris Murray <[email protected]> * fixing typo Signed-off-by: Chris Murray <[email protected]> --------- Signed-off-by: Chris Murray <[email protected]>
…t platforms (argoproj#16065) Signed-off-by: Ondrej Sika <[email protected]>
Signed-off-by: Josh Soref <[email protected]> Co-authored-by: Michael Crenshaw <[email protected]>
Wrongly placed horizontal line (`----`) was formatting code-block as a header. Fixed it with a necessary line break Signed-off-by: Elouan Keryell-Even <[email protected]>
Signed-off-by: Phil Nichol <[email protected]>
…6560) Signed-off-by: Jesse Suen <[email protected]>
…proj#16364) Signed-off-by: Rotem Tamir <[email protected]>
… allow app's deletion (argoproj#12172) (argoproj#16506) * fix(appset): remove unnecessary condition Signed-off-by: mikutas <[email protected]> * docs: update explanation about policy Signed-off-by: mikutas <[email protected]> --------- Signed-off-by: mikutas <[email protected]>
Signed-off-by: Jay Shah <[email protected]>
…oj#16581) * chore: upgrade kubernetes dependencies from 0.26.4 to 0.26.11 Fixes some vulnerabilities trivy is reporting on (not necessarily vulnerabe, trivy tends to have a lot of false positives when it comes to golang projects): * CVE-2023-3676 * CVE-2023-3955 * CVE-2023-5528 * CVE-2023-2431 * CVE-2023-2727 * CVE-2023-2728 Signed-off-by: Zoltán Reegn <[email protected]> * go mod tidy Signed-off-by: Zoltán Reegn <[email protected]> * Add go mod tidy to kubernetes updater script Signed-off-by: Zoltán Reegn <[email protected]> --------- Signed-off-by: Zoltán Reegn <[email protected]>
Signed-off-by: Elouan Keryell-Even <[email protected]>
…ns (argoproj#16534) Signed-off-by: dmpe <[email protected]>
when applying a patch, the rawextenstion object used for valuesObject needs to be diffed with jsonpatch instead of the default strategic merge Signed-off-by: Vlad Fratila <[email protected]>
Signed-off-by: Vlad Fratila <[email protected]>
Signed-off-by: Vlad Fratila <[email protected]>
Signed-off-by: Vlad Fratila <[email protected]>
@crenshaw-dev The new code now uses PS: Sorry about this, I've mistakenly ran a rebase. We can cut another PR once this is closer to being merged. (i.e. add tests) |
Closing in favor of #16602 |
This PR changes the way patches are computed for annotations and status. Because Helm source can have unstructured fields in
helm.valuesObject
, the strategic patching gives unpredictable behaviour. It was never meant to be used without astruct
(see Helm Issue). So we usejsonpatch
instead. This should yield the same results, and the library is already present in Argo as a dependency.Checklist:
Fixes #15126