Skip to content

Pass RADIUS_STATE_* vars to rad startup/shutdown in deploy workflows#12472

Merged
sk593 merged 1 commit into
mainfrom
sk593/wire-oci-state-registry-into-deploy-workflows
Jul 17, 2026
Merged

Pass RADIUS_STATE_* vars to rad startup/shutdown in deploy workflows#12472
sk593 merged 1 commit into
mainfrom
sk593/wire-oci-state-registry-into-deploy-workflows

Conversation

@sk593

@sk593 sk593 commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Description

Deploys dispatched through the Radius canvas extension fail in the Restore Radius state step with:

Error: failed to open state archive: OCI archive repository is not configured; set RADIUS_STATE_REGISTRY or RADIUS_GRAPH_REGISTRY
Command failed: ... rad startup

Root cause

The canvas extension provisions the OCI state package and sets these environment-scoped GitHub variables on the target GitHub Environment at environment-creation time:

  • RADIUS_STATE_BACKEND (e.g. oci)
  • RADIUS_STATE_REGISTRY (e.g. ghcr.io/<owner>/<repo>-radius-state-<env>-<hash>)
  • RADIUS_STATE_ARCHIVE (e.g. radius-state)

But the deploy workflow templates never map these into the process environment, so rad startup (shared restore-state action) and rad shutdown (shared teardown action) never see them. run-rad-commands-azure.yml / run-rad-commands-aws.yml only expose ENVIRONMENT, APP_FILE, APP_IMAGE, and recipe-pack vars.

Fix

Add a job-level env: block to the deploy job in both run-rad-commands-azure.yml and run-rad-commands-aws.yml exposing the three RADIUS_STATE_* vars.

Job level is deliberate: environment-scoped vars.* only resolve within a job that declares environment:, and a job-level env: is inherited by every step — including the shared restore-state/teardown composite actions where rad startup/rad shutdown run, plus the deploy/app-graph commands.

    env:
      RADIUS_STATE_BACKEND: ${{ vars.RADIUS_STATE_BACKEND }}
      RADIUS_STATE_REGISTRY: ${{ vars.RADIUS_STATE_REGISTRY }}
      RADIUS_STATE_ARCHIVE: ${{ vars.RADIUS_STATE_ARCHIVE }}

Type of change

  • This pull request fixes a bug in Radius and has an approved issue (issue link required).

Fixes #12471

Deploys dispatched via the Radius canvas extension failed in the Restore
Radius state step with 'OCI archive repository is not configured; set
RADIUS_STATE_REGISTRY or RADIUS_GRAPH_REGISTRY'.

The extension sets RADIUS_STATE_BACKEND / RADIUS_STATE_REGISTRY /
RADIUS_STATE_ARCHIVE as environment-scoped GitHub variables on the target
environment, but the deploy workflows never mapped them into the process
environment, so rad startup (restore-state) and rad shutdown (teardown) never
saw them.

Add a job-level env: block to run-rad-commands-azure.yml and
run-rad-commands-aws.yml exposing the three RADIUS_STATE_* vars. They're set at
job level (not workflow level) so environment-scoped vars.* resolve, and are
inherited by every step including the shared restore-state/teardown composite
actions.

Fixes #12471

Signed-off-by: sk593 <shruthikumar@microsoft.com>
Copilot AI review requested due to automatic review settings July 17, 2026 15:59
@sk593
sk593 requested review from a team as code owners July 17, 2026 15:59
@github-actions

Copy link
Copy Markdown

Dependency Review

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

Scanned Files

None

@radius-functional-tests

radius-functional-tests Bot commented Jul 17, 2026

Copy link
Copy Markdown

Radius functional test overview

🔍 Go to test action run

Click here to see the test run details
Name Value
Repository radius-project/radius
Commit ref e2bd012
Unique ID func02c475133b
Image tag pr-func02c475133b
  • Dapr: 1.14.4
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.3.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/testrecipes/test-bicep-recipes/<name>:pr-func02c475133b
  • Terraform recipe location http://tf-module-server.radius-test-tf-module-server.svc.cluster.local/<name>.zip (in cluster)
  • applications-rp test image location: ghcr.io/radius-project/dev/applications-rp:pr-func02c475133b
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-func02c475133b
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-func02c475133b
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-func02c475133b
  • deployment-engine test image location: ghcr.io/radius-project/deployment-engine:latest

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting corerp-cloud functional tests...
⌛ Starting ucp-cloud functional tests...
✅ ucp-cloud functional tests succeeded
✅ corerp-cloud functional tests succeeded

@sk593 sk593 added the bug Something is broken or not working as expected label Jul 17, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes GitHub Actions deploy failures triggered by the Radius canvas extension by ensuring environment-scoped RADIUS_STATE_* GitHub Environment variables are surfaced into the job process environment so the shared restore-state (rad startup) and teardown (rad shutdown) composite actions can access the OCI state archive configuration.

Changes:

  • Add job-level env: mappings for RADIUS_STATE_BACKEND, RADIUS_STATE_REGISTRY, and RADIUS_STATE_ARCHIVE in the Azure deploy workflow template.
  • Add the same job-level env: mappings in the AWS deploy workflow template.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
.github/extension/run-rad-commands-azure.yml Exposes environment-scoped RADIUS_STATE_* variables at the deploy job level so rad startup/shutdown can open the OCI state archive.
.github/extension/run-rad-commands-aws.yml Mirrors the Azure workflow fix for AWS so state restore/persist works consistently across templates.

@sk593
sk593 enabled auto-merge July 17, 2026 16:09
@sk593 sk593 removed the bug Something is broken or not working as expected label Jul 17, 2026
@github-actions

Copy link
Copy Markdown

Unit Tests

    2 files  ±0    456 suites  ±0   7m 22s ⏱️ -7s
5 995 tests ±0  5 993 ✅ ±0  2 💤 ±0  0 ❌ ±0 
7 198 runs  ±0  7 196 ✅ ±0  2 💤 ±0  0 ❌ ±0 

Results for commit e2bd012. ± Comparison against base commit 9cdd784.

@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 53.41%. Comparing base (9cdd784) to head (e2bd012).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12472      +/-   ##
==========================================
- Coverage   53.42%   53.41%   -0.02%     
==========================================
  Files         762      762              
  Lines       50246    50246              
==========================================
- Hits        26843    26837       -6     
- Misses      20879    20882       +3     
- Partials     2524     2527       +3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sk593
sk593 added this pull request to the merge queue Jul 17, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 17, 2026
@sk593
sk593 added this pull request to the merge queue Jul 17, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 17, 2026
@sk593
sk593 added this pull request to the merge queue Jul 17, 2026
Merged via the queue into main with commit 67c36c6 Jul 17, 2026
78 of 79 checks passed
@sk593
sk593 deleted the sk593/wire-oci-state-registry-into-deploy-workflows branch July 17, 2026 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deploy workflows don't pass RADIUS_STATE_* vars to rad startup/shutdown (OCI state archive not configured)

3 participants