Skip to content

Add custom recipe pack support and delete workflows to Repo Radius - #12367

Merged
sk593 merged 24 commits into
mainfrom
sk593-custom-types-recipe-packs
Jul 25, 2026
Merged

sk593 merged 24 commits into
mainfrom
sk593-custom-types-recipe-packs

Conversation

@sk593

@sk593 sk593 commented Jul 10, 2026 •

Copy link
Copy Markdown
Contributor

Description

Extends the Repo Radius GitHub Actions workflow templates (.github/extension/) in two ways:

1. Custom types + recipe packs on deploy

The shared apply-custom-recipe-packs composite action, wired into both deploy provider workflows after the environment/recipe-pack is created:

  • Registers custom resource types from .radius/custom-types.yaml via rad resource-type create --from-file (skipped if absent).
  • Deploys .radius/custom-recipe-pack.bicep (skipped if absent).
  • Runs rad recipe-pack list and rad env update <env> --recipe-packs <all pack ids> --preview so the environment references both the default provider pack and the custom pack.

Both files are optional and independent.

2. Delete application / environment workflows

New workflows to delete a Radius application or environment on the same ephemeral k3d control plane the deploy flow uses:

  • delete-application.yml / delete-environment.yml — thin dispatchers that detect the provider (AZURE_CLIENT_ID / AWS_ROLE_ARN) and call the matching reusable provider workflow.
  • delete-azure.yml / delete-aws.yml — reusable provider workflows that reuse the deploy provider setup (OIDC login, cluster connect, cloud OIDC token projection, rad credential register), restore persisted state, delete, then persist the updated state again. They skip the deploy-only stages (create env, deploy recipe pack, registry creds).
  • actions/delete-resource — shared composite action running rad app delete/rad env delete <name> --yes --preview, writing a rad-delete-result JSON artifact.

Restoring state first (rad startup) lets the delete see the environment, recipe packs, resources, and Terraform state; rad shutdown (if: always() in teardown) persists the post-delete state so the next operation plans against it.

The --preview fix

rad env update, rad app delete, and rad env delete default to the legacy implementation and only use the Radius.Core surface when --preview is passed. All Radius.Core commands in these workflows now pass --preview — including the rad env update --recipe-packs call, which previously silently no-oped.

Docs

  • .github/extension/README.md — documents the delete workflows and the delete-resource action.
  • eng/design-notes/environments/2026-06-repo-radius-deploy-workflow.md — custom-types/recipe-pack subsection and a new delete-workflows section.
  • New radius-delete skill; radius-deploy skill updated for custom types.

Type of change

This pull request adds a new feature to Radius.

Validation

  • All new YAML parses (yaml.safe_load); embedded bash passes bash -n.
  • delete-resource script smoke-tested with a mocked rad: success, unsupported type, empty name, and command-failure paths all produce the correct exit code and artifact JSON.

@github-actions

Copy link
Copy Markdown

Dependency Review

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

Scanned Files

None

@codecov

codecov Bot commented Jul 10, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 53.90%. Comparing base (e2bdba2) to head (f444a25).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12367      +/-   ##
==========================================
- Coverage   53.91%   53.90%   -0.01%     
==========================================
  Files         765      765              
  Lines       50689    50689              
==========================================
- Hits        27328    27326       -2     
- Misses      20793    20794       +1     
- Partials     2568     2569       +1     

☔ 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.

@github-actions

github-actions Bot commented Jul 10, 2026 •

Copy link
Copy Markdown

Unit Tests

    2 files  ±0    457 suites  ±0   7m 23s ⏱️ -6s
6 075 tests ±0  6 073 ✅ ±0  2 💤 ±0  0 ❌ ±0 
7 294 runs  ±0  7 292 ✅ ±0  2 💤 ±0  0 ❌ ±0 

Results for commit f444a25. ± Comparison against base commit e2bdba2.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Jul 10, 2026 •

Copy link
Copy Markdown

Functional Tests - statestore-noncloud

2 tests  ±0   2 ✅ ±0   3m 3s ⏱️ +2s
1 suites ±0   0 💤 ±0 
1 files   ±0   0 ❌ ±0 

Results for commit e8a928e. ± Comparison against base commit 56c0207.

♻️ This comment has been updated with latest results.

@sk593 sk593 changed the title Add custom recipe pack support to run-rad-commands workflows Add custom recipe pack support and delete workflows to Repo Radius Jul 13, 2026
@sk593
sk593 force-pushed the sk593-custom-types-recipe-packs branch from 38ef80d to e8a928e Compare July 20, 2026 21:36
@sk593 sk593 added the pr:standard Ongoing maintenance, minor improvements, documentation updates, and routine development work label Jul 20, 2026
@github-actions

github-actions Bot commented Jul 20, 2026 •

Copy link
Copy Markdown

Functional Tests - ucp-cloud

4 tests  ±0   4 ✅ ±0   33s ⏱️ -4s
1 suites ±0   0 💤 ±0 
1 files   ±0   0 ❌ ±0 

Results for commit 6ba9677. ± Comparison against base commit 5b3b50e.

♻️ This comment has been updated with latest results.

Copilot AI review requested due to automatic review settings July 21, 2026 20:56
@sk593
sk593 marked this pull request as ready for review July 21, 2026 20:56
@sk593
sk593 requested review from a team as code owners July 21, 2026 20:56
sk593 and others added 5 commits July 21, 2026 14:00
Deploy any *recipe-pack*.bicep files in the app's .radius/ folder, then
list all recipe packs and update the environment to reference all of
them via rad env update --recipe-packs. Provider-agnostic logic lives in
a new shared apply-custom-recipe-packs composite action wired into both
the Azure and AWS workflows.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: sk593 <shruthikumar@microsoft.com>
Register custom resource types from .radius/custom-types.yaml via
rad resource-type create --from-file before deploying the recipe pack,
and use the fixed .radius/custom-recipe-pack.bicep filename instead of a
glob. Each file is optional and independent.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: sk593 <shruthikumar@microsoft.com>
…view

Add Repo Radius workflows to delete a Radius application or environment on
the same ephemeral k3d control plane the deploy flow uses. Two thin
dispatchers (delete-application.yml, delete-environment.yml) detect the
provider and call reusable provider workflows (delete-azure.yml,
delete-aws.yml), which restore persisted state, delete via the shared
delete-resource composite action, and persist the updated state again.

delete-resource runs `rad app delete`/`rad env delete <name> --yes
--preview` and writes a rad-delete-result artifact. `--preview` is required
so these commands use the Radius.Core surface instead of the legacy path;
apply the same fix to the `rad env update --recipe-packs` call.

Document the delete workflows in the extension README, the deploy design
note, and a new radius-delete skill.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: sk593 <shruthikumar@microsoft.com>
The delete provider workflows restore and persist Radius control-plane
state via rad startup / rad shutdown, but they lacked the OCI-backed
state-archive configuration the deploy workflows now use. As a result
rad startup would fail with 'OCI archive repository is not configured;
set RADIUS_STATE_REGISTRY or RADIUS_GRAPH_REGISTRY', or fall back to a
different backend than deploy wrote, so the delete could not find the
state it needed to plan recipe deletes.

Mirror the deploy provider workflows in delete-aws.yml and
delete-azure.yml:
- set the job-level RADIUS_STATE_BACKEND / RADIUS_STATE_REGISTRY /
  RADIUS_STATE_ARCHIVE env vars from environment-scoped vars.* so the
  shared restore-state and teardown actions can open the archive,
- add a GHCR docker login before restore-state so the private
  radius-state package pull/push authenticates instead of 401ing, and
- raise packages: read to packages: write since rad shutdown now pushes
  the updated state artifact to GHCR.

Update the README to note the delete workflows log in to GHCR and set
the RADIUS_STATE_* variables for the OCI-backed state archive.

Signed-off-by: sk593 <shruthikumar@microsoft.com>

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The delete-aws.yml / delete-azure.yml reusable workflows now request
packages: write to push the OCI-backed state archive to GHCR. A called
workflow cannot request more permissions than its caller grants, so the
delete-application.yml and delete-environment.yml dispatchers failed at
validation with 'is requesting packages: write, but is only allowed
packages: read'. Raise both dispatchers to packages: write to match.

Signed-off-by: sk593 <shruthikumar@microsoft.com>

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

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 extends the Repo Radius GitHub Actions workflow templates under .github/extension/ to support (1) optional custom resource type registration + custom recipe pack deployment/attachment during deploy, and (2) new delete workflows for applications/environments that reuse the same ephemeral k3d control plane + persisted state model as deploy.

Changes:

  • Add apply-custom-recipe-packs composite action and wire it into both provider deploy workflows to optionally register .radius/custom-types.yaml, deploy .radius/custom-recipe-pack.bicep, and update the env recipe pack list.
  • Add delete workflow templates (delete-application.yml / delete-environment.yml) plus provider reusable workflows (delete-azure.yml / delete-aws.yml) and a shared delete-resource composite action that emits a rad-delete-result artifact.
  • Update extension docs/design notes and add a radius-delete skill describing how to dispatch and what the workflows do.

Reviewed changes

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

Show a summary per file
File Description
eng/design-notes/environments/2026-06-repo-radius-deploy-workflow.md Documents custom type/recipe-pack behavior and introduces the delete workflow design section.
.github/extension/skills/radius-delete/SKILL.md Adds a new skill describing how to dispatch the delete workflows and interpret outcomes.
.github/extension/run-rad-commands-azure.yml Wires in the new apply-custom-recipe-packs action after env/pack creation.
.github/extension/run-rad-commands-aws.yml Wires in the new apply-custom-recipe-packs action after env/pack creation.
.github/extension/README.md Documents the new composite actions and delete workflow contract/behavior.
.github/extension/delete-environment.yml Adds a dispatcher workflow to delete an environment via provider detection.
.github/extension/delete-azure.yml Adds reusable Azure delete workflow: restore state → delete → persist state.
.github/extension/delete-aws.yml Adds reusable AWS delete workflow: restore state → delete → persist state.
.github/extension/delete-application.yml Adds a dispatcher workflow to delete an application via provider detection.
.github/extension/actions/delete-resource/action.yml Adds a shared composite action to run rad app/env delete --yes --preview and upload a result artifact.
.github/extension/actions/apply-custom-recipe-packs/action.yml Adds a shared composite action to register custom types, deploy a custom pack, and update env recipe packs (preview).

Comment thread eng/design-notes/environments/2026-06-repo-radius-deploy-workflow.md Outdated
Comment thread .github/extension/README.md Outdated
@sk593
sk593 force-pushed the sk593-custom-types-recipe-packs branch from 231409c to 0c82d6d Compare July 21, 2026 21:03
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Shruthi Kumar <shruthikumar@microsoft.com>
Copilot AI review requested due to automatic review settings July 21, 2026 21:04
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Shruthi Kumar <shruthikumar@microsoft.com>
@sk593
sk593 force-pushed the sk593-custom-types-recipe-packs branch from 9961856 to 6ba9677 Compare July 21, 2026 21:05

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

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

Comment thread .github/extension/actions/apply-custom-recipe-packs/action.yml Outdated
Comment thread .github/extension/actions/apply-custom-recipe-packs/action.yml Outdated
Copilot AI review requested due to automatic review settings July 21, 2026 21:09

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

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

Comments suppressed due to low confidence (2)

.github/extension/actions/apply-custom-recipe-packs/action.yml:65

  • Avoid dumping the entire custom recipe-pack Bicep file into workflow logs. This file is repo-defined and could contain sensitive configuration (or simply be large/noisy); logging the path is enough for debugging.
        echo "Custom recipe pack file:"
        cat "$RECIPE_PACK_BICEP"
        echo ""
        echo "Deploying custom recipe pack from $RECIPE_PACK_BICEP..."
        rad deploy "$RECIPE_PACK_BICEP"

.github/extension/actions/apply-custom-recipe-packs/action.yml:72

  • When building PACK_IDS, filter out missing/null .id values. RecipePackResource.ID is read-only and can be omitted/null in some responses; passing "null" through to rad env update --recipe-packs will fail in a confusing way.
        echo "Listing recipe packs..."
        PACK_IDS=$(rad recipe-pack list -o json | jq -r '(if type == "array" then . else [.] end) | map(.id) | join(",")')

sylvainsf
sylvainsf previously approved these changes Jul 24, 2026

@sylvainsf sylvainsf 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.

🚢

@sk593
sk593 force-pushed the sk593-custom-types-recipe-packs branch from f7ce4b1 to 2212d53 Compare July 24, 2026 21:34
@sk593
sk593 enabled auto-merge July 24, 2026 21:34
@sk593
sk593 added this pull request to the merge queue Jul 24, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Jul 24, 2026
Resolve README conflict from #12510 (registry creds injected into the app
deploy instead of a control-plane Secret). Keep the custom-types /
recipe-pack step and the OCI state-archive wording; adopt main's updated
run-rad-commands step and drop the obsolete control-plane registry-cred
provisioning step. Renumber the deploy stages accordingly.

Signed-off-by: sk593 <shruthikumar@microsoft.com>

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 24, 2026 22:14

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

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

Comment thread .github/extension/delete-azure.yml Outdated
Comment thread .github/extension/delete-aws.yml Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: sk593 <shruthikumar@microsoft.com>
Copilot AI review requested due to automatic review settings July 24, 2026 22:20
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: sk593 <shruthikumar@microsoft.com>
@radius-functional-tests

radius-functional-tests Bot commented Jul 24, 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 eb1226a
Unique ID func850d95416a
Image tag pr-func850d95416a
  • 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-func850d95416a
  • 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-func850d95416a
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-func850d95416a
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-func850d95416a
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-func850d95416a
  • 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...
✅ ucp-cloud functional tests succeeded
✅ ucp-cloud functional tests succeeded
✅ Recipe publishing succeeded
⌛ Starting corerp-cloud functional tests...
✅ corerp-cloud functional tests succeeded
⌛ Starting ucp-cloud functional tests...
✅ corerp-cloud functional tests succeeded
❌ corerp-cloud functional test failed. Please check the logs for more details
✅ ucp-cloud functional tests succeeded
✅ corerp-cloud functional tests succeeded

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

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

@sk593
sk593 force-pushed the sk593-custom-types-recipe-packs branch from eb1226a to f444a25 Compare July 24, 2026 22:30
@radius-functional-tests

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 f444a25
Unique ID funce49959627c
Image tag pr-funce49959627c
  • 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-funce49959627c
  • 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-funce49959627c
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-funce49959627c
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-funce49959627c
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-funce49959627c
  • deployment-engine test image location: ghcr.io/radius-project/deployment-engine:latest

Test Status

@github-actions

github-actions Bot commented Jul 24, 2026 •

Copy link
Copy Markdown

Functional Tests - multicluster-noncloud

6 tests  ±0   6 ✅ ±0   2m 41s ⏱️ +2s
1 suites ±0   0 💤 ±0 
1 files   ±0   0 ❌ ±0 

Results for commit f444a25. ± Comparison against base commit e2bdba2.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Jul 24, 2026 •

Copy link
Copy Markdown

Functional Tests - corerp-noncloud

181 tests  ±0   179 ✅ ±0   1h 7m 15s ⏱️ -5s
  3 suites ±0     2 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit f444a25. ± Comparison against base commit e2bdba2.

♻️ This comment has been updated with latest results.

@sk593
sk593 enabled auto-merge July 24, 2026 22:51
@sk593
sk593 added this pull request to the merge queue Jul 25, 2026
Merged via the queue into main with commit e08fd69 Jul 25, 2026
87 of 90 checks passed
@sk593
sk593 deleted the sk593-custom-types-recipe-packs branch July 25, 2026 03:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:standard Ongoing maintenance, minor improvements, documentation updates, and routine development work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants