Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
416 changes: 0 additions & 416 deletions .github/scripts/monitor-remote-workflow.mjs

This file was deleted.

848 changes: 0 additions & 848 deletions .github/scripts/monitor-remote-workflow_test.mjs

This file was deleted.

8 changes: 8 additions & 0 deletions .github/scripts/release-controller_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,14 @@ test_shared_controller_contract() {
assert_not_contains "${workflow}" "RADIUS_PUBLISHER_BOT_" \
"current release controller must not pass or require publisher credentials"
done
# The controller verifies the Deployment Engine image published by its own
# tag build; it never dispatches a second publisher or copies from ACR.
local publisher
for publisher in publish-deployment-engine.yml monitor-remote-workflow.mjs \
radiusdeploymentengine.azurecr.io; do
assert_not_contains "${CONTROLLER}" "${publisher}" \
"release controller must not use the retired Deployment Engine publisher (${publisher})"
done
assert_yq "${APPROVE}" \
'.jobs.dispatch.uses ==
"./.github/workflows/__dispatch-release-controller.yaml"' \
Expand Down
5 changes: 3 additions & 2 deletions .github/scripts/resolve-release-controller.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,9 @@ export async function verifyReleaseBuildSource({ github, core, run = tool }) {
];
if (plan.changelogPolicy === "stable-only")
args.push("--require-sibling-releases");
if (!manifest)
args.push("--require-current-bicep", "--require-current-engine");
// Published releases resume with their tagged workflows too. Reject sources
// that still need the retired azure-octo/radius-publisher or its App.
args.push("--require-current-bicep", "--require-current-engine");
Comment thread
DariuszPorowski marked this conversation as resolved.
Resolved
await run(args);
if (engine) {
core.setOutput("de-source-commit", engine.sourceSha);
Expand Down
11 changes: 4 additions & 7 deletions .github/scripts/resolve-release-controller_test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ test("absent and draft releases reject selector-free approved plans against actu
}
});

test("published historical sources retain validation and recovery; unpublished sources require GHCR-only writers", async (t) => {
test("published sources retain recovery evidence, and every source requires current GHCR and Deployment Engine writers", async (t) => {
const directory = await mkdtemp(join(tmpdir(), "approved-build-contract-"));
t.after(() => rm(directory, { recursive: true, force: true }));
for (const state of [
Expand Down Expand Up @@ -201,13 +201,10 @@ test("published historical sources retain validation and recovery; unpublished s
plan.expectedOutputs
);
calls.push("build-contract");
if (["draft", "absent"].includes(state)) {
assert.ok(args.includes("--require-current-bicep"));
assert.ok(args.includes("--require-current-engine"));
assert.ok(args.includes("--require-current-bicep"));
assert.ok(args.includes("--require-current-engine"));
if (["draft", "absent"].includes(state))
throw new Error("requires the retired Bicep ACR writer");
}
assert.ok(!args.includes("--require-current-bicep"));
assert.ok(!args.includes("--require-current-engine"));
if (state === "unsupported workflow")
throw new Error("does not enforce the publication gate");
return "";
Expand Down
6 changes: 1 addition & 5 deletions build/test.mk
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ GOTESTSUM_JSONFILE_DIR ?=
GOTEST_TOOL ?= go tool gotestsum $(GOTESTSUM_OPTS) $(if $(GOTESTSUM_JSONFILE_DIR),--jsonfile=$(GOTESTSUM_JSONFILE_DIR)/$@.jsonl) --

.PHONY: test
test: test-get-envtools test-helm test-azure-oidc-login test-cloud-test-helpers test-manage-radius-installation test-purge-old-images test-release-parity-manifest test-verify-goreleaser-snapshot test-changelog-range test-changelog-config test-build-summary test-capture-release-image-digests test-release-tag-and-branch test-monitor-remote-workflow test-release-version-format test-prepare-release test-release-plan test-release-branch-commits test-release-cutover test-release-oci-artifacts test-release-sboms test-release-controller test-release-publication test-authz-would-deny-check ## Runs unit tests, excluding kubernetes controller tests
test: test-get-envtools test-helm test-azure-oidc-login test-cloud-test-helpers test-manage-radius-installation test-purge-old-images test-release-parity-manifest test-verify-goreleaser-snapshot test-changelog-range test-changelog-config test-build-summary test-capture-release-image-digests test-release-tag-and-branch test-release-version-format test-prepare-release test-release-plan test-release-branch-commits test-release-cutover test-release-oci-artifacts test-release-sboms test-release-controller test-release-publication test-authz-would-deny-check ## Runs unit tests, excluding kubernetes controller tests
Comment thread
DariuszPorowski marked this conversation as resolved.
Resolved
KUBEBUILDER_ASSETS="$(shell $(ENV_SETUP) use -p path ${K8S_VERSION} --arch amd64)" CGO_ENABLED=1 $(GOTEST_TOOL) ./pkg/... ./test/validation/... ./test/rogue/... $(GOTEST_OPTS)

.PHONY: test-azure-oidc-login
Expand Down Expand Up @@ -230,10 +230,6 @@ test-release-tag-and-branch: ## Tests release tag and branch reconciliation
test-release-version-format: ## Tests release SemVer validation and tag parsing
@bash ./.github/scripts/release-version-format_test.sh

.PHONY: test-monitor-remote-workflow
test-monitor-remote-workflow: ## Tests exact remote workflow dispatch correlation
@node --test ./.github/scripts/monitor-remote-workflow_test.mjs

.PHONY: test-workflow-changes
test-workflow-changes: ## Tests reusable workflow change detection
@node --test ./.github/scripts/changes_test.mjs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ Run the focused checks without registry credentials:

```bash
make install-yq
PATH="${YQ_INSTALL_DIR:-$HOME/.local/bin}:$PATH" node --test .github/scripts/bicep-types.test.mjs .github/scripts/monitor-remote-workflow_test.mjs
PATH="${YQ_INSTALL_DIR:-$HOME/.local/bin}:$PATH" node --test .github/scripts/bicep-types.test.mjs
actionlint .github/workflows/build-main.yaml .github/workflows/__publish-bicep-types.yaml
```

Expand Down Expand Up @@ -195,7 +195,7 @@ Remaining production ACR references are intentional and must be classified befor

The final retirement PR follows consumer rollout. First establish required canonical version/channel/RC/digest coverage and a CLI/container release that uses it, update supported external consumers, and finish unpublished legacy and transitional mirror-dependent releases. Public `edge` alone is insufficient. Preserve already-published plans, release branches, locks, receipts and read-only reconciliation; stopping publication does not authorize deleting ACR data or shared credentials.

The final layer retains GHCR native digest, source, retry and public-access checks; paired locks, AWS evidence, attestation, staged installation, post-approval rechecks and channel/latest eligibility remain required. Published historical resume authenticates the exact Radius tag/source, retained verified release manifest and existing AWS tag before inspecting the old workflow contract. It preserves downstream recovery but never recreates the AWS tag or regenerates missing published AWS evidence. Unsupported old contracts fail explicitly. The source retirements precede the private receiver guard; no new identity system or global credential gate is introduced.
The final layer retains GHCR native digest, source, retry and public-access checks; paired locks, AWS evidence, attestation, staged installation, post-approval rechecks and channel/latest eligibility remain required. Published resume authenticates the exact Radius tag/source, retained verified release manifest and existing AWS tag, then requires the same GHCR-only Bicep and transferred Deployment Engine contract as a new release, so a tagged workflow that still uses the retired `azure-octo/radius-publisher` or its App cannot resume. It never recreates the AWS tag or regenerates missing published AWS evidence. Unsupported old contracts fail explicitly. The source retirements precede the private receiver guard; no new identity system or global credential gate is introduced.

## Verification

Expand Down
8 changes: 4 additions & 4 deletions docs/contributing/contributing-releases/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Backport selection, collection, preparation, and their tests live only in the [s
- Give the release App Contents write and Workflows write on `radius`, `recipes`, `dashboard`, `bicep-types-aws`, and `deployment-engine`. Workflows write permits backporting workflow changes and satisfies GitHub's release-creation authorization when the pinned commit changes workflows relative to the default branch. Each job requests these permissions only for its target repositories; grant/approve the App installation permissions separately before rollout. Release entries use the existing approved tags; publishing them does not edit workflows, create source commits, or change registry aliases.
- The controller creates the matching **Deployment Engine tag** in `radius-project/deployment-engine` after release approval when GitHub reports it missing; any other lookup error stops validation. It tags Deployment Engine `main` for an RC or patch. A final releases the Deployment Engine commit that its last RC locked on `automation/release-state-<rc-version>`; that RC's Deployment Engine tag, and an existing final tag, must still point there, so cut another RC to release a different commit. Prepare Release checks that commit, and the controller shows it in the validation summary before approval. Only `radius-release` pushes the automated tag, at an existing commit; the controller creates no Deployment Engine commits. The tag push starts the Deployment Engine tag build, which stages the image that the controller then verifies and locks. To release a commit that is not on `main`, such as a hotfix, push a signed annotated tag before preparation instead: in a clean Deployment Engine clone, run `git tag -s <version> -m "release tag <version>" <commit>`, then `git push origin <version>`. GitHub must verify that signature; an unsigned tag is accepted only at a GitHub-verified commit on `main`. Never manually tag the Radius repositories.
- Deploy the coordinated publishers before using this Radius pipeline. Bicep releases require native GHCR producers, the immutable AWS/Radius paired lock, and anonymous access to both full-version references; no private Bicep copy or promotion receiver is used after retirement. Finish the [transitional Bicep handoff](#ordered-merge-and-writer-handoff) before disabling its old receivers. For Deployment Engine, drain old mirror runs and retire the private DE copy receiver before activating the direct publisher. The approved commit must include `.github/workflows/build-and-push.yaml` from the transferred repository. A final cannot promote an RC that predates this publisher; cut a new RC instead. Dashboard release builds must stage full-version tags without updating channels. Production Azure remains private.
- Before switching the Deployment Engine controller on `main`, list every approved but unpublished Radius release, including drafts with a staged image. At each **approved Radius SHA**, check that `engine-token` in `build-release.yaml` uses `RADIUS_RELEASE_BOT_*` for `radius-project/deployment-engine`. Without a verified published manifest, the controller rejects a workflow that still targets `azure-octo` or uses the publisher credentials. A backport does not change an already approved SHA. Finish affected releases on a compatible path before cutover, or record a maintainer-approved break-glass decision for each in the release thread. Published releases may resume with their original tagged workflows; retain `RADIUS_PUBLISHER_BOT_*` and its installation access while those retries are supported. Do not move tags or treat a staged image as a published manifest.
- Before switching the Deployment Engine controller on `main`, list every approved but unpublished Radius release, including drafts with a staged image. At each **approved Radius SHA**, check that `engine-token` in `build-release.yaml` uses `RADIUS_RELEASE_BOT_*` for `radius-project/deployment-engine`. Without a verified published manifest, the controller rejects a workflow that still targets `azure-octo` or uses the publisher credentials. A backport does not change an already approved SHA. Finish affected releases on a compatible path before cutover, or record a maintainer-approved break-glass decision for each in the release thread. The controller applies the same check, and the GHCR-only Bicep check, when it resumes a published release, so no release workflow may use the retired `azure-octo/radius-publisher` repository, its App, or `RADIUS_PUBLISHER_BOT_*`. Do not move tags or treat a staged image as a published manifest.
- Use the Teams release thread for approvals and exceptional recovery. Set the optional `RELEASE_TEAMS_WEBHOOK` secret to an HTTPS Adaptive Card endpoint for automated updates. GitHub summaries remain authoritative when notifications are unavailable.

### Confirm readiness before the first production cycle
Expand Down Expand Up @@ -175,7 +175,7 @@ Pair reconciliation has package-read permission; finalization uses its existing

Writes are not transactional. Finalization retains a 24-minute operation budget inside its 30-minute job, reserving time for receipts. Inspect `bicep-publication-<run-id>-<attempt>`: `receipt.json` records finalization status/errors and `ghcr-receipt.json` records partial aliases. Retry against the same immutable lock; exact readback reconciles uncertain writes without recopying verified aliases. Old mirror receipts remain historical evidence and are not rewritten.

Published historical resume authenticates the exact Radius tag/source and retained verified `release-manifest.json`, then checks the historical workflow contract rather than requiring the new writer. It also requires the existing AWS tag at the frozen source, skips recreating that tag, and rejects missing published GHCR AWS evidence before collection/dispatch. API, provenance and unsupported-contract failures stop recovery. Bicep producers and finalizers remain skipped for published releases; existing Deployment Engine, sibling-release, docs and samples recovery is retained. Historical ACR inspection does not backfill artifacts or repair aliases.
Published resume authenticates the exact Radius tag/source and retained verified `release-manifest.json`, then requires the same GHCR-only Bicep and transferred Deployment Engine contract as a new release. A tagged workflow that still reaches the retired `azure-octo/radius-publisher` or its App cannot resume. It also requires the existing AWS tag at the frozen source, skips recreating that tag, and rejects missing published GHCR AWS evidence before collection/dispatch. API, provenance and unsupported-contract failures stop recovery. Bicep producers and finalizers remain skipped for published releases; existing Deployment Engine, sibling-release, docs and samples recovery is retained. Historical ACR inspection does not backfill artifacts or repair aliases.

GHCR Bicep `latest` means newest stable and `edge` means development; only legacy ACR Bicep `latest` retains its development meaning. Dashboard and Deployment Engine images follow the same newest-stable `latest` and main-only `edge` policy as other release images.

Expand Down Expand Up @@ -224,7 +224,7 @@ Authenticated AWS evidence is stored once in `.github/release-state/bicep-extens

#### Ordered merge and writer handoff

Steps 1-7 describe the transitional dual-publish rollout. They remain prerequisites/history, not instructions to restore removed callers after final retirement.
The handoff is complete and `azure-octo/radius-publisher` is retired. No `radius-project` workflow may dispatch to it, mint a token for it or its App, or use `RADIUS_PUBLISHER_BOT_*`, and the controller rejects release sources, published or not, whose tagged workflows still do. Steps 1-7 record the completed transitional dual-publish rollout. They are history, not instructions to restore removed callers or receivers.

1. Deploy and test private copy capability from [azure-octo/radius-publisher#38](https://github.com/azure-octo/radius-publisher/pull/38) first. Prepare the corrected Radius and AWS callers before the first public GHCR edge/cutover. Keep private Azure authority and both staging events plus the promotion receiver; do not disable the service or remove shared credentials.
2. Build on the merged release foundation in dependency order: cloud isolation, main publishing (#13119), R1 (#13179), R2 (#13177), and R3 (#13178). The AWS companion and private-copy caller are merged in [radius-project/bicep-types-aws#321](https://github.com/radius-project/bicep-types-aws/pull/321) and [radius-project/bicep-types-aws#322](https://github.com/radius-project/bicep-types-aws/pull/322); include their required source support in the frozen sibling and retain original-snapshot recovery. Their legacy tag-only publisher remains for releases before R3 activation. At the coordinated handoff, drain old plans and retire that generation route before tagging a new `ghcr-v1` release: it must not independently generate ACR bytes for the same version that R3 will copy by digest. A1 staging alone does not establish GHCR/ACR parity.
Expand All @@ -250,7 +250,7 @@ Preserve private `test/radius` and `test/aws`, Deployment Engine, Static Web App

Final retirement order is **verified GHCR consumer coverage and completed old work -> both source caller retirements -> private receiver guard last**. Finish unpublished legacy plans and transitional GHCR releases whose tagged workflows still require mirrors; drain old queued/running source and receiver revisions. A new-main guard cannot retroactively change tagged workflow code. Coordinate AWS caller retirement in [radius-project/bicep-types-aws#389](https://github.com/radius-project/bicep-types-aws/pull/389), then private guard [azure-octo/radius-publisher#40](https://github.com/azure-octo/radius-publisher/pull/40). Required versioned packages, supported external consumers and real RC/stable rehearsals must be verified; these code changes do not assert readiness or perform activation.

Published historical releases retain read-only ACR reconciliation and existing downstream recovery. Unpublished legacy or mirror-dependent sources are rejected by the current controller before mutation. Never rewrite an approved plan, move an existing tag or replace a lock to evade that rejection. Keep ACR data, explicit Test routes, unrelated images/recipes/services and shared credentials. See the [migration design](../../../eng/design-notes/tools/2026-09-bicep-extension-ghcr-migration.md#parallel-execution-and-queueing).
The current controller rejects legacy or mirror-dependent sources before mutation, including when resuming a published release. Never rewrite an approved plan, move an existing tag or replace a lock to evade that rejection. Keep ACR data, explicit Test routes, unrelated images/recipes/services and shared credentials. See the [migration design](../../../eng/design-notes/tools/2026-09-bicep-extension-ghcr-migration.md#parallel-execution-and-queueing).

Default parity inspection reads the release source's `targets.json`. Published releases predating that file, such as `v0.60.0` and `v0.60.1`, use the frozen [legacy inventory](../../../.github/release-parity/legacy-targets.json) only when GitHub confirms both the targets file and that version's release plan are absent (HTTP 404). This inventory preserves the original parity tooling's ACR channel references and historical test images; it does not inherit current GHCR defaults. Staged releases, a present approved plan with missing targets, authentication failures and network errors never take this fallback. Explicit `RELEASE_PARITY_TARGETS` or `--plan-file` inputs retain their existing behavior.

Expand Down
Loading
Loading