Rename Recipe Packs recipeKind/recipeLocation to kind/source#12104
Rename Recipe Packs recipeKind/recipeLocation to kind/source#12104willdavsmith wants to merge 1 commit into
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
There was a problem hiding this comment.
Pull request overview
Updates the Radius.Core/recipePacks@2025-08-01-preview contract to remove redundant recipe* prefixes (recipeKind→kind, recipeLocation→source) 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/sourceacross TypeSpec → OpenAPI/Swagger → generated Go models → CLI/tests/fixtures. - Add optional
versionto RecipeDefinition and wire it intoEnvironmentDefinition.TemplateVersionfor 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 version → EnvironmentDefinition.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
| recipeKindProperty := requireSchemaProperty(t, recipeDefinitionProperties, "kind") | ||
| assert.NotContains(t, recipeKindProperty, "$ref") | ||
| assert.Equal(t, "string", recipeKindProperty["type"]) |
| "kind": "Bicep", | ||
| "source": "br:ghcr.io/radius-project/recipes/kubernetes-container:latest", |
| "kind": "Terraform", | ||
| "source": "oci://ghcr.io/radius-project/recipes/terraform/redis:latest", | ||
| "version": "1.2.3", |
| 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) |
| "kind": "Bicep", | ||
| "source": "br:ghcr.io/radius-project/recipes/kubernetes-container:latest", |
Codecov Report❌ Patch coverage is 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. 🚀 New features to boost your workflow:
|
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.
8495442 to
20b784b
Compare
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).
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).
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.
Radius functional test overviewClick here to see the test run details
Test Status⌛ Building Radius and pushing container images for functional tests... |
Description
Updates the
Radius.Core/recipePacks@2025-08-01-previewschema for #11879, ahead of public launch:RecipeDefinition.recipeKind→kindandrecipeLocation→source.parameters/outputsstay unprefixed.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
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/recipeLocationare renamed tokind/sourceforRadius.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
eng/design-notes/, if new APIs are being introduced.