You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 251d7f3
Browse filesBrowse the repository at this point in the historyBrowse files
authored
fix: include operator-configured parameter values in recipe metadata (#11680)
## Description
Fixes: #9454
`rad recipe show` does not display the parameter values that operators
configure on an environment recipe. The server returns only the template
schema from the registry (type, defaultValue, min, max) and silently
drops the configured values before sending the response to the CLI.
## Changes
**Server
(`pkg/corerp/frontend/controller/environments/getrecipemetadata.go`)**
After retrieving the template schema from the registry, overlay
`recipeProperties.Parameters` (the operator-configured values) onto the
schema under a `"value"` key. Parameters that are configured but absent
from the template schema are skipped — the response remains a faithful
view of the recipe template.
**CLI (`pkg/cli/cmd/recipe/`)**
- Add `Value` field to `RecipeParameter` type (`types.go`)
- Handle the `"value"` key in the `rad recipe show` parameter loop
(`show/show.go`)
- Add a `VALUE` column to the parameters table between `DEFAULT VALUE`
and `MIN` (`common/objectformats.go`)
## Type of change
- [x] Bug fix
## How Has This Been Tested?
- Added
`TestGetRecipeMetadataFromRegistry_ConfiguredParameterValuesAppearedInResponse`
to `getrecipemetadata_test.go` — a regression test that verifies
configured values are merged into the schema response.
- Added `"Show recipe with operator-configured parameter value -
Success"` test case to `show_test.go` — verifies the CLI populates the
`Value` field when the server returns a `"value"` key.
- Updated existing test cases in `show_test.go` and
`objectformats_test.go` to reflect the new `VALUE` column and the
`Value: "-"` default initialization.
- `golangci-lint run` on modified packages: 0 issues.
## Checklist
- [x] I have followed the [contributing
guidelines](https://github.com/radius-project/radius/blob/main/CONTRIBUTING.md)
- [x] I have updated or added tests
- [x] I have updated documentation as needed
Signed-off-by: Seth Ficke <19766129+sethficke@users.noreply.github.com>
Co-authored-by: Nicole James <101607760+nicolejms@users.noreply.github.com>
Co-authored-by: Nithya Subramanian <98416062+nithyatsu@users.noreply.github.com>
0 commit comments