Skip Azure Pipelines for draft PRs #3078
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Documentation
Experience
Creating a draft PR: no checks
As desired, creating a draft PR doesn't run checks (except for the CLA check, which is independent). The experience is that microsoft.STL remains "Expected -- Waiting for status to be reported". Internally, nothing appears in the logs for the agent pool in Azure DevOps, or the 1ES Hosted Pool in Azure Portal - which is good, as that indicates that no resources will be consumed.
Click to expand screenshot:
Marking a PR as ready for review: still no checks
Click to expand screenshot:
microsoft.STL is still "Expected -- Waiting for status to be reported". Apparently, Azure Pipelines can't or won't detect this state transition.
This seems simple to explain to contributors. It should also be simple to deal with - when finishing changes to a PR, first set it to ready for review, then push the new commits. If this is done out of order, either a trivial commit can be pushed (like a merge with
main
, or a comment/whitespace change), or a maintainer can manually run checks.Pushing commits after ready for review: checks run normally
Finally, to test the experience, I pushed an additional commit to this PR (consolidating the
yvals_core.h
feature-test macros by removing a couple of empty lines that had accumulated). That started checks normally, proving that a PR which was created in draft state and then set to "ready for review" will behave as usual.(I haven't bothered to check what happens if a ready-for-review PR is moved back to draft state and then additional commits are pushed, but I am 99% sure that the YAML will be respected and no checks will run.)