Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-18810

Pipelines triggers even when branch deleted

    XMLWordPrintable

Details

    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:

      1. Have a default pipelines configuration that catches all branches.
      2. Have a PR on some branch X that triggers this default pipeline.
      3. Push some final changes to branch X. This triggers a pipeline execution (as expected).
      4. Before the pipeline in step 3 actually starts, merge the PR with "delete branch X" selected. This is the race condition.
      5. Note that the pipeline in step 3 errors out with something like "fatal: Remote branch X not found in upstream origin"

      Possible resolutions:

      1. 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.
      2. Don't let users merge and delete branch X while there are pipelines for branch X still running / scheduled.
      3. Queue the merge to happen later after all the pending pipelines have (successfully?) completed.

      Attachments

        Activity

          People

            Unassigned Unassigned
            614070d93ec5 Daishi Harada
            Votes:
            11 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated: