Skip to content

Commit

Permalink
fix: argoproj#20183 preserve syncOptions when rolling back
Browse files Browse the repository at this point in the history
a rollback initiatiated from the UI shouldn't wipe out syncOptions if set

Signed-off-by: Alex Eftimie <[email protected]>
  • Loading branch information
alexef authored Feb 13, 2025
1 parent 65664ce commit 98a0142
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1205,6 +1205,10 @@ Are you sure you want to disable auto-sync and rollback application '${this.prop
if (needDisableRollback) {
const update = JSON.parse(JSON.stringify(application)) as appModels.Application;
update.spec.syncPolicy = {automated: null};
// preserve syncOptions when doing rollback
if (application.spec.syncPolicy.syncOptions) {
update.spec.syncPolicy.syncOptions = application.spec.syncPolicy.syncOptions;
}
await services.applications.update(update);
}
await services.applications.rollback(this.props.match.params.name, this.getAppNamespace(), revisionHistory.id);
Expand Down

0 comments on commit 98a0142

Please sign in to comment.