Workspace group display in workspace commands#11851
Open
officialasishkumar wants to merge 1 commit into
Open
Conversation
Add a GROUP column to rad workspace list and rad workspace show. The new table output derives the group name from the workspace scope while preserving the stored scope value for structured output.\n\nFixes: radius-project#9805 Signed-off-by: Asish Kumar <officialasishkumar@gmail.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes missing resource group visibility in the CLI workspace commands by adding a GROUP column to the shared workspace table formatter and deriving the displayed group name from the workspace Scope (without changing the underlying structured workspace data).
Changes:
- Add
ResourceScopeToResourceGroupNameTransformerto map a workspace scope ID to its resource group name for table display. - Add a
GROUPcolumn to the sharedWorkspaceFormat()table output used byrad workspace list/rad workspace show. - Add/update unit tests covering the new transformer and the updated workspace table formatting.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/cli/objectformats/transformers.go | Adds a scope-specific transformer to extract a resource group name from a scope ID for table display. |
| pkg/cli/objectformats/transformers_test.go | Adds unit tests for the new scope-to-group-name transformer. |
| pkg/cli/cmd/workspace/show/show_test.go | Updates workspace test fixtures to include Scope so group can be displayed. |
| pkg/cli/cmd/workspace/list/list_test.go | Updates workspace test fixtures to include Scope so group can be displayed. |
| pkg/cli/cmd/workspace/common/objectformats.go | Adds the GROUP column to the shared workspace table formatter and wires in the transformer. |
| pkg/cli/cmd/workspace/common/objectformats_test.go | Updates the expected rendered table output to include the new GROUP column. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
rad workspace listandrad workspace showdid not show the resource group even though the workspace scope contains it. This adds a GROUP column to the shared workspace table formatter and derives the displayed group name from the workspace scope. Structured workspace data remains unchanged.The change also adds a scope-specific resource group transformer and coverage for the workspace formatter and transformer.
Type of change
Fixes: #9805
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.