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

Pipeline with conditional step sometimes error with "The pipeline has entered an unknown state"

      Issue Summary

      This is reproducible on Data Center: (no)

      Steps to Reproduce

      Define a pipeline that meet following condition:

      • Have a condition step that would be skip during pipeline execution
      • Have steps before condition step that started more than 2 hours, and had a step running 2 hours after pipeline start for more than 5 mins .
      • Have step after condition step

      Here is an example pipeline definition that can reproduce the issue:

       

          reproduce-not-run-state:
            - step:
                name: 1st long running step
                script:
                  - sleep 1h
                  - sleep 30m
            - step:
                name: 2st long running step
                script:
                  - sleep 1h
                  - sleep 30m
            - step:
                name: conditional step
                script:
                  - echo "conditional step"
                condition:
                  changesets:
                    includePaths:
                      - bin/**
            - step:
                name: not-run step
                script:
                  - echo "should be in not run state"

      Pipeline will errored with "Configuration error: The pipeline has entered an unknown state. Please rerun or contact support." after all steps completed before conditional step.

      This symptom can also happen with pipelines that include manual deployment step:

          reproduce-not-run-state:
            - step:
                name: 1st round step
                script:
                  - echo "step for 1st run"
                  - sleep 2m
            - step:
                name: manual deploy
                deployment: a
                script:
                  - echo "manual deploy step"
                  - sleep 5m
                trigger: manual
            - step:
                name: conditional step
                script:
                  - echo "conditional step"
                condition:
                  changesets:
                    includePaths:
                      - bin/**
            - step:
                name: not-run step
                script:
                  - echo "should be in not run state" 

      Expected Results

      Pipeline can complete with out error

      Actual Results

      Pipeline is error with: "Configuration error: The pipeline has entered an unknown state. Please rerun or contact support."

      And step after conditional step is left in NOT_RUN state

      Workaround

      User can rerun the pipeline and it will continue from first NOT_RUN state

            [BCLOUD-22000] Pipeline with conditional step sometimes error with "The pipeline has entered an unknown state"

            There are no comments yet on this issue.

              Unassigned Unassigned
              829c1963e9d7 lliang2
              Affected customers:
              0 This affects my team
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: