I’d like a clearer understanding of how pipeline locking works. Say I have 2 pipelines:
pipeline-1: stage1:stage2:stage3
and
pipeline-2: stage1:stage2
pipeline-2 is “locked” and also “value streamed” to pipeline-1:stage1
According to the documentation:
“If a pipeline is locked then Go will not allow any other instance of that pipeline to be scheduled until the currently running one has been completed.”
So my understanding is a new instance of pipeline2 will not be created until the previous instance has finished but this should NOT stop new instances of pipeline-1 from running in parallel.
The weird thing is since we have been stringing more
pipelines together to form Value Streams we’ve started getting sporadic “Awaiting
Approval” appearing on the “Pipeline Activity” page (i.e. for the example above
after completing pipeline-1: stage1). This seems to come and go (i.e. it will
go away if you approve everything and restart the go server).
So what is "Awaiting Approval" ?
Thanks,
Darren.
Hi Darren,>Awaiting approval normally comes up for stages which are marked for manual trigger, check the value of "Stage type" on stage settings tab in the admin section. It should be set to "On Success" for Go to automatically schedule a pipeline
. Having said that, it can be seen in many scenarios, such as a new stage being added when you already have a few pipeline runs,
or if the previous stage fails then the next stage will not be automatically triggered, a user could choose to manually approve such a stage though.
>> So my understanding is a new instance of pipeline2 will not be created until the previous instance has finished but this should NOT stop new instances of pipeline-1 from running in parallel.That is correct, pipeline locking for an upstream pipeline will not lock a downstream pipeline. However, there is one detail that you should know. Pipeline1 can have multiple instances running at the same time, but the same stage of two different pipeline instances will never run in parallel. Lets say, pipeline1-stage2 is running with pipeline counter 10. At the same time a new instance of pipeline1 could be triggered say counter 11. Now stage1 of counter-11 finishes, but stage2 of counter-10 is still running. Go will wait for stage2 of counter-10 to finish before it schedules stage2 of counter-11.
Also, the config you speak about is fairly simple ie. Pipeline2 triggers pipeline1. So as Go finds new revisions for pipeline1, builds would be triggered. However, things would not be the same if the configuration is not exactly how you described above. For instance, if there was a common SCM material feeding into both Pipeline1 and Pipeline2, then Pipeline1 would indeed wait for Pipeline2 to complete. The same would be true if the common material happens to be an upstream pipeline instead/along with a SCM material.
>> The weird thing is since we have been stringing more pipelines together to form Value Streams we’ve started getting sporadic “Awaiting Approval” appearing on the “Pipeline Activity” page (i.e. for the example above after completing pipeline-1: stage1).I am sorry, I do not understand which pipeline and stage do you see this message for. I have attached two screenshots, which of the two do you see? Some more details would help.
>> This seems to come and go (i.e. it will go away if you approve everything and restart the go server).While we are yet to know where and why you see the awaiting approval message, you shouldn't ever have to restart your Go server for the message to go away. Just manually approving the action should be good enough.
Did you go back to pausing the pipeline right after you triggered it? If so, that is an expected behavior.