Jessi
Jessi

Reputation: 89

Build expired when creating pull request

In simple words please, What is the meaning of "build expired" when creating a pull request? All answers I found are the same, from microsoft website. Thank you very much!

Upvotes: 1

Views: 2324

Answers (1)

Kevin Lu-MSFT
Kevin Lu-MSFT

Reputation: 35574

What is the meaning of "build expired" when creating a pull request?

"Build Expired" is a feature of branch policies. Set a build expiration to make sure that updates to your protected branch don't break changes in open pull requests.

In short, when the target branch is updated before the pull request is completed, build expiration will be triggered.

For example:

Pull Request: Release -> Master. Master branch have other new changes during the Pull Request Process. It will trigger the Build expiration.

You can set the expiration time according to your needs:

  1. Immediately when branch is updated.

  2. After n hours if branch has been updated

  3. Never

You can navigate to Repos -> Branches -> Branch Policy -> Build validation to check the detailed settings.

enter image description here

Build expired when creating pull request

From you situation, you may have set the first policy: Immediately when branch is updated.

When you see the build expired, this means that the target branch has some new changes.

To solve this issue, you can choose a suitable policy for build expiration.

Here is the doc about branch policy.

Upvotes: 5

Related Questions