Skip to content

Skip Azure Pipelines for draft PRs - #3078

Merged
Stephan T. Lavavej (StephanTLavavej) merged 2 commits into
microsoft:mainfrom
StephanTLavavej:draft-prs
Sep 13, 2022
Merged

Stephan T. Lavavej (StephanTLavavej) merged 2 commits into
microsoft:mainfrom
StephanTLavavej:draft-prs

Conversation

@StephanTLavavej

@StephanTLavavej Stephan T. Lavavej (StephanTLavavej) commented Sep 4, 2022 •

Copy link
Copy Markdown
Member

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: draft-prs

Marking a PR as ready for review: still no checks

⚠️ Here's the one potential surprise in the experience. If a draft PR is marked as ready for review, that does not run checks:

Click to expand screenshot: draft-prs-2

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.)

@StephanTLavavej Stephan T. Lavavej (StephanTLavavej) added the infrastructure Related to repository automation label Sep 4, 2022
@StephanTLavavej
Stephan T. Lavavej (StephanTLavavej) marked this pull request as ready for review September 4, 2022 23:19
@CaseyCarter

Copy link
Copy Markdown
Contributor

If a draft PR is marked as ready for review, that does not run checks

This is unfortunate, but I think the experience is improved overall.

@StephanTLavavej

Copy link
Copy Markdown
Member Author

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

infrastructure Related to repository automation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants