Skip to content

Don't run stage 2 leg in PR validation when there is a stage 1 failure. #4839

@MichaelSimons

Description

@MichaelSimons

A decision was made to run stage 2 legs when stage 1 fails because there are scenarios in which there is value in doing this in the spirit of getting a good read of the build status. For example if there is a stage 1 test failure, stage 2 can provide value in understanding the status of the system. Recently stage 2 was added to PR validation and it inherited this behavior. In this context, there isn't much value in running stage 2 when stage 1 fails. It can be a source of confusion to outsiders who don't know much about these legs. It is also a waste of compute in this environment where the # of runs is high. Because of these reasons, we should condition stage 2 to only run on a successful stage 1 build during PR validation.

${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
    condition: succeeded()
  ${{ else }}:
    condition: succeededOrFailed()

Metadata

Metadata

Assignees

Labels

area-testingImprovements in CI and testing

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions