-
Notifications
You must be signed in to change notification settings - Fork 5
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
race conditions when having more than one pipeline of the same branch #394
Comments
Thanks for opening this. I wrongly assumed that pipelines wouldn't start in parallel because they mount the same PVC. Seems this is not the case. Solution (1) is the short-term solution but not one I am ready to accept. Related to (2) and (3) I found: |
This was referenced Jan 14, 2022
Closed
Closed
michaelsauter
added a commit
that referenced
this issue
Mar 21, 2022
Pipeline runs belonging to one repository now run sequentially. If a pipeline run cannot start immediately, it is created as "pending", and a process is started to periodically check if it can start. Since the pipeline manager service may be restarted, it check on boot if there are any pending runs for the repositories under its control and starts the periodic check for those. We can improve on the design by adding a signal in the finish task of a pipeline run that the run will soon finish, reducing the up to 30s wait time for the next run. Closes #394.
michaelsauter
added a commit
that referenced
this issue
Mar 21, 2022
Pipeline runs belonging to one repository now run sequentially. If a pipeline run cannot start immediately, it is created as "pending", and a process is started to periodically check if it can start. Since the pipeline manager service may be restarted, it check on boot if there are any pending runs for the repositories under its control and starts the periodic check for those. We can improve on the design by adding a signal in the finish task of a pipeline run that the run will soon finish, reducing the up to 30s wait time for the next run. Closes #394.
michaelsauter
added a commit
that referenced
this issue
Mar 21, 2022
Pipeline runs belonging to one repository now run sequentially. If a pipeline run cannot start immediately, it is created as "pending", and a process is started to periodically check if it can start. Since the pipeline manager service may be restarted, it check on boot if there are any pending runs for the repositories under its control and starts the periodic check for those. We can improve on the design by adding a signal in the finish task of a pipeline run that the run will soon finish, reducing the up to 30s wait time for the next run. Closes #394.
michaelsauter
added a commit
that referenced
this issue
Mar 24, 2022
Pipeline runs belonging to one repository now run sequentially. If a pipeline run cannot start immediately, it is created as "pending", and a process is started to periodically check if it can start. Since the pipeline manager service may be restarted, it check on boot if there are any pending runs for the repositories under its control and starts the periodic check for those. We can improve on the design by adding a signal in the finish task of a pipeline run that the run will soon finish, reducing the up to 30s wait time for the next run. Closes #394.
michaelsauter
added a commit
that referenced
this issue
Mar 24, 2022
Pipeline runs belonging to one repository now run sequentially. If a pipeline run cannot start immediately, it is created as "pending", and a process is started to periodically check if it can start. Since the pipeline manager service may be restarted, it check on boot if there are any pending runs for the repositories under its control and starts the periodic check for those. We can improve on the design by adding a signal in the finish task of a pipeline run that the run will soon finish, reducing the up to 30s wait time for the next run. Closes #394.
michaelsauter
added a commit
that referenced
this issue
Mar 24, 2022
Pipeline runs belonging to one repository now run sequentially. If a pipeline run cannot start immediately, it is created as "pending", and a process is started to periodically check if it can start. Since the pipeline manager service may be restarted, it check on boot if there are any pending runs for the repositories under its control and starts the periodic check for those. We can improve on the design by adding a signal in the finish task of a pipeline run that the run will soon finish, reducing the up to 30s wait time for the next run. Closes #394.
michaelsauter
added a commit
that referenced
this issue
Mar 24, 2022
Pipeline runs belonging to one repository now run sequentially. If a pipeline run cannot start immediately, it is created as "pending", and a process is started to periodically check if it can start. Since the pipeline manager service may be restarted, it check on boot if there are any pending runs for the repositories under its control and starts the periodic check for those. We can improve on the design by adding a signal in the finish task of a pipeline run that the run will soon finish, reducing the up to 30s wait time for the next run. Closes #394.
michaelsauter
added a commit
that referenced
this issue
Mar 24, 2022
Pipeline runs belonging to one repository now run sequentially. If a pipeline run cannot start immediately, it is created as "pending", and a process is started to periodically check if it can start. Since the pipeline manager service may be restarted, it check on boot if there are any pending runs for the repositories under its control and starts the periodic check for those. We can improve on the design by adding a signal in the finish task of a pipeline run that the run will soon finish, reducing the up to 30s wait time for the next run. Closes #394.
michaelsauter
added a commit
that referenced
this issue
Mar 25, 2022
Pipeline runs belonging to one repository now run sequentially. If a pipeline run cannot start immediately, it is created as "pending", and a process is started to periodically check if it can start. Since the pipeline manager service may be restarted, it check on boot if there are any pending runs for the repositories under its control and starts the periodic check for those. We can improve on the design by adding a signal in the finish task of a pipeline run that the run will soon finish, reducing the up to 30s wait time for the next run. Closes #394.
michaelsauter
added a commit
that referenced
this issue
Mar 25, 2022
Pipeline runs belonging to one repository now run sequentially. If a pipeline run cannot start immediately, it is created as "pending", and a process is started to periodically check if it can start. Since the pipeline manager service may be restarted, it check on boot if there are any pending runs for the repositories under its control and starts the periodic check for those. We can improve on the design by adding a signal in the finish task of a pipeline run that the run will soon finish, reducing the up to 30s wait time for the next run. Closes #394.
michaelsauter
added a commit
that referenced
this issue
Mar 28, 2022
Pipeline runs belonging to one repository now run sequentially. If a pipeline run cannot start immediately, it is created as "pending", and a process is started to periodically check if it can start. Since the pipeline manager service may be restarted, it check on boot if there are any pending runs for the repositories under its control and starts the periodic check for those. We can improve on the design by adding a signal in the finish task of a pipeline run that the run will soon finish, reducing the up to 30s wait time for the next run. Closes #394.
michaelsauter
added a commit
that referenced
this issue
Mar 28, 2022
Pipeline runs belonging to one repository now run sequentially. If a pipeline run cannot start immediately, it is created as "pending", and a process is started to periodically check if it can start. Since the pipeline manager service may be restarted, it check on boot if there are any pending runs for the repositories under its control and starts the periodic check for those. We can improve on the design by adding a signal in the finish task of a pipeline run that the run will soon finish, reducing the up to 30s wait time for the next run. Closes #394.
michaelsauter
added a commit
that referenced
this issue
Mar 28, 2022
Pipeline runs belonging to one repository now run sequentially. If a pipeline run cannot start immediately, it is created as "pending", and a process is started to periodically check if it can start. Since the pipeline manager service may be restarted, it check on boot if there are any pending runs for the repositories under its control and starts the periodic check for those. We can improve on the design by adding a signal in the finish task of a pipeline run that the run will soon finish, reducing the up to 30s wait time for the next run. Closes #394.
michaelsauter
added a commit
that referenced
this issue
Mar 28, 2022
Pipeline runs belonging to one repository now run sequentially. If a pipeline run cannot start immediately, it is created as "pending", and a process is started to periodically check if it can start. Since the pipeline manager service may be restarted, it check on boot if there are any pending runs for the repositories under its control and starts the periodic check for those. We can improve on the design by adding a signal in the finish task of a pipeline run that the run will soon finish, reducing the up to 30s wait time for the next run. Closes #394.
michaelsauter
added a commit
that referenced
this issue
Mar 28, 2022
Pipeline runs belonging to one repository now run sequentially. If a pipeline run cannot start immediately, it is created as "pending", and a process is started to periodically check if it can start. Since the pipeline manager service may be restarted, it check on boot if there are any pending runs for the repositories under its control and starts the periodic check for those. We can improve on the design by adding a signal in the finish task of a pipeline run that the run will soon finish, reducing the up to 30s wait time for the next run. Closes #394.
michaelsauter
added a commit
that referenced
this issue
Mar 30, 2022
Pipeline runs belonging to one repository now run sequentially. If a pipeline run cannot start immediately, it is created as "pending", and a process is started to periodically check if it can start. Since the pipeline manager service may be restarted, it check on boot if there are any pending runs for the repositories under its control and starts the periodic check for those. We can improve on the design by adding a signal in the finish task of a pipeline run that the run will soon finish, reducing the up to 30s wait time for the next run. Closes #394.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We have detected at least two situations where one can have at least two pipelines at the same time running (never with same start time):
pushing two consecutive commits with close git push time or while there was already one running:
pushing a commit and afterwards creating a PR:
Depending on the timings, errors can happen in any task:
ods-start
:<tech>-build
, e.g. sonar:deploy-helm
:ods-finish
:So, any race condition can happen when having more than one pipeline running at same time.
For now, usually the workaround is just being aware of this and afterwards re-run the pipeline in openshift.
Solutions:
1- no solution, but just awareness
2- queueing/semaphore mechanisms (PVC checks, file checks,...)
3- investigate what is already possible from tekton and/or openshift pipelines
New proposals, comments, etc., are welcome!
NOTE: this might also happen when not being only in same branch context
The text was updated successfully, but these errors were encountered: