Skip to content

Update rad commands for concise output#11773

Merged
brooke-hamilton merged 18 commits into
radius-project:mainfrom
zachcasper:rad-outputs
May 18, 2026
Merged

Update rad commands for concise output#11773
brooke-hamilton merged 18 commits into
radius-project:mainfrom
zachcasper:rad-outputs

Conversation

@zachcasper
Copy link
Copy Markdown
Contributor

This pull request standardizes and simplifies log messages across several CLI commands related to applications and environments. The changes focus on making log output more consistent, concise, and aligned with resource identifiers, while also cleaning up unnecessary progress or verbose messages. Corresponding test cases have been updated to match the new output formats.

Standardization of log messages:

  • Application delete commands now log messages using resource-style identifiers, such as "Applications.Core/applications/%s deleted" and "Applications.Core/applications/%s not found", instead of more verbose or variable messages. [1] [2] [3] [4] [5] [6]

  • Environment create, delete, and update commands (including preview variants) now use consistent messages like "Applications.Core/environments/%s created", "Applications.Core/environments/%s deleted", "Applications.Core/environments/%s updated", and their "Radius.Core/environments/%s ..." equivalents for preview commands. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]

Removal of unnecessary or redundant log output:

  • Progress messages such as "Creating Environment...", "Updating Environment...", and resource deletion counts have been removed for a cleaner CLI experience. [1] [2] [3] [4] [5] [6]

Test updates for new log formats:

  • All affected test cases have been updated to expect the new standardized log messages and to remove checks for now-absent progress or verbose messages. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]

These changes improve the clarity and consistency of CLI output, making it easier for users to understand the results of their actions and for automated tools to parse log output.# Description

Type of change

  • This pull request fixes a bug in Radius and has an approved issue

Fixes: #11769

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

Signed-off-by: Zach Casper <zachcasper@microsoft.com>
Copilot AI review requested due to automatic review settings April 28, 2026 16:03
@zachcasper zachcasper requested review from a team as code owners April 28, 2026 16:03
Signed-off-by: Zach Casper <zachcasper@microsoft.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 28, 2026

Codecov Report

❌ Patch coverage is 86.66667% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.68%. Comparing base (72a582d) to head (20b7b37).

Files with missing lines Patch % Lines
pkg/cli/cmd/resource/create/create.go 33.33% 1 Missing and 1 partial ⚠️
pkg/cli/cmd/app/delete/delete.go 75.00% 1 Missing ⚠️
pkg/cli/cmd/resource/delete/delete.go 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #11773      +/-   ##
==========================================
- Coverage   51.72%   51.68%   -0.05%     
==========================================
  Files         726      724       -2     
  Lines       45608    45507     -101     
==========================================
- Hits        23591    23520      -71     
+ Misses      19793    19765      -28     
+ Partials     2224     2222       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: Zach Casper <zachcasper@microsoft.com>
zachcasper added 3 commits May 6, 2026 12:01
Signed-off-by: Zach Casper <zachcasper@microsoft.com>
Signed-off-by: Zach Casper <zachcasper@microsoft.com>
@brooke-hamilton brooke-hamilton self-assigned this May 7, 2026
DariuszPorowski
DariuszPorowski previously approved these changes May 7, 2026
Copy link
Copy Markdown
Member

@DariuszPorowski DariuszPorowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

praise: Great standardization! It provides clean and consistent output.

Copy link
Copy Markdown
Member

@brooke-hamilton brooke-hamilton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

Comment thread pkg/cli/cmd/resource/create/create.go
Comment thread pkg/cli/cmd/resourceprovider/create/create.go
Comment thread pkg/cli/cmd/resourcetype/create/create.go
Comment thread pkg/cli/cmd/resourcetype/create/create.go
Comment thread pkg/cli/cmd/resourcetype/delete/delete.go
Comment thread pkg/cli/cmd/workspace/create/create.go Outdated
Comment thread pkg/cli/cmd/workspace/delete/delete.go Outdated
Comment thread pkg/cli/cmd/env/update/update.go
Comment thread pkg/cli/cmd/recipepack/delete/delete.go Outdated
Copy link
Copy Markdown
Contributor Author

@zachcasper zachcasper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brooke-hamilton I addressed all of your great comments. There are two main issues:

  1. -o behavior. I've chosen not to address the inconsistency in the rad CLI around -o and have instead opened a issue which should resolve this comprehensively. #11853

  2. Resource Type identifier format. I've retained the ID format of a resource type as Radius.Compute/containers since that is what the user is typing in. We should not create a new identifier format in the CLI. Let me know if I'm missing a control plane ID format for resource types.

Comment thread pkg/cli/cmd/recipepack/delete/delete.go Outdated
Comment thread pkg/cli/cmd/resource/create/create.go
Comment thread pkg/cli/cmd/resourceprovider/create/create.go
Comment thread pkg/cli/cmd/resourcetype/create/create.go
Comment thread pkg/cli/cmd/resourcetype/delete/delete.go
Comment thread pkg/cli/cmd/workspace/create/create.go Outdated
Comment thread pkg/cli/cmd/workspace/delete/delete.go Outdated
Signed-off-by: Zach Casper <zachcasper@microsoft.com>
zachcasper and others added 3 commits May 18, 2026 09:56
Resolved conflict in pkg/cli/cmd/resource/delete/delete_test.go by keeping
the concise-output behavior (no log on prompt cancel) and adding the new
'Success (force deleted)' test from main, adapted to the rad-outputs log
formats.

Updated DeleteResource mock expectations to the new 4-arg signature and
fixed app delete force-test assertion to match the existing log format.
Signed-off-by: Zach Casper <zachcasper@microsoft.com>
@radius-functional-tests
Copy link
Copy Markdown

radius-functional-tests Bot commented May 18, 2026

Radius functional test overview

🔍 Go to test action run

Click here to see the test run details
Name Value
Repository zachcasper/radius
Commit ref 20b7b37
Unique ID func5f3a651fa6
Image tag pr-func5f3a651fa6
  • gotestsum 1.13.0
  • KinD: v0.29.0
  • Dapr: 1.14.4
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.3.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/testrecipes/test-bicep-recipes/<name>:pr-func5f3a651fa6
  • Terraform recipe location http://tf-module-server.radius-test-tf-module-server.svc.cluster.local/<name>.zip (in cluster)
  • applications-rp test image location: ghcr.io/radius-project/dev/applications-rp:pr-func5f3a651fa6
  • dynamic-rp test image location: ghcr.io/radius-project/dev/dynamic-rp:pr-func5f3a651fa6
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-func5f3a651fa6
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-func5f3a651fa6
  • deployment-engine test image location: ghcr.io/radius-project/deployment-engine:latest

Test Status

⌛ Building Radius and pushing container images for functional tests...
✅ Container images build succeeded
⌛ Publishing Bicep Recipes for functional tests...
✅ Recipe publishing succeeded
⌛ Starting ucp-cloud functional tests...
⌛ Starting corerp-cloud functional tests...
✅ ucp-cloud functional tests succeeded
✅ corerp-cloud functional tests succeeded

@brooke-hamilton brooke-hamilton merged commit a7e610b into radius-project:main May 18, 2026
56 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

All rad <resource> create commands should output a single line if successful

3 participants