set_pipeline step supports detach mode #8374
Draft
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.
Changes proposed by this PR
If jobA of pipelineA call
set_pipelinestep to set pipelineB, then jobA is pipelineB's parent job. Currently Concourse has a logic that, if jobA sets another pipeline than pipelineB, then pipelineB will be automatically archived, which helps prevent from orphan pipelines.set_pipelinestep supports parameterteamonly when parent job runs frommainteam. We have a use case where a service pipeline running frommainteam may set child parent pipelines per needs. In other words, build-1 may set a child pipeline to teamA, then build-2 may set another child pipeline to teamB, and so on ... The behavior will trigger auto pipeline archive, thus this use case doesn't work withset_pipelinestep.I think my use case makes sense from
mainteam. To not break the current logic, I am adding adetachflag toset_pipelinestep. A parent job needs to explicitly turn on the flag so that child pipeline will be set in detach mode (same as set viafly set-pipeline, so that child pipeline will never be auto archived.Notes to reviewer
Release Note
detachflag toset_pipelinestep. Only themainteam can set child pipelines in detach mode. In detach mode, child pipelines will never be automatically archived.