Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip Azure Pipelines for draft PRs #3078

Merged
merged 2 commits into from
Sep 13, 2022

Conversation

StephanTLavavej
Copy link
Member

@StephanTLavavej StephanTLavavej commented Sep 4, 2022

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 StephanTLavavej added the infrastructure Related to repository automation label Sep 4, 2022
@StephanTLavavej StephanTLavavej marked this pull request as ready for review September 4, 2022 23:19
@StephanTLavavej StephanTLavavej requested a review from a team as a code owner September 4, 2022 23:19
@CaseyCarter
Copy link
Member

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 StephanTLavavej self-assigned this Sep 12, 2022
@StephanTLavavej
Copy link
Member Author

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

@StephanTLavavej StephanTLavavej merged commit 5e14dfe into microsoft:main Sep 13, 2022
@StephanTLavavej StephanTLavavej deleted the draft-prs branch September 13, 2022 21:31
CaseyCarter pushed a commit to CaseyCarter/STL that referenced this pull request Oct 6, 2022
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