Skip to content

Comments

Fix rad app list to filter by workspace default environment#7

Draft
Copilot wants to merge 4 commits intomainfrom
copilot/fix-issue-11217
Draft

Fix rad app list to filter by workspace default environment#7
Copilot wants to merge 4 commits intomainfrom
copilot/fix-issue-11217

Conversation

Copy link

Copilot AI commented Feb 18, 2026

Description

rad app list documentation claimed it lists applications "in the resource group associated with the default environment" but ignored the workspace's Environment field entirely, returning all applications in the resource group.

Changes

Core fix (pkg/cli/cmd/app/list/list.go):

  • Filter applications by workspace.Environment in Run() method
  • Added filterApplicationsByEnvironment() to compare app.Properties.Environment against workspace setting
  • Added matchesEnvironment() with flexible matching:
    • Exact match for full resource IDs
    • Suffix match for environment names (e.g., "dev" matches .../environments/dev)
  • Backward compatible: no filtering when workspace.Environment is empty

Tests (pkg/cli/cmd/app/list/list_test.go):

  • Test_filterApplicationsByEnvironment() - filtering scenarios including nil properties
  • Test_matchesEnvironment() - ID/name matching logic
  • Test_Run_WithEnvironmentFiltering() - end-to-end with environment set

Example

// Before: Lists apps from all environments regardless of workspace.Environment
apps, _ := client.ListApplications(ctx)
return output.WriteFormatted(format, apps, tableFormat)

// After: Filters to workspace's default environment when set
apps, _ := client.ListApplications(ctx)
if workspace.Environment != "" {
    apps = filterApplicationsByEnvironment(apps, workspace.Environment)
}
return output.WriteFormatted(format, apps, tableFormat)

Type of change

  • This pull request fixes a bug in Radius and has an approved issue (issue link required).

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.
    • Not applicable
  • A design document PR is created in the design-notes repository, if new APIs are being introduced.
    • Not applicable
  • The design document has been reviewed and approved by Radius maintainers/approvers.
    • Not applicable
  • A PR for the samples repository is created, if existing samples are affected by the changes in this PR.
    • 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.
    • Not applicable
  • A PR for the recipes repository is created, if existing recipes are affected by the changes in this PR.
    • Not applicable

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/graphql
    • Triggering command: /usr/bin/gh gh issue view 11217 --json title,body,labels,comments,author,createdAt,state (http block)
  • https://api.github.com/repos/radius-project/radius/issues/11217
    • Triggering command: /usr/bin/curl curl -s REDACTED (http block)

If you need me to access, download, or install something from one of these locations, you can either:


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits February 18, 2026 18:16
…ent error handling

Co-authored-by: nicolejms <101607760+nicolejms@users.noreply.github.com>
Co-authored-by: nicolejms <101607760+nicolejms@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix bug in issue investigation workflow Support error property in ARM-JSON deployment outputs Feb 18, 2026
Copilot AI requested a review from nicolejms February 18, 2026 18:23
Co-authored-by: nicolejms <101607760+nicolejms@users.noreply.github.com>
Copilot AI changed the title Support error property in ARM-JSON deployment outputs Fix rad app list to filter by workspace default environment Feb 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants