Details
-
Bug
-
Resolution: Unresolved
-
Medium
-
44
-
1
-
Description
This is cross-posted here from https://getsupport.atlassian.com/servicedesk/customer/portal/11/BBS-106694 based on feedback there.
This may be an "as expected" race condition, but is still annoying/distracting. The rough steps to reproduce are:
- Have a default pipelines configuration that catches all branches.
- Have a PR on some branch X that triggers this default pipeline.
- Push some final changes to branch X. This triggers a pipeline execution (as expected).
- Before the pipeline in step 3 actually starts, merge the PR with "delete branch X" selected. This is the race condition.
- Note that the pipeline in step 3 errors out with something like "fatal: Remote branch X not found in upstream origin"
Possible resolutions:
- Cancel any pipelines running on branch X when branch X is deleted. This would still probably have a race condition if the cancel doesn't happen before the error is triggered.
- Don't let users merge and delete branch X while there are pipelines for branch X still running / scheduled.
- Queue the merge to happen later after all the pending pipelines have (successfully?) completed.