Skip to content

ci(release): publish docs from validated edge snapshots - #2101

Open
DariuszPorowski wants to merge 1 commit into
edgefrom
dariuszporowski-docs-release-snapshots
Open

DariuszPorowski wants to merge 1 commit into
edgefrom
dariuszporowski-docs-release-snapshots

Conversation

@DariuszPorowski

@DariuszPorowski DariuszPorowski commented Dec 1, 2026 •

Copy link
Copy Markdown
Member

Summary

Implements the docs side of release Option 2: development happens only on edge, each release candidate validates an exact edge commit, and the final release publishes vX.Y from that commit plus the release configuration.

  • New Validate release docs workflow (validate-release.yaml). The coordinator dispatches it on edge for each RC with {version} and records the run's head_sha as the docs snapshot. It runs only on refs/heads/edge, checks out exactly github.sha, and has only contents: read. It uses no App token, writes nothing, deploys no Pages, and does no Algolia indexing. It validates version with validate_semver.py, applies the release configuration with the new release-docs.sh --dry-run, and builds the combined site with build_pages.py, using the Radius Swagger from refs/tags/v${version}.
  • Release docs (release.yaml) now requires a commit input. Before it runs any snapshot code or creates the App token, it checks that commit matches ^[0-9a-f]{40}$ and is reachable from origin/edge (git merge-base --is-ancestor). It then checks out that commit detached and runs release-docs.sh on it. The release commit's only parent is the snapshot. The workflow keeps the filename, job guard, App-signed commit, and create-or-fast-forward vX.Y. It never touches the default branch and requests no administration permission. Inputs reach run: only through env.
  • release-docs.sh --dry-run: an additive mode that skips the credential check and exits after staging the release configuration, before any gh api call. Bicep handling is unchanged.
  • Contributor docs: no upmerges, PRs target edge, backports go to vX.Y in a separate PR after merging to edge, RC snapshot validation, and final publication from the snapshot.

Reason for change

Docs no longer upmerges, and edge stays the default branch. Previously, the final release published whatever the edge tip was at the time of the final release. Publishing the commit validated for the RC makes the released docs match what was tested against that Radius version. The core Radius release coordinator (radius-project/radius, changed in parallel) calls this contract.

Coordination with #2096: the release-docs.sh and test edits are additive and don't overlap that PR's hunks. I verified that both merge orders are clean and that all tests pass on the merged result. After #2096 merges, the dry run also applies and validates the Bicep extension tag selection for the RC.

Merge order, with no release in flight:

  1. ci(release): publish docs from validated edge snapshots #2101 (this PR)
  2. ci(release): publish docs and samples from validated RC snapshots radius#13950
  3. ci(sync): remove shared upmerge workflow .github#60
  4. ci: release samples from a tested edge commit and remove upmerges samples#2747

Merge this first. The updated coordinator dispatches its validate-release.yaml for every RC and passes the new commit input to release.yaml for finals.

Fixes #

How to test

Prerequisites: Linux (or WSL) with GNU sed/base64, jq, Python 3, Node.js from .node-version, and Go.

  1. bash .github/scripts/release-docs_test.sh. Expect Docs release dry-run tests passed (5 cases). and Docs release script tests passed (15 cases).
  2. python3 -m unittest discover -s .github/scripts -p 'pages_*_test.py'. Expect OK.
  3. actionlint .github/workflows/release.yaml .github/workflows/validate-release.yaml. Expect no findings.
  4. Simulate an RC validation in a clean clone of this branch:
    SHA=$(git rev-parse HEAD); git clone -q . release-docs; git -C release-docs checkout -q --detach "$SHA"
    (cd release-docs && bash .github/scripts/release-docs.sh --dry-run 0.62.0-rc.6)
    git clone -q --depth 1 --branch v0.62.0-rc.6 --filter=blob:none --sparse https://github.com/radius-project/radius.git radius-release
    git -C radius-release sparse-checkout set swagger
    cp -R radius-release/swagger static/; cp -R radius-release/swagger release-docs/static/
    npm ci; npm ci --prefix release-docs
    HUGO_ENVIRONMENT=production python3 .github/scripts/build_pages.py http://localhost:8000 . release-docs public
    Expect Dry run: the release configuration for v0.62.0-rc.6 applies cleanly. No GitHub API calls were made. Then expect a successful build, with public/latest/index.html showing latest (0.62) and only config.toml staged in release-docs.
  5. Exercise the Release docs snapshot guard from a full clone. With INPUT_COMMIT set to git rev-parse origin/edge~5, it checks out that commit. It fails for an uppercase or short SHA, a ref name, the origin/v0.62 tip, or an unknown SHA.

File change summary

File Summary of change
.github/workflows/validate-release.yaml New read-only RC workflow. It validates the version, applies the dry-run release configuration to github.sha, and builds the site with the Swagger from v${version}.
.github/workflows/release.yaml Adds the required commit input. It validates the SHA and its reachability from origin/edge before any token or snapshot code runs, then publishes from the detached snapshot. Checkout uses the read-only job token.
.github/scripts/release-docs.sh Adds the --dry-run mode: no credentials or API calls, and it exits after staging the release configuration.
.github/scripts/release-docs_test.sh Adds 5 dry-run cases: RC, final, dirty checkout, config drift, and missing version. Each asserts that no API calls were made and that HEAD and the branch are unchanged.
README.md Describes RC snapshot validation, publication from the snapshot, no upmerges, and backports.
content/contributing/contributing-docs/index.md Updates branch guidance and release commit signing for snapshots and backports, and documents the local dry run.

@DariuszPorowski
DariuszPorowski requested review from a team as code owners December 1, 2026 19:36
@github-actions github-actions Bot added the pr:waiting-for-review A reviewer owns the next action; required approval is pending or unverifiable label Dec 1, 2026
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails
actions/actions/checkout 3d3c42e5aac5ba805825da76410c181273ba90b1 🟢 6
Details
CheckScoreReason
Code-Review🟢 10all changesets reviewed
Maintained⚠️ 00 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Binary-Artifacts🟢 10no binaries found in the repo
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
License🟢 10license file detected
Fuzzing⚠️ 0project is not fuzzed
Packaging⚠️ -1packaging workflow not detected
Signed-Releases⚠️ -1no releases found
Security-Policy🟢 9security policy file detected
Branch-Protection🟢 6branch protection is not maximal on development and all release branches
SAST🟢 9SAST tool detected but not run on all commits
Pinned-Dependencies🟢 5dependency not pinned by hash detected -- score normalized to 5
actions/actions/setup-go d8cbb8045d7f43706b9177cceb36c1f91a6644d5 🟢 6.6
Details
CheckScoreReason
Code-Review🟢 10all changesets reviewed
Maintained🟢 1018 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Binary-Artifacts🟢 10no binaries found in the repo
Packaging⚠️ -1packaging workflow not detected
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Security-Policy🟢 9security policy file detected
Pinned-Dependencies🟢 7dependency not pinned by hash detected -- score normalized to 7
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
SAST🟢 10SAST tool is run on all commits
actions/actions/setup-node 949feb2413d6458794dcd2491c4babbbce0c15c1 🟢 6.4
Details
CheckScoreReason
Code-Review🟢 10all changesets reviewed
Binary-Artifacts🟢 9binaries present in source code
Maintained🟢 1013 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Packaging⚠️ -1packaging workflow not detected
Token-Permissions⚠️ 0detected GitHub workflow tokens with excessive permissions
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Pinned-Dependencies🟢 5dependency not pinned by hash detected -- score normalized to 5
Security-Policy🟢 9security policy file detected
Branch-Protection⚠️ 0branch protection not enabled on development/release branches
SAST🟢 10SAST tool is run on all commits

Scanned Files

  • .github/workflows/validate-release.yaml

Add a read-only Validate release docs workflow for each release
candidate. It applies the release configuration to the exact edge
commit with a new release-docs.sh --dry-run mode and builds the site
with the matching Radius Swagger, without writing, deploying, or
indexing.

Release docs now requires the validated commit, verifies that it is
reachable from edge, and publishes vX.Y from that commit plus the
release configuration commit. Update the contributor guidance for
edge-only development, RC snapshots, and backports.

Signed-off-by: Dariusz Porowski <3431813+DariuszPorowski@users.noreply.github.com>

This branch has not been deployed

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

Labels

pr:waiting-for-review A reviewer owns the next action; required approval is pending or unverifiable

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant