Skip to content

fix: allow manual OpenAPI PRs independently of SDK PRs - #1499

Open
Gavin Barron (gavinbarron) wants to merge 3 commits into
mainfrom
gavinbarron-fairfax-openapi-pipeline
Open

Gavin Barron (gavinbarron) wants to merge 3 commits into
mainfrom
gavinbarron-fairfax-openapi-pipeline

Conversation

@gavinbarron

@gavinbarron Gavin Barron (gavinbarron) commented Nov 30, 2026 •

Copy link
Copy Markdown
Member

Agent assessment

Self-reported assessment, not an independent review.

Assessed revision: efc2cac694018661dd30a1bfa014dd39f5434715

Dimension Assessment Rationale
Change confidence 8.5/10 ↑ Regression checks pass for manual and scheduled OpenAPI PR creation, disabled PRs, metadata targets, and unchanged SDK gates.
↑ Pipeline YAML parses and the net diff against main contains only this fix, documentation, and focused tests.
↓ Live Azure DevOps template expansion and GitHub App PR creation have not been exercised with this revision.
Diagnosis confidence 10/10 ↑ The shared script skips manual runs when OverrideSkipCI is false; the OpenAPI task previously hard-coded false regardless of its dedicated PR control.
Evidence fit 10/10 ↑ Both completed OpenAPI PR tasks in run 269497 logged “Skipping pull request creation due Skip CI.”; the run reason was manual.

Summary

Allow OpenAPI spec discovery PRs into microsoftgraph/msgraph-metadata on manual runs independently of the SDK manual-run override.

  • Use the existing skipOpenAPIPRGeneration parameter (default false) as the OpenAPI-specific control. No redundant inverse parameter is added.
  • Set the OpenAPI task's OverrideSkipCI environment value to true, bypassing the shared script's manual-run suppression only for OpenAPI PRs. Existing skip, publication, and Fairfax change-detection gates remain in effect.
  • Require successful tasks and publishChanges: true before attempting Prod OpenAPI PR creation, matching the relevant existing Fairfax safeguards.
  • Preserve SDK behavior: manual SDK PRs still require overrideSkipCI: true; scheduled SDK behavior is unchanged.
  • Document manual OpenAPI-only PR configuration and add focused tests with mocked GitHub/token operations; no live credentials or network calls are used by these tests.

Generated code differences

None. No generated SDK code or output directory structures are changed. This fix changes when existing OpenAPI publication branches receive discovery PRs.

Command line arguments to run these changes

From the repository root:

pwsh -NoProfile -File test\scripts\OpenApiPullRequest.Tests.ps1

Passed, including a rerun after aligning this branch with main. Covers all three OpenAPI variants (Prod v1.0, beta, Fairfax v1.0), manual/scheduled creation, disabled PR creation, target repository/base/head arguments, publication-guard contracts, and unchanged SDK manual/scheduled gates.

git diff --check — passed. Both the main generation pipeline and OpenAPI template also parsed successfully using ConvertFrom-Yaml.

To verify end to end, manually run the generator pipeline with:

skipOpenAPIPRGeneration: false
skipOpenApiCaptureAndClean: false
publishChanges: true
overrideSkipCI: false

After successful generation/publication with changes, OpenAPI PRs should be created without SDK PRs. SDK stages may still generate and push branches unless excluded through Stages to run. Fairfax continues to skip its PR when no files changed.

Not run: a live Azure DevOps run, real GitHub App authentication/PR creation, or the .NET suite (no C# changes).

Links to issues or work items this PR addresses

Follow-up to #1498.

Observed failure: manual pipeline run 269497; both completed OpenAPI PR tasks returned successfully after logging Skipping pull request creation due Skip CI..

Microsoft Reviewers: Open in CodeFlow

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant