feat(ui): set validate=false for "disable autosync" request during rollback via ui (#22898) #23101
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Solution to half of #22898, submitting as guided by @agaudreault, thanks!! 🤗
Description
This PR sets
?validate=false
for thePUT application
request that is made when user clicks rollback in UI.When validate is true (the default), a full rebuild of kustomize build may be triggered because of cache invalidation.
Since the intention of the
PUT application
request is just to switch off auto-sync, there is no need to re-validate the app spec and trigger a kustomize build.This behavior is consistent with the fact that the frontend already adds
?validate=false
to PUT requests triggered via theENABLE AUTO-SYNC
andDISABLE AUTO-SYNC
buttons in the application details UI:argo-cd/ui/src/app/applications/components/application-summary/application-summary.tsx
Line 386 in 9183506
Testing
We've been using this cherry picked build in production, and can confirm works well as intended!
Please let me know if you prefer some test code be accompanied as well.
Checklist:
Does this PR require documentation updates?I've updated documentation as required by this PR.