fix(resource/pipeline): fix permit_restart_from_failed_steps = false#160
Merged
masontikhonov merged 5 commits intomasterfrom Apr 22, 2025
Merged
Conversation
Contributor
Author
|
/test |
`permit_restart_from_failed_steps` property of pipeline spec behaves differently when omit vs set to `false`. This means we should not omit `false` value while sending requests to API. Fixes #CR-26963
9ac80ec to
2adecb7
Compare
Contributor
Author
|
/test |
permit_restart_from_failed_steps to JSONpermit_restart_from_failed_steps = false
Contributor
Author
|
/test |
Contributor
Author
|
/test |
| }, | ||
| } | ||
|
|
||
| hasPermitRestartChanged := d.HasChange("spec.0.permit_restart_from_failed_steps") |
There was a problem hiding this comment.
@masontikhonov HasChange functions are normally used in custom diff functions. We should instead just check if permit_restart_from_failed_steps_use_account_settings is set to true and in such case set the property to nil
Contributor
Author
|
/test |
ilia-medvedev
approved these changes
Apr 22, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
This fixes
permit_restart_from_failed_stepsbehavior inpipelineresource.Before this fix, setting
permit_restart_from_failed_steps = falseor omitting this key resulted in “Permit restart from failed step: Use account settings” for both cases.New syntax/behavior is:
permit_restart_from_failed_steps = [true|false]with the default valuetrue(“Permit”).If
false, the policy is set to “Forbid”.New flag is added:
permit_restart_from_failed_steps_use_account_settings = [false|true]with the default valuefalse(“do not use account settings”).If
true,permit_restart_from_failed_stepswill be ignored and pipeline policy will be set to “Use account settings”.Warning
BREAKING CHANGES!
permit_restart_from_failed_steps = falseresulted in “Permit restart from failed step: Use account settings”.From now on, setting
permit_restart_from_failed_steps = falsewill result in “Permit restart from failed step: Forbid”Fixes #CR-26963
Notes
Checklist
/testcomment will be ignored by the CI trigger unless it is made by a repo admin or collaborator.