Remove Recipe prefix from RecipeDefinition in Radius.Core/recipePacks#11760
Remove Recipe prefix from RecipeDefinition in Radius.Core/recipePacks#11760Copilot wants to merge 18 commits into
Conversation
…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>
parameters to recipeParameters in RecipeDefinition
Unit Tests 1 files ± 0 337 suites +1 7m 18s ⏱️ +2s 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.♻️ This comment has been updated with latest results. |
Codecov Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
|
@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>
Done in commit 0ef75a0. The |
parameters to recipeParameters in RecipeDefinition|
@copilot - Can you confirm if all the parameters within the recipe block has the recipe prefix removed ? |
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
…est data Agent-Logs-Url: https://github.com/radius-project/radius/sessions/a15d6709-011a-41b9-80e1-bb019519928d Co-authored-by: Reshrahim <61033581+Reshrahim@users.noreply.github.com>
Yes — confirmed and fully cleaned up. There were 4 additional files that still used the old names: the TypeSpec example JSONs ( All |
|
@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 |
@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>
Fixed in commit
|
| RecipeKind: string(*recipe.Kind), | ||
| RecipeLocation: *recipe.Location, |
There was a problem hiding this comment.
@nithyatsu @Reshrahim do the labels also need to have the Recipe prefix removed? e.g. Kind: string(*recipe.Kind),
There was a problem hiding this comment.
Yeah I asked Copilot to remove it across UX including CLI. @nithyatsu - Please validate if these are the right places
|
@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 |
… touch points Agent-Logs-Url: https://github.com/radius-project/radius/sessions/8abda089-fdd5-46cf-9246-375f380968d4 Co-authored-by: Reshrahim <61033581+Reshrahim@users.noreply.github.com>
Done in commit
|
Radius functional test overviewClick here to see the test run details
Test Status⌛ Building Radius and pushing container images for functional tests... |
Description
Radius.Core/recipePacksused verbose, prefixed field names (recipeKind,recipeLocation,parameters) insideRecipeDefinition. 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/recipePacksresource type.Applications.*/*resource types are intentionally left unchanged as they will be removed after migrating users to the newRadius.*types.Changes
typespec/Radius.Core/recipePacks.tsp): RenamedRecipeDefinitionfields:recipeKind→kind,recipeLocation→location,parametersstaysparameterszz_generated_models.go,zz_generated_models_serde.go): Go struct fields renamed toKind,Location,Parameters; JSON keys updated tokind,location,parameters; field ordering corrected to match code generator alphabetical orderpkg/corerp/datamodel/recipepack.go): Go struct fields renamedRecipeKind→Kind,RecipeLocation→Location; JSON tags updated tokind,location,parameterspkg/recipes/types.go):RecipeDefinitionstruct fields renamedRecipeKind→Kind,RecipeLocation→Locationrecipepack_conversion.go,configloader/environment.go): field references updated to useKind/Locationon both data model and shared typesshow.go):EnvRecipesstruct fields renamedRecipeKind→Kind,RecipeLocation→Locationobjectformats.go): Table column headings renamedRECIPE KIND→KIND,RECIPE LOCATION→LOCATION; JSONPath references updatedpkg/cli/recipepack/recipepack.go):CoreTypesRecipeInfo.RecipeLocationrenamed toLocation;RecipeDefinitioninitializations updatedRecipePacks_CreateOrUpdate.json,RecipePacks_List.json,RecipePacks_ListByScope.json,RecipePacks_Get.json): updated to usekindandlocationopenapi.jsonschema definitions and all swagger example JSON files (RecipePacks_Get.json,RecipePacks_CreateOrUpdate.json,RecipePacks_ListByScope.json) to usekindandlocationhack/bicep-types-radius/generated/radius/radius.core/2025-08-01-preview/types.jsonto usekindandlocationpkg/cli/test_client_factory/radius_core.go): UpdatedRecipeDefinitioninitializations to use renamedKind/Locationfieldsrecipepack_datamodel.json), converter tests, controller tests (recipepacks and environments), CLI recipepack tests, CLI show/env tests, and configloader bridge tests all updatedrecipepacks-test.bicep,tfbicep-combined-test.bicep,recipepacks-test-no-provider.bicep,terraformconfig-redis-test.bicep, andcorerp-recipe-pack-test.bicepto usekindandlocationinstead ofrecipeKindandrecipeLocation"plainHTTP"→"plainHttp"inrecipepack_converter_test.goto match the API model's actual JSON serialization key, fixing a pre-existing test correctness issue where the field was silently ignored during unmarshallingeng/design-notes/recipes/2025-08-recipe-packs.mdto use the new field names (scoped to recipePacks only)pkg/cli/test_client_factory/radius_core_test.gowith tests exercising theGethandlers ofWithRecipePackServerNoError,WithRecipePackServerCoreTypes,WithRecipePackServerUniqueTypes, andWithRecipePackServerConflictingTypesto cover the renamedKind/Locationfields; addedTestFetchRecipeDefinition_Successinpkg/recipes/configloader/environment_v20250801_bridge_test.gocovering the successful path throughfetchRecipeDefinitionwith the renamed fieldsBefore / After
CLI table output headings change from
RECIPE KIND/RECIPE LOCATIONtoKIND/LOCATION.Type of change
Contributor checklist
Please verify that the PR meets the following requirements, where applicable:
eng/design-notes/in this repository, if new APIs are being introduced.