Summary
The various rad * list commands return data from inconsistent scopes. Some list within the current workspace's default resource group only, some list across the entire plane (all resource groups), and some require an environment. The flag semantics (--group, --environment, --workspace) also differ between commands. This makes the CLI surprising to use — a user running rad app list and rad recipe-pack list on the same workspace will see results computed against different scopes, with no indication in the output of which scope was used.
This issue proposes making the default scope, supported scope-override flags, and output behavior consistent across all rad * list commands.
Current behavior
The table below summarizes every rad * list command, what it lists by default, and which scope flags it accepts.
How the default scope is resolved today
For commands that accept --group, the resolution path is:
cli.RequireWorkspace loads the current workspace from rad config (overridable via --workspace).
cli.RequireScope reads --group; if unset, it uses workspace.Scope (the workspace's default resource group). See pkg/cli/cmd/app/list/list.go, pkg/cli/cmd/env/list/list.go, pkg/cli/cmd/resource/list/list.go.
- The management client is constructed with
RootScope = workspace.Scope, e.g. /planes/radius/local/resourceGroups/<group>. See pkg/cli/connections/factory.go.
- List operations call
NewListByScopePager against that root scope, so they only return resources in that one group.
For example, ListApplications and ListEnvironments both call the resource-group-scoped pager:
A separate method ListEnvironmentsAll exists (pkg/cli/clients/management.go) which truncates the scope to the plane and lists across all groups, but it is not wired into rad env list.
rad recipe-pack list is the only data-resource list command that defaults to plane scope and only narrows on --group, calling either ListRecipePacks or ListRecipePacksInResourceGroup based on whether the flag was set (pkg/cli/cmd/recipepack/list/list.go).
Inconsistencies
-
Different defaults for the same kind of resource (group-scoped vs. plane-scoped):
rad app list, rad env list, and rad resource list default to the current resource group only.
rad recipe-pack list defaults to all resource groups in the plane.
- All four resources are group-scoped resources, so the choice of default differs across commands of the same shape.
-
Inverse semantics of --group:
- On
rad app list / rad env list / rad resource list, --group overrides the default group, but the command is still single-group.
- On
rad recipe-pack list, --group is what narrows an otherwise plane-wide listing to a single group.
- These are opposite meanings for the same flag.
-
A "list across all groups" option does not exist for app/env/resource list:
ListEnvironmentsAll already exists in the management client but is not exposed via the CLI.
- There is no equivalent for applications or generic resources, even though the most common Radius user question — "what's deployed on this cluster?" — is plane-wide.
-
rad recipe list uses a different scoping model entirely: It is scoped to an environment (--environment), not a resource group, even though recipes are themselves stored as part of an environment resource. This is correct for the data model, but means users have to remember which list commands are group-scoped, plane-scoped, or environment-scoped.
-
Output does not indicate the scope that was queried. Users cannot tell from the output of rad app list whether they are seeing all applications in the plane or only those in one group. The resource group column is not consistently shown.
-
Flag set is inconsistent:
rad resource list accepts --application but not --environment, even though ListResourcesOfTypeInEnvironment exists server-side.
rad recipe-pack list declares a Group field on its runner and reads --group twice (once directly, once through RequireScope), unlike the other commands.
Proposal
Adopt a single, consistent model for all rad * list commands that operate on group-scoped resources (app, env, resource, recipe-pack):
- Default scope: plane-wide (all resource groups in the workspace's plane). This matches user intent for "show me everything" and matches how
rad recipe-pack list, rad group list, rad credential list, rad resource-type list, and rad resource-provider list already behave.
--group/-g: narrows the listing to a single resource group. Same meaning everywhere.
--workspace/-w: selects the workspace (and therefore the plane). Same meaning everywhere.
- Output: always include a
RESOURCE GROUP column in table output for group-scoped resources so the scope of each row is unambiguous.
rad resource list: additionally accept --environment/-e (parallel to existing --application/-a), since the server-side ListResourcesOfTypeInEnvironment method already exists.
rad recipe list: keep environment-scoped (this matches the data model), but accept --group/-g only as a disambiguator for the environment lookup, not as a filter on the results.
This is a user-visible behavior change for rad app list, rad env list, and rad resource list (they would start returning results from all groups by default). A release note and migration guidance would be required.
Acceptance criteria
Summary
The various
rad * listcommands return data from inconsistent scopes. Some list within the current workspace's default resource group only, some list across the entire plane (all resource groups), and some require an environment. The flag semantics (--group,--environment,--workspace) also differ between commands. This makes the CLI surprising to use — a user runningrad app listandrad recipe-pack liston the same workspace will see results computed against different scopes, with no indication in the output of which scope was used.This issue proposes making the default scope, supported scope-override flags, and output behavior consistent across all
rad * listcommands.Current behavior
The table below summarizes every
rad * listcommand, what it lists by default, and which scope flags it accepts.rad app listworkspace.Scope) only--group/-g,--workspace/-wrad env list--group/-g,--workspace/-wrad resource list <type>--application)--application/-a,--group/-g,--workspace/-wrad group list--workspace/-wrad workspace listrad recipe list--environmentor default env)--environment/-e,--group/-g,--workspace/-wrad recipe-pack list--groupnarrows to a single group--group/-g,--workspace/-wrad credential list--workspace/-wrad resource-type list--workspace/-wrad resource-provider list--workspace/-wHow the default scope is resolved today
For commands that accept
--group, the resolution path is:cli.RequireWorkspaceloads the current workspace from rad config (overridable via--workspace).cli.RequireScopereads--group; if unset, it usesworkspace.Scope(the workspace's default resource group). See pkg/cli/cmd/app/list/list.go, pkg/cli/cmd/env/list/list.go, pkg/cli/cmd/resource/list/list.go.RootScope = workspace.Scope, e.g./planes/radius/local/resourceGroups/<group>. See pkg/cli/connections/factory.go.NewListByScopePageragainst that root scope, so they only return resources in that one group.For example,
ListApplicationsandListEnvironmentsboth call the resource-group-scoped pager:ListApplicationsListEnvironmentsA separate method
ListEnvironmentsAllexists (pkg/cli/clients/management.go) which truncates the scope to the plane and lists across all groups, but it is not wired intorad env list.rad recipe-pack listis the only data-resource list command that defaults to plane scope and only narrows on--group, calling eitherListRecipePacksorListRecipePacksInResourceGroupbased on whether the flag was set (pkg/cli/cmd/recipepack/list/list.go).Inconsistencies
Different defaults for the same kind of resource (group-scoped vs. plane-scoped):
rad app list,rad env list, andrad resource listdefault to the current resource group only.rad recipe-pack listdefaults to all resource groups in the plane.Inverse semantics of
--group:rad app list/rad env list/rad resource list,--groupoverrides the default group, but the command is still single-group.rad recipe-pack list,--groupis what narrows an otherwise plane-wide listing to a single group.A "list across all groups" option does not exist for app/env/resource list:
ListEnvironmentsAllalready exists in the management client but is not exposed via the CLI.rad recipe listuses a different scoping model entirely: It is scoped to an environment (--environment), not a resource group, even though recipes are themselves stored as part of an environment resource. This is correct for the data model, but means users have to remember whichlistcommands are group-scoped, plane-scoped, or environment-scoped.Output does not indicate the scope that was queried. Users cannot tell from the output of
rad app listwhether they are seeing all applications in the plane or only those in one group. The resource group column is not consistently shown.Flag set is inconsistent:
rad resource listaccepts--applicationbut not--environment, even thoughListResourcesOfTypeInEnvironmentexists server-side.rad recipe-pack listdeclares aGroupfield on its runner and reads--grouptwice (once directly, once throughRequireScope), unlike the other commands.Proposal
Adopt a single, consistent model for all
rad * listcommands that operate on group-scoped resources (app,env,resource,recipe-pack):rad recipe-pack list,rad group list,rad credential list,rad resource-type list, andrad resource-provider listalready behave.--group/-g: narrows the listing to a single resource group. Same meaning everywhere.--workspace/-w: selects the workspace (and therefore the plane). Same meaning everywhere.RESOURCE GROUPcolumn in table output for group-scoped resources so the scope of each row is unambiguous.rad resource list: additionally accept--environment/-e(parallel to existing--application/-a), since the server-sideListResourcesOfTypeInEnvironmentmethod already exists.rad recipe list: keep environment-scoped (this matches the data model), but accept--group/-gonly as a disambiguator for the environment lookup, not as a filter on the results.This is a user-visible behavior change for
rad app list,rad env list, andrad resource list(they would start returning results from all groups by default). A release note and migration guidance would be required.Acceptance criteria
rad * listcommands default to plane-wide scope.--group/-ghas consistent "narrow to one group" semantics everywhere it is accepted.rad resource listaccepts--environment/-e.--group-scoped behavior.rad app list,rad env list, andrad resource list.