Skip to content

Split doc generation pipeline into parallel v1.0 and beta stages#806

Open
ramsessanchez wants to merge 5 commits into
mainfrom
ramsessanchez/split-docs-pipeline-by-profile
Open

Split doc generation pipeline into parallel v1.0 and beta stages#806
ramsessanchez wants to merge 5 commits into
mainfrom
ramsessanchez/split-docs-pipeline-by-profile

Conversation

@ramsessanchez

Copy link
Copy Markdown
Contributor

Splits the weekly reference-docs generation into two independent, parallel stages so v1.0 and beta each produce their own PR.

Changes

  • New -GraphProfileFilter parameter (v1.0 | beta | both, default both to preserve existing behavior) added to the generation scripts. Each filters its work to the requested profile:
    • Folder-walking scripts (GenerateMarkDown, EscapeDisallowedHtmlTags, RemoveInvalidFullStops, RemoveBoilerPlateCode, UpdateLinks) only iterate the selected profile.
    • Metadata-driven scripts (MsSubserviceUpdate, GeneratePermissionsTable, RepairExamplesDescriptionsAndTitle) skip commands whose ApiVersion doesn't match.
    • GenerateAliasedDocs filters the breaking-change report(s); CorrectRelatedLinks-AllFiles already supported it (added a -GraphProfileFilter alias for uniform invocation).
  • Profile-scoped edge cases handled:
    • Authentication docs (which live only under graph-powershell-1.0) are generated in the v1.0 stage only.
    • UpdateLinks cross-profile notes are guarded so a single-profile run only writes into its own folder.
    • StabilizeMsDate needs no change (operates on the working-tree diff, already profile-scoped).
  • Pipeline restructure: powershell-docs.yml now defines two parallel stages (GenerateV1, GenerateBeta, both dependsOn: []), each using the new reusable azure-pipelines/common-templates/generate-docs-steps.yml template with its profile, branch prefix (WeeklyReferenceDocsUpdate-v1 / -beta), and PR title.

Each stage commits to its own branch and opens its own PR, producing one PR per SDK version.

Adds a -GraphProfileFilter parameter (v1.0/beta/both, default both) to the
generation scripts so each profile can be generated independently, and splits
powershell-docs.yml into two parallel stages (GenerateV1, GenerateBeta) via a
new reusable generate-docs-steps.yml template. Each stage generates a single
profile, commits to its own branch, and opens its own PR.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 672bde33-f50e-49f9-a53c-623f7445b1e9
@learn-build-service-prod

Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

1 similar comment
@learn-build-service-prod

Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@ramsessanchez
ramsessanchez force-pushed the ramsessanchez/split-docs-pipeline-by-profile branch from 2a33c92 to 568c6f0 Compare July 15, 2026 22:22
@learn-build-service-prod

Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 568c6f0:

✅ Validation status: passed

File Status Preview URL Details
azure-pipelines/common-templates/generate-docs-steps.yml ✅Succeeded
azure-pipelines/powershell-docs.yml ✅Succeeded
scripts/CorrectRelatedLinks-AllFiles.ps1 ✅Succeeded
scripts/EscapeDisallowedHtmlTags.ps1 ✅Succeeded
scripts/GenerateAliasedDocs.ps1 ✅Succeeded
scripts/GenerateMarkDown.ps1 ✅Succeeded
scripts/GeneratePermissionsTable.ps1 ✅Succeeded
scripts/MsSubserviceUpdate.ps1 ✅Succeeded
scripts/RemoveBoilerPlateCode.ps1 ✅Succeeded
scripts/RemoveInvalidFullStops.ps1 ✅Succeeded
scripts/RepairExamplesDescriptionsAndTitle.ps1 ✅Succeeded
scripts/UpdateLinks.ps1 ✅Succeeded

For more details, please refer to the build report.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 2a33c92:

✅ Validation status: passed

File Status Preview URL Details
azure-pipelines/common-templates/generate-docs-steps.yml ✅Succeeded
azure-pipelines/powershell-docs.yml ✅Succeeded
scripts/CorrectRelatedLinks-AllFiles.ps1 ✅Succeeded
scripts/EscapeDisallowedHtmlTags.ps1 ✅Succeeded
scripts/GenerateAliasedDocs.ps1 ✅Succeeded
scripts/GenerateMarkDown.ps1 ✅Succeeded
scripts/GeneratePermissionsTable.ps1 ✅Succeeded
scripts/MsSubserviceUpdate.ps1 ✅Succeeded
scripts/RemoveBoilerPlateCode.ps1 ✅Succeeded
scripts/RemoveInvalidFullStops.ps1 ✅Succeeded
scripts/RepairExamplesDescriptionsAndTitle.ps1 ✅Succeeded
scripts/UpdateLinks.ps1 ✅Succeeded

For more details, please refer to the build report.

The push URL in the weekly docs pipeline had been corrupted to a literal
'******github.com/...' (a masked log value pasted into source) since #802,
so 'git push' failed silently while the step still reported success because
'git status' ran last. The branch never reached GitHub, so 'gh pr create'
failed with 'No commits between main and <branch>'.

- generate-docs-steps.yml: fix push URL to https://x-access-token:$token@github.com/...,
  throw on non-zero 'git push' exit code, and detect real changes by comparing
  the branch tip to the recorded base commit (the generation scripts pre-commit
  their output, so the working tree is clean at push time).
- create-pr.yml: add a Condition parameter so PR creation is skipped cleanly
  when there are no changes instead of erroring.
- GenerateMarkDown.ps1: track generated file count and fail if generation
  produces zero files, so a silent generation failure surfaces immediately.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: f3873c6c-209b-4bd2-b1a7-e96a27d4834a
@learn-build-service-prod

Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit c3b9b42:

✅ Validation status: passed

File Status Preview URL Details
azure-pipelines/common-templates/create-pr.yml ✅Succeeded
azure-pipelines/common-templates/generate-docs-steps.yml ✅Succeeded
azure-pipelines/powershell-docs.yml ✅Succeeded
scripts/CorrectRelatedLinks-AllFiles.ps1 ✅Succeeded
scripts/EscapeDisallowedHtmlTags.ps1 ✅Succeeded
scripts/GenerateAliasedDocs.ps1 ✅Succeeded
scripts/GenerateMarkDown.ps1 ✅Succeeded
scripts/GeneratePermissionsTable.ps1 ✅Succeeded
scripts/MsSubserviceUpdate.ps1 ✅Succeeded
scripts/RemoveBoilerPlateCode.ps1 ✅Succeeded
scripts/RemoveInvalidFullStops.ps1 ✅Succeeded
scripts/RepairExamplesDescriptionsAndTitle.ps1 ✅Succeeded
scripts/UpdateLinks.ps1 ✅Succeeded

For more details, please refer to the build report.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 1d4b93a:

✅ Validation status: passed

File Status Preview URL Details
azure-pipelines/common-templates/create-pr.yml ✅Succeeded
azure-pipelines/common-templates/generate-docs-steps.yml ✅Succeeded
azure-pipelines/powershell-docs.yml ✅Succeeded
scripts/CorrectRelatedLinks-AllFiles.ps1 ✅Succeeded
scripts/EscapeDisallowedHtmlTags.ps1 ✅Succeeded
scripts/GenerateAliasedDocs.ps1 ✅Succeeded
scripts/GenerateMarkDown.ps1 ✅Succeeded
scripts/GeneratePermissionsTable.ps1 ✅Succeeded
scripts/MsSubserviceUpdate.ps1 ✅Succeeded
scripts/RemoveBoilerPlateCode.ps1 ✅Succeeded
scripts/RemoveInvalidFullStops.ps1 ✅Succeeded
scripts/RepairExamplesDescriptionsAndTitle.ps1 ✅Succeeded
scripts/UpdateLinks.ps1 ✅Succeeded

For more details, please refer to the build report.

The weekly docs pipeline failed at the 'Remove invalid fullstops' step
because RemoveInvalidFullStops.ps1 ends in 'git commit', which exits 1
when there is nothing to commit ('nothing to commit, working tree clean').
As the last command in the script, that exit code failed the step even
though nothing was wrong.

Apply the same 'commit only if staged changes exist' guard already used in
CorrectRelatedLinks-AllFiles.ps1, UpdateLinks.ps1 and MsSubserviceUpdate.ps1
to the remaining unguarded scripts so a no-op pass no longer fails the build.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: f3873c6c-209b-4bd2-b1a7-e96a27d4834a
@learn-build-service-prod

Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 4db65f2:

✅ Validation status: passed

File Status Preview URL Details
azure-pipelines/common-templates/create-pr.yml ✅Succeeded
azure-pipelines/common-templates/generate-docs-steps.yml ✅Succeeded
azure-pipelines/powershell-docs.yml ✅Succeeded
scripts/CorrectRelatedLinks-AllFiles.ps1 ✅Succeeded
scripts/EscapeDisallowedHtmlTags.ps1 ✅Succeeded
scripts/GenerateAliasedDocs.ps1 ✅Succeeded
scripts/GenerateMarkDown.ps1 ✅Succeeded
scripts/GeneratePermissionsTable.ps1 ✅Succeeded
scripts/MsSubserviceUpdate.ps1 ✅Succeeded
scripts/RemoveBoilerPlateCode.ps1 ✅Succeeded
scripts/RemoveInvalidFullStops.ps1 ✅Succeeded
scripts/RepairExamplesDescriptionsAndTitle.ps1 ✅Succeeded
scripts/UpdateLinks.ps1 ✅Succeeded

For more details, please refer to the build report.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

PoliCheck Scan Report

The following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans.

✅ No issues found

More information about PoliCheck

Information: PoliCheck | Severity Guidance | Term
For any questions: Try searching the learn.microsoft.com contributor guides or post your question in the Learn support channel.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 9bc429e:

✅ Validation status: passed

File Status Preview URL Details
azure-pipelines/common-templates/create-pr.yml ✅Succeeded
azure-pipelines/common-templates/generate-docs-steps.yml ✅Succeeded
azure-pipelines/powershell-docs.yml ✅Succeeded
scripts/CorrectRelatedLinks-AllFiles.ps1 ✅Succeeded
scripts/EscapeDisallowedHtmlTags.ps1 ✅Succeeded
scripts/GenerateAliasedDocs.ps1 ✅Succeeded
scripts/GenerateMarkDown.ps1 ✅Succeeded
scripts/GeneratePermissionsTable.ps1 ✅Succeeded
scripts/MsSubserviceUpdate.ps1 ✅Succeeded
scripts/RemoveBoilerPlateCode.ps1 ✅Succeeded
scripts/RemoveInvalidFullStops.ps1 ✅Succeeded
scripts/RepairExamplesDescriptionsAndTitle.ps1 ✅Succeeded
scripts/UpdateLinks.ps1 ✅Succeeded

For more details, please refer to the build report.

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