Skip to content

[PR Workflow] Automate blocking PRs from being merged (EventHub) #6285

Description

@konrad-jamrozik

Per email from @rkmanda, the following needs to be automated (for details and additional criteria, see email thread RE: About Spec PR review requirements from 6/2/2023, as well as RE: Brainstorm ways to automate the responsibilities of the PR assignee):

Are all checks other than the ARM specific ones already codified into the required checks today? Heres the list of the merge criteria we had documented earlier

  1. Common [between control and data plane]
    a. All required checks in the pipeline passed
    b. If BreakingChangesRequired label exists check existence of the BreakingChangesApproved label.
    c. If Individual language breaking change label exists, check existence of the appropriate corresponding approval labels.

  2. Control plane
    a. Existence of ARMSignedOff
    b. Existence of ArcSignedOff if its applicable

  3. Suppression review
    a. Not being performed by anyone today
    b. If SuppressionReviewRequired label exists, check existence of the Approved-Suppression label

  4. PR assignee confirms with the author when it is ok to merge
    a. In remote scenarios - Force merge when there are pipeline issues
    b. NOTE: DoNotMerge label exists but sometimes authors forget.

Possible approaches

One way of doing it is to do all these checks in the unified pipeline Summary task and make it fail if they fail. Summary task passing would mean PR is ready to be merged.

Alternatively, instead of failing the Summary task, we could introduce a new task, named like VerifyLabelsAllowMerging, that must pass. This way we will avoid bolting additional responsibilities on top of the Summary task.

Update 6/14/2023: suppressions

The SuppressionReviewRequired label should be blocking (unless appropriate "suppression approved" label is present (if applicable)). Per:

Update 7/5/2023: ShiftLeft approval

Approved-OKToMerge label needs to be present for ShiftLeft scenarios.

For full details, see this Teams discussion.

It also participates in the workflow of merge queues in private repo.
See this Teams discussion and this PR:

Update 7/18/2023: rules for data-plane

Per this comment:

Pull Requests

  • Deployed 7/6/2023: Pull Request 481115: Refactor + improve logs in PipelineEventListener.ts; remove dead code from pipelineChecks.ts.
  • Pull Request 481115: Refactor + improve logs in PipelineEventListener.ts; remove dead code from pipelineChecks.ts.
  • Pull Request 482899: Improve diagnostic logs around sending events to EventHubs + rename refactor
  • Pull Request 483276: Add experimental stub support for check AllMergingRequirementsFulfilled + major refactoring and logging update of renderUnifiedPipelineChecks and related code
  • Pull Request 484831: Apply few bugfixes to the experimental check
  • Pull Request 484966: AllMergingRequirementsMet experimental check now checks for appropriate required checks and labels states
  • Pull Request 485263: De-anonymize "All merging requirements met" check; fix bug in evaluating missing required labels; improve the check description
  • Pull Request 485529: Improve "all merging requirements met" check description with help guidance
  • Pull Request 485873: Improve data-plane rules for "all merging requirements met" check
  • plus few more - see openapi-alps repo.

Follow-up work

Metadata

Metadata

Labels

Central-EngSysThis issue is owned by the Engineering System team.Spec PR ToolsTooling that runs in azure-rest-api-specs repo.

Type

No type
No fields configured for issues without a type.

Projects

Status
🎊 Closed
Status
🎊 Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions