Skipping all steps in a parallel group causes the final step to execute prematurely and miss artifact downloads

XMLWordPrintable

    • 1
    • Severity 3 - Minor
    • 1

      Issue Summary

      Bitbucket Pipelines final steps may execute prematurely and fail to download artifacts if all steps in a preceding parallel group are skipped.

      Steps to Reproduce

      1. Create a Bitbucket Pipeline with a parallel group followed by a final step.
      2. Configure the steps within the parallel group to upload artifacts to a shared path (e.g., .some_output/**) and include condition statements that cause all steps in that group to be skipped for a specific run.
      3. Configure the final step to download the artifacts from that shared path.
      4. Run the pipeline such that the parallel steps are skipped.

      Expected Results

      The final step should wait for the parallel group to fully resolve (even if skipped) and ensure any artifacts uploaded by other non-skipped parallel branches (if applicable) or previous steps are available.

      Actual Results

      The final step starts executing before the parallel group has finished its lifecycle, leading to an ordering issue where artifacts are not yet available for download.

      Workaround

      Add an "ordering guard" step to each parallel group that might have all its steps skipped. This should be an ordinary step without any condition: to ensure the group does not finish instantaneously, forcing the final step to wait correctly.

        - parallel:
            - step: *conditional_step_1
            - step: *conditional_step_2
            - step:
                name: ordering guard
                script:
                  - echo "temporary workaround for final step ordering"
      
      

              Assignee:
              Unassigned
              Reporter:
              Mark C
              Votes:
              2 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: