Skip to content

Rename Recipe Packs recipeKind/recipeLocation to kind/source#12104

Draft
willdavsmith wants to merge 1 commit into
mainfrom
willdavsmith/recipepacks-kind-source-version
Draft

Rename Recipe Packs recipeKind/recipeLocation to kind/source#12104
willdavsmith wants to merge 1 commit into
mainfrom
willdavsmith/recipepacks-kind-source-version

Conversation

@willdavsmith

@willdavsmith willdavsmith commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Description

Updates the Radius.Core/recipePacks@2025-08-01-preview schema for #11879, ahead of public launch:

Changes are made in the TypeSpec source of truth and propagated through the codegen pipeline; downstream OpenAPI/swagger, the Go SDK (zz_generated_*), and Bicep types are regenerated. Hand-written datamodel, versioned conversion, internal recipes types, configloader, CLI display, tests, and fixtures are updated to match.

Type of change

  • This pull request adds or changes features of Radius and has an approved issue (issue link required).

Fixes: #11879

Related PRs (merge together)

This is a breaking schema change for a preview API, so the producer/consumer repos must ship alongside this PR:

Warning

Breaking change (preview API): recipeKind/recipeLocation are renamed to kind/source for Radius.Core/recipePacks@2025-08-01-preview. Existing preview recipe packs must be re-authored with the new field names. This is intentionally landed during preview, before public launch, to avoid a breaking change post-GA.

Contributor checklist

  • An overview of proposed schema changes is included in a linked GitHub issue.
    • Yes
  • A design document is added or updated under eng/design-notes/, if new APIs are being introduced.
    • Not applicable
  • A PR for resource-types-contrib is created, if resource types or recipes are affected.
    • Yes
  • A PR for dashboard is created, if the Radius Dashboard is affected.
    • Yes
  • A PR for the documentation repository is created, if the changes affect documentation or user-facing behavior.
    • Yes

Copilot AI review requested due to automatic review settings June 15, 2026 16:52
@willdavsmith willdavsmith requested review from a team as code owners June 15, 2026 16:52
@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown

Dependency Review

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

Scanned Files

None

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

Updates the Radius.Core/recipePacks@2025-08-01-preview contract to remove redundant recipe* prefixes (recipeKindkind, recipeLocationsource) and introduces an optional version field intended for Terraform registry modules, plumbing it through the internal recipe/environment types and Terraform module config generation.

Changes:

  • Rename Recipe Pack recipe fields to kind/source across TypeSpec → OpenAPI/Swagger → generated Go models → CLI/tests/fixtures.
  • Add optional version to RecipeDefinition and wire it into EnvironmentDefinition.TemplateVersion for Terraform module config generation.
  • Regenerate/update downstream artifacts (Swagger examples, Bicep types, SDK serde) and adjust functional/CLI/controller tests and fixtures.

Reviewed changes

Copilot reviewed 34 out of 37 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
typespec/Radius.Core/recipePacks.tsp Source-of-truth schema rename to kind/source and adds optional version.
typespec/Radius.Core/examples/2025-08-01-preview/RecipePacks_ListByScope.json Update example payload keys to kind/source.
typespec/Radius.Core/examples/2025-08-01-preview/RecipePacks_List.json Update example payload keys to kind/source.
typespec/Radius.Core/examples/2025-08-01-preview/RecipePacks_Get.json Update example payload keys to kind/source.
typespec/Radius.Core/examples/2025-08-01-preview/RecipePacks_CreateOrUpdate.json Update example payload keys and demonstrates Terraform version.
test/functional-portable/dynamicrp/noncloud/resources/testdata/tfbicep-combined-test.bicep Update Bicep testdata to kind/source.
test/functional-portable/dynamicrp/noncloud/resources/testdata/terraformconfig-redis-test.bicep Update Bicep testdata to kind/source.
test/functional-portable/dynamicrp/noncloud/resources/testdata/recipepacks-test.bicep Update Bicep testdata to kind/source.
test/functional-portable/dynamicrp/noncloud/resources/testdata/recipepacks-test-no-provider.bicep Update Bicep testdata to kind/source.
test/functional-portable/cli/noncloud/testdata/corerp-recipe-pack-test.bicep Update CLI functional test template to kind/source.
swagger/specification/radius/resource-manager/Radius.Core/preview/2025-08-01-preview/openapi.json Regenerated OpenAPI for renamed fields + new version field.
swagger/specification/radius/resource-manager/Radius.Core/preview/2025-08-01-preview/examples/RecipePacks_ListByScope.json Regenerated Swagger example keys to kind/source.
swagger/specification/radius/resource-manager/Radius.Core/preview/2025-08-01-preview/examples/RecipePacks_Get.json Regenerated Swagger example keys to kind/source.
swagger/specification/radius/resource-manager/Radius.Core/preview/2025-08-01-preview/examples/RecipePacks_CreateOrUpdate.json Regenerated Swagger example keys and shows Terraform version.
pkg/ucp/initializer/service_test.go Updates schema-hydration assertions for kind/source.
pkg/recipes/types.go Renames internal recipe definition fields and adds Version.
pkg/recipes/configloader/environment.go Maps recipe pack versionEnvironmentDefinition.TemplateVersion.
pkg/corerp/frontend/controller/recipepacks/testdata/recipepack_datamodel.json Updates controller testdata JSON to kind/source.
pkg/corerp/frontend/controller/recipepacks/createorupdaterecipepack_test.go Updates controller tests for renamed fields in v20250801preview models/datamodel.
pkg/corerp/frontend/controller/environments/v20250801preview/createorupdateenvironment_test.go Updates environment validation tests for renamed fields.
pkg/corerp/datamodel/recipepack.go Datamodel rename to kind/source and adds version,omitempty.
pkg/corerp/datamodel/converter/recipepack_converter_test.go Updates converter tests to renamed fields.
pkg/corerp/api/v20250801preview/zz_generated_models.go Regenerated SDK model: Kind, Source, optional Version.
pkg/corerp/api/v20250801preview/zz_generated_models_serde.go Regenerated JSON serde for kind/source/version.
pkg/corerp/api/v20250801preview/testdata/recipepackresourcedatamodel.json Updates conversion fixture JSON keys, includes version.
pkg/corerp/api/v20250801preview/testdata/recipepackresource.json Updates conversion fixture JSON keys, includes version.
pkg/corerp/api/v20250801preview/recipepack_conversion.go Updates versioned↔datamodel conversion to map kind/source/version.
pkg/corerp/api/v20250801preview/recipepack_conversion_test.go Extends conversion tests to cover renamed fields and version.
pkg/cli/test_client_factory/radius_core.go Updates fake server payloads to kind/source.
pkg/cli/recipepack/recipepack.go Updates default recipe pack creation to set Kind/Source.
pkg/cli/recipepack/recipepack_test.go Updates tests for renamed fields.
pkg/cli/objectformats/objectformats.go Updates table headings/JSONPaths to Kind/Source.
pkg/cli/cmd/recipepack/show/show_test.go Updates recipe pack show command test payloads.
pkg/cli/cmd/recipepack/show/display.go Updates display labels and prints Version when present.
pkg/cli/cmd/env/show/preview/show.go Updates env show preview recipe projection to Kind/Source.
pkg/cli/cmd/env/show/preview/show_test.go Updates env show preview tests for renamed fields.
hack/bicep-types-radius/generated/radius/radius.core/2025-08-01-preview/types.json Regenerated Bicep types to expose kind/source/version.
Files not reviewed (2)
  • pkg/corerp/api/v20250801preview/zz_generated_models.go: Generated file
  • pkg/corerp/api/v20250801preview/zz_generated_models_serde.go: Generated file

Comment on lines +368 to 370
recipeKindProperty := requireSchemaProperty(t, recipeDefinitionProperties, "kind")
assert.NotContains(t, recipeKindProperty, "$ref")
assert.Equal(t, "string", recipeKindProperty["type"])
Comment on lines +18 to +19
"kind": "Bicep",
"source": "br:ghcr.io/radius-project/recipes/kubernetes-container:latest",
Comment on lines +27 to +29
"kind": "Terraform",
"source": "oci://ghcr.io/radius-project/recipes/terraform/redis:latest",
"version": "1.2.3",
Comment on lines +62 to +70
require.Equal(t, "Bicep", container.Kind)
require.Equal(t, "br:ghcr.io/radius-project/recipes/kubernetes-container:latest", container.Source)
require.Empty(t, container.Version)

stateStore := recipePack.Properties.Recipes["Applications.Dapr/stateStores"]
require.NotNil(t, stateStore)
require.Equal(t, "Terraform", stateStore.Kind)
require.Equal(t, "oci://ghcr.io/radius-project/recipes/terraform/redis:latest", stateStore.Source)
require.Equal(t, "1.2.3", stateStore.Version)
Comment on lines +30 to +31
"kind": "Bicep",
"source": "br:ghcr.io/radius-project/recipes/kubernetes-container:latest",
@codecov

codecov Bot commented Jun 15, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 55.55556% with 24 lines in your changes missing coverage. Please review.
✅ Project coverage is 52.27%. Comparing base (7b81a1c) to head (20b784b).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pkg/cli/test_client_factory/radius_core.go 0.00% 10 Missing ⚠️
pkg/cli/objectformats/objectformats.go 0.00% 8 Missing ⚠️
pkg/recipes/configloader/environment.go 0.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #12104      +/-   ##
==========================================
+ Coverage   52.26%   52.27%   +0.01%     
==========================================
  Files         736      736              
  Lines       47043    47043              
==========================================
+ Hits        24587    24593       +6     
+ Misses      20102    20099       -3     
+ Partials     2354     2351       -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.

@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown

Unit Tests

    2 files  ±0    439 suites  ±0   7m 20s ⏱️ -7s
5 366 tests ±0  5 364 ✅ ±0  2 💤 ±0  0 ❌ ±0 
6 546 runs  ±0  6 544 ✅ ±0  2 💤 ±0  0 ❌ ±0 

Results for commit 20b784b. ± Comparison against base commit 7b81a1c.

♻️ This comment has been updated with latest results.

Implements #11879 for Radius.Core/recipePacks@2025-08-01-preview.

Renames RecipeDefinition.recipeKind -> kind and recipeLocation -> source.
parameters/outputs stay unprefixed.

Updates the TypeSpec source of truth and regenerates OpenAPI/swagger, the Go SDK,
and Bicep types. Also updates the datamodel, versioned conversion, internal
recipes types, configloader, CLI display, tests, and fixtures.

BREAKING CHANGE: recipeKind/recipeLocation are renamed to kind/source for the
Radius.Core/recipePacks preview API. Existing preview recipe packs must be
re-authored with the new field names.
@willdavsmith willdavsmith force-pushed the willdavsmith/recipepacks-kind-source-version branch from 8495442 to 20b784b Compare June 15, 2026 18:18
willdavsmith added a commit to radius-project/dashboard that referenced this pull request Jun 15, 2026
The Radius.Core/recipePacks@2025-08-01-preview schema renames
RecipeDefinition.recipeKind -> kind and recipeLocation -> source. Updates the
dashboard to consume the new field names.

Companion to radius-project/radius#12104 (implements radius-project/radius#11879).
willdavsmith added a commit to radius-project/dashboard that referenced this pull request Jun 15, 2026
The Radius.Core/recipePacks@2025-08-01-preview schema renames
RecipeDefinition.recipeKind -> kind and recipeLocation -> source. Updates the
dashboard to consume the new field names.

Companion to radius-project/radius#12104 (implements radius-project/radius#11879).
willdavsmith added a commit to radius-project/docs that referenced this pull request Jun 15, 2026
Updates the Radius.Core/recipePacks@2025-08-01-preview reference to match the
renamed schema: RecipeDefinition.recipeKind -> kind and recipeLocation -> source
(radius-project/radius#11879). Refreshes the plainHttp/source descriptions to
match the updated Bicep type @doc strings, and removes the now-unused
recipeKind/recipeLocation entries from the spell dictionary.

Companion to radius-project/radius#12104.
@willdavsmith willdavsmith changed the title Rename Recipe Packs recipeKind/recipeLocation to kind/source and add version field Rename Recipe Packs recipeKind/recipeLocation to kind/source Jun 15, 2026
@radius-functional-tests

radius-functional-tests Bot commented Jun 15, 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 20b784b
Unique ID funce40a500111
Image tag pr-funce40a500111
  • gotestsum 1.13.0
  • KinD: v0.29.0
  • 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-funce40a500111
  • 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-funce40a500111
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-funce40a500111
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-funce40a500111
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-funce40a500111
  • 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 ucp-cloud functional tests...
⌛ Starting corerp-cloud functional tests...
✅ ucp-cloud functional tests succeeded
✅ corerp-cloud functional tests succeeded

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.

Rename recipeKind and recipeLocation to kind and source in Recipe Packs

2 participants