-
Notifications
You must be signed in to change notification settings - Fork 250
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
[JENKINS-70808] Add a specific isRestartable method that accept a sta… #596
base: master
Are you sure you want to change the base?
Conversation
Dohbedoh
commented
Mar 16, 2023
- JENKINS issue(s):
- JENKINS-70808
- Description:
- Add a method to specifically check if a stage is restartable that will return as soon as one is found and will not check the status of other irrelevant stages. To be consumed downstream by blueocean-pipeline-api-impl at https://github.com/jenkinsci/blueocean-plugin/blob/49440310221d3e68040c0a46842b8a91d0a577be/blueocean-pipeline-api-impl/src/main/java/io/jenkins/blueocean/rest/impl/pipeline/PipelineNodeImpl.java#L189-L193.
- Users/aliases to notify:
- @olamy
Signed-off-by: Olivier Lamy <[email protected]>
…d and cached then future usage will be really quick... add TODO for using jenkinsci/pipeline-model-definition-plugin#596 Signed-off-by: Olivier Lamy <[email protected]>
…d and cached then future usage will be really quick... add TODO for using jenkinsci/pipeline-model-definition-plugin#596 Signed-off-by: Olivier Lamy <[email protected]>
…d and cached then future usage will be really quick... add TODO for using jenkinsci/pipeline-model-definition-plugin#596 Signed-off-by: Olivier Lamy <[email protected]>
for (ModelASTStage s : stages.getStages()) { | ||
if(s.getName().equals(stageName)) { | ||
return !Utils.stageHasStatusOf(s.getName(), execution, | ||
StageStatus.getSkippedForFailure(), StageStatus.getSkippedForUnstable()); |
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.
So a failed/unstable stage is not restartable? The logic here is unclear. Is this just a copy / adaptation of code elsewhere?
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.
@jglick it is the same logic as isRestartable() but specific to a single stage.
might need to take into account 821aabd |