Throw an exception when trying to save actions for a FlowNode
for a completed execution
#826
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.
See jenkinsci/pipeline-build-step-plugin#128 (comment) and the next comment.
If
FlowExecution.saveActions
is called for a Pipeline with a completed execution, in some cases (all cases as of #807), the save will be a no-op and nothing will be written to disk. Notably this method is called implicitly when updating actions on aFlowNode
or when explicitly callingFlowNode.save
.We should throw an error in this case instead to make it easier for developers to detect and identify any issues. Generally speaking, to persist metadata for a possibly-completed build, you should use an
Action
on theRun
that storesFlowNode.getId
as needed.TODO:
workflow-cps
PR #826 bom#2785)CpsFlowExecutionTest.flowNodesCantBeSavedAfterExecutionCompletes
)Testing done
Submitter checklist