Persist pipeline creation failures outside of Chain::Helpers
What does this MR do and why?
Related to Persist pipeline creation failures outside of C... (#469025)
The Chain::Helpers
have a side-effect of persisting the pipeline in case of errors. We need the SEQUENCE
not to persist the pipeline until Chain::Create
, when success, or until the sequence is interrupted by errors.
Since the Ci::Lint
can use dry-run
mode to exercise a pipeline creation, we want to avoid that a pipeline is accidentally persisted.
By moving the persistence in case of errors, outside the SEQUENCE
we free the Ci::Lint
from ever persisting a pipeline that should only be built in-memory.
This refactoring became necessary when implementing Pipeline Execution Policies as we build in-memory policy pipelines in order to inject resulting objects into the project pipeline.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.