Skip to content

Remove Recipe prefix from RecipeDefinition in Radius.Core/recipePacks#11760

Draft
Copilot wants to merge 18 commits into
mainfrom
copilot/standardize-recipe-parameter-naming
Draft

Remove Recipe prefix from RecipeDefinition in Radius.Core/recipePacks#11760
Copilot wants to merge 18 commits into
mainfrom
copilot/standardize-recipe-parameter-naming

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 23, 2026

Description

Radius.Core/recipePacks used verbose, prefixed field names (recipeKind, recipeLocation, parameters) inside RecipeDefinition. Since these fields are already scoped within a recipe definition context, the "recipe" prefix is redundant. This PR removes the prefix for a cleaner UX across the full stack: TypeSpec, API models, data models, shared types, CLI labels, and all user-facing touch points.

All changes are scoped exclusively to the Radius.Core/recipePacks resource type. Applications.*/* resource types are intentionally left unchanged as they will be removed after migrating users to the new Radius.* types.

Changes

  • TypeSpec (typespec/Radius.Core/recipePacks.tsp): Renamed RecipeDefinition fields: recipeKindkind, recipeLocationlocation, parameters stays parameters
  • Generated API model (zz_generated_models.go, zz_generated_models_serde.go): Go struct fields renamed to Kind, Location, Parameters; JSON keys updated to kind, location, parameters; field ordering corrected to match code generator alphabetical order
  • Data model (pkg/corerp/datamodel/recipepack.go): Go struct fields renamed RecipeKindKind, RecipeLocationLocation; JSON tags updated to kind, location, parameters
  • Shared recipes types (pkg/recipes/types.go): RecipeDefinition struct fields renamed RecipeKindKind, RecipeLocationLocation
  • Conversion/config (recipepack_conversion.go, configloader/environment.go): field references updated to use Kind/Location on both data model and shared types
  • CLI env show (show.go): EnvRecipes struct fields renamed RecipeKindKind, RecipeLocationLocation
  • CLI table format (objectformats.go): Table column headings renamed RECIPE KINDKIND, RECIPE LOCATIONLOCATION; JSONPath references updated
  • CLI recipepack package (pkg/cli/recipepack/recipepack.go): CoreTypesRecipeInfo.RecipeLocation renamed to Location; RecipeDefinition initializations updated
  • TypeSpec example JSON files (RecipePacks_CreateOrUpdate.json, RecipePacks_List.json, RecipePacks_ListByScope.json, RecipePacks_Get.json): updated to use kind and location
  • Swagger/OpenAPI: Updated openapi.json schema definitions and all swagger example JSON files (RecipePacks_Get.json, RecipePacks_CreateOrUpdate.json, RecipePacks_ListByScope.json) to use kind and location
  • Bicep types: Updated hack/bicep-types-radius/generated/radius/radius.core/2025-08-01-preview/types.json to use kind and location
  • Test client factory (pkg/cli/test_client_factory/radius_core.go): Updated RecipeDefinition initializations to use renamed Kind/Location fields
  • Test fixtures and tests: JSON test data (recipepack_datamodel.json), converter tests, controller tests (recipepacks and environments), CLI recipepack tests, CLI show/env tests, and configloader bridge tests all updated
  • Bicep test files: Updated recipepacks-test.bicep, tfbicep-combined-test.bicep, recipepacks-test-no-provider.bicep, terraformconfig-redis-test.bicep, and corerp-recipe-pack-test.bicep to use kind and location instead of recipeKind and recipeLocation
  • Converter test fix: Corrected "plainHTTP""plainHttp" in recipepack_converter_test.go to match the API model's actual JSON serialization key, fixing a pre-existing test correctness issue where the field was silently ignored during unmarshalling
  • Design notes: Updated eng/design-notes/recipes/2025-08-recipe-packs.md to use the new field names (scoped to recipePacks only)
  • Test coverage: Added pkg/cli/test_client_factory/radius_core_test.go with tests exercising the Get handlers of WithRecipePackServerNoError, WithRecipePackServerCoreTypes, WithRecipePackServerUniqueTypes, and WithRecipePackServerConflictingTypes to cover the renamed Kind/Location fields; added TestFetchRecipeDefinition_Success in pkg/recipes/configloader/environment_v20250801_bridge_test.go covering the successful path through fetchRecipeDefinition with the renamed fields

Before / After

// Before
"recipes": {
  "Applications.Datastores/redisCaches": {
    "recipeKind": "bicep",
    "recipeLocation": "https://example.com/recipe.bicep",
    "parameters": { "tier": "basic" }
  }
}

// After
"recipes": {
  "Applications.Datastores/redisCaches": {
    "kind": "bicep",
    "location": "https://example.com/recipe.bicep",
    "parameters": { "tier": "basic" }
  }
}

CLI table output headings change from RECIPE KIND / RECIPE LOCATION to KIND / LOCATION.

Type of change

  • This pull request is a minor refactor, code cleanup, test improvement, or other maintenance task and doesn't change the functionality of Radius (issue link optional).

Contributor checklist

Please verify that the PR meets the following requirements, where applicable:

  • An overview of proposed schema changes is included in a linked GitHub issue.
    • Yes
    • Not applicable
  • A design document is added or updated under eng/design-notes/ in this repository, if new APIs are being introduced.
    • Yes
    • Not applicable
  • The design document has been reviewed and approved by Radius maintainers/approvers.
    • Yes
    • Not applicable
  • A PR for resource-types-contrib is created, if resource types or recipes are affected by the changes in this PR.
    • Yes
    • Not applicable
  • A PR for dashboard is created, if the Radius Dashboard is affected by the changes in this PR.
    • Yes
    • Not applicable
  • A PR for the documentation repository is created, if the changes in this PR affect the documentation or any user facing updates are made.
    • Yes
    • Not applicable

…eters in RecipeDefinition

Agent-Logs-Url: https://github.com/radius-project/radius/sessions/31e3b677-4d45-408c-9577-3b2566d6fdbd

Co-authored-by: Reshrahim <61033581+Reshrahim@users.noreply.github.com>
Copilot AI changed the title [WIP] Standardize recipe parameter naming across environments and recipePacks Standardize recipe parameter naming: rename parameters to recipeParameters in RecipeDefinition Apr 23, 2026
Copilot AI requested a review from Reshrahim April 23, 2026 22:51
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 23, 2026

Unit Tests

    1 files  ±  0    337 suites  +1   7m 18s ⏱️ +2s
4 972 tests  - 150  4 969 ✅  - 151  2 💤 ±0  1 ❌ +1 
4 971 runs   - 151  4 964 ✅  - 156  2 💤 ±0  5 ❌ +5 

For more details on these failures, see this check.

Results for commit 7fd5fc0. ± Comparison against base commit fae3361.

This pull request removes 156 and adds 6 tests. Note that renamed tests count towards both.
github.com/radius-project/radius/pkg/cli/cmd/deploy ‑ Test_CommandValidation
github.com/radius-project/radius/pkg/cli/cmd/deploy ‑ Test_ConfigureProviders
github.com/radius-project/radius/pkg/cli/cmd/deploy ‑ Test_ConfigureProviders/Configure_with_Applications.Core_environment
github.com/radius-project/radius/pkg/cli/cmd/deploy ‑ Test_ConfigureProviders/Configure_with_Radius.Core_environment
github.com/radius-project/radius/pkg/cli/cmd/deploy ‑ Test_ConfigureProviders/Configure_without_cloud_providers
github.com/radius-project/radius/pkg/cli/cmd/deploy ‑ Test_FetchEnvironment
github.com/radius-project/radius/pkg/cli/cmd/deploy ‑ Test_FetchEnvironment/Fetch_Applications.Core_environment_by_full_ID
github.com/radius-project/radius/pkg/cli/cmd/deploy ‑ Test_Run
github.com/radius-project/radius/pkg/cli/cmd/deploy ‑ Test_Run/Application-scoped_deployment
github.com/radius-project/radius/pkg/cli/cmd/deploy ‑ Test_Run/Deployment_that_doesn't_need_an_app_or_env
…
TestMain
github.com/radius-project/radius/pkg/cli/test_client_factory ‑ TestWithRecipePackServerConflictingTypes_Get
github.com/radius-project/radius/pkg/cli/test_client_factory ‑ TestWithRecipePackServerCoreTypes_Get
github.com/radius-project/radius/pkg/cli/test_client_factory ‑ TestWithRecipePackServerNoError_Get
github.com/radius-project/radius/pkg/cli/test_client_factory ‑ TestWithRecipePackServerUniqueTypes_Get
github.com/radius-project/radius/pkg/recipes/configloader ‑ TestFetchRecipeDefinition_Success

♻️ This comment has been updated with latest results.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 23, 2026

Codecov Report

❌ Patch coverage is 75.00000% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.94%. Comparing base (48bcd09) to head (554e3b6).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pkg/cli/objectformats/objectformats.go 0.00% 10 Missing ⚠️
pkg/recipes/configloader/environment.go 50.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #11760      +/-   ##
==========================================
+ Coverage   51.74%   51.94%   +0.20%     
==========================================
  Files         726      726              
  Lines       45605    45605              
==========================================
+ Hits        23597    23689      +92     
+ Misses      19788    19684     -104     
- Partials     2220     2232      +12     

☔ View full report in Codecov by Sentry.
📢 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.

@Reshrahim
Copy link
Copy Markdown
Contributor

@copilot - During the triage of the issue, we decided to to remove "recipe" prefix from recipeType, recipeKind and recipeLocation to reduce redundancy in the recipepack UX. Update the PR.

…RecipeDefinition

Agent-Logs-Url: https://github.com/radius-project/radius/sessions/0ce85ee7-0a61-465f-a997-c744c2fa54b9

Co-authored-by: Reshrahim <61033581+Reshrahim@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 13, 2026

@copilot - During the triage of the issue, we decided to to remove "recipe" prefix from recipeType, recipeKind and recipeLocation to reduce redundancy in the recipepack UX. Update the PR.

Done in commit 0ef75a0. The RecipeDefinition fields in recipePacks now use kind, location, and parameters — no "recipe" prefix anywhere within the struct.

Copilot AI changed the title Standardize recipe parameter naming: rename parameters to recipeParameters in RecipeDefinition Standardize RecipeDefinition field naming in Radius.Core/recipePacks May 13, 2026
@Reshrahim
Copy link
Copy Markdown
Contributor

@copilot - Can you confirm if all the parameters within the recipe block has the recipe prefix removed ?

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 13, 2026

Dependency Review

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

Scanned Files

None

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 13, 2026

@copilot - Can you confirm if all the parameters within the recipe block has the recipe prefix removed ?

Yes — confirmed and fully cleaned up. There were 4 additional files that still used the old names: the TypeSpec example JSONs (RecipePacks_CreateOrUpdate.json, RecipePacks_List.json, RecipePacks_ListByScope.json) and the controller test data file (recipepack_datamodel.json). These are now updated in commit 3b302df.

All RecipeDefinition fields across the entire codebase now use kind, location, and parameters — no recipe prefix anywhere within the recipe block. The recipeParameters that remains in the codebase belongs to EnvironmentProperties (the environment-level override field), which is correct and intentional.

@Reshrahim Reshrahim marked this pull request as ready for review May 13, 2026 17:38
@willtsai
Copy link
Copy Markdown
Contributor

@Reshrahim - you'll need to add test coverage as called out in CodeCov: #11760 (comment)

@Reshrahim
Copy link
Copy Markdown
Contributor

@Reshrahim - you'll need to add test coverage as called out in CodeCov: #11760 (comment)

Thats an outdated codeQL comment. Initially this PR was targeted to standardize recipe parameters across environment and recipepacks but during triage we agreed to remove recipe prefix from all properties.

I will check on the current CodeQL check as this only removes the prefix recipe

@Reshrahim
Copy link
Copy Markdown
Contributor

Codecov Report

❌ Patch coverage is 53.84615% with 12 lines in your changes missing coverage. Please review. ✅ Project coverage is 51.70%. Comparing base (024faba) to head (3c675db).

Files with missing lines Patch % Lines
pkg/cli/test_client_factory/radius_core.go 0.00% 10 Missing ⚠️
pkg/recipes/configloader/environment.go 0.00% 2 Missing ⚠️
Additional details and impacted files

@@           Coverage Diff           @@
##             main   #11760   +/-   ##
=======================================
  Coverage   51.69%   51.70%           
=======================================
  Files         725      725           
  Lines       45595    45595           
=======================================
+ Hits        23570    23574    +4     
+ Misses      19799    19797    -2     
+ Partials     2226     2224    -2     

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

🚀 New features to boost your workflow:

@copilot fix coverage for the missing lines

…d fetchRecipeDefinition

Agent-Logs-Url: https://github.com/radius-project/radius/sessions/0899830b-632d-4a0e-8f45-65d39a9f85e6

Co-authored-by: Reshrahim <61033581+Reshrahim@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 13, 2026

[Codecov](https://app.codecov.io/gh/radius-project/radius/pull/11760?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=rad...

Fixed in commit 5152195. Added tests covering the 12 missing lines:

  1. pkg/cli/test_client_factory/radius_core.go (10 lines): New radius_core_test.go with tests that exercise the Get handlers of WithRecipePackServerNoError, WithRecipePackServerCoreTypes, WithRecipePackServerUniqueTypes, and WithRecipePackServerConflictingTypes — covering all the renamed Kind/Location fields.

  2. pkg/recipes/configloader/environment.go (2 lines): New TestFetchRecipeDefinition_Success in the bridge test file, covering the successful path through fetchRecipeDefinition where definition.Kind and definition.Location are read.

Copilot AI requested a review from Reshrahim May 13, 2026 22:22
Comment thread pkg/cli/cmd/env/show/preview/show.go Outdated
Comment on lines +194 to +195
RecipeKind: string(*recipe.Kind),
RecipeLocation: *recipe.Location,
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.

@nithyatsu @Reshrahim do the labels also need to have the Recipe prefix removed? e.g. Kind: string(*recipe.Kind),

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.

Yeah I asked Copilot to remove it across UX including CLI. @nithyatsu - Please validate if these are the right places

Comment thread pkg/corerp/api/v20250801preview/recipepack_conversion.go Outdated
Comment thread pkg/corerp/datamodel/recipepack.go Outdated
Comment thread pkg/corerp/datamodel/recipepack.go Outdated
Comment thread pkg/recipes/configloader/environment.go Outdated
@Reshrahim
Copy link
Copy Markdown
Contributor

@copilot - address the review comments on updating labels and the data model. This change should be done across all user facing touch points including CLI

Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 14, 2026

@copilot - address the review comments on updating labels and the data model. This change should be done across all user facing touch points including CLI

Done in commit 79613b4. Changes across all user-facing touch points:

  • Data model (recipepack.go): RecipeKindKind, RecipeLocationLocation
  • Shared types (recipes/types.go): RecipeKindKind, RecipeLocationLocation
  • Conversion (recipepack_conversion.go): updated field references
  • Configloader (environment.go): updated field references
  • CLI labels (show.go): EnvRecipes struct fields renamed to Kind/Location
  • Table format (objectformats.go): headings RECIPE KINDKIND, RECIPE LOCATIONLOCATION
  • CLI recipepack (recipepack.go): CoreTypesRecipeInfo.RecipeLocationLocation
  • All tests updated across converter, controller, configloader, env show, and recipepack packages

Copilot AI changed the title Remove Recipe prefix to RecipeDefinition in Radius.Core/recipePacks Remove Recipe prefix from RecipeDefinition in Radius.Core/recipePacks May 14, 2026
@radius-functional-tests
Copy link
Copy Markdown

radius-functional-tests Bot commented May 18, 2026

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 7fd5fc0
Unique ID func2e41bd8cd8
Image tag pr-func2e41bd8cd8
  • 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-func2e41bd8cd8
  • 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-func2e41bd8cd8
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-func2e41bd8cd8
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-func2e41bd8cd8
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-func2e41bd8cd8
  • 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 failed
❌ Test recipe publishing failed

@Reshrahim Reshrahim marked this pull request as draft May 18, 2026 16: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.

Rename recipeKind and recipeLocation to kind and location in Recipe Packs Standardize Recipe Parameter Naming Across Environment and RecipePack

8 participants