Update rad commands for concise output#11773
Conversation
Signed-off-by: Zach Casper <zachcasper@microsoft.com>
Signed-off-by: Zach Casper <zachcasper@microsoft.com>
Codecov Report❌ Patch coverage is 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. 🚀 New features to boost your workflow:
|
Signed-off-by: Zach Casper <zachcasper@microsoft.com>
Signed-off-by: Zach Casper <zachcasper@microsoft.com>
Signed-off-by: Zach Casper <zachcasper@microsoft.com>
DariuszPorowski
left a comment
There was a problem hiding this comment.
praise: Great standardization! It provides clean and consistent output.
zachcasper
left a comment
There was a problem hiding this comment.
@brooke-hamilton I addressed all of your great comments. There are two main issues:
-
-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
-
Resource Type identifier format. I've retained the ID format of a resource type as
Radius.Compute/containerssince 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.
Signed-off-by: Zach Casper <zachcasper@microsoft.com>
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 test overviewClick here to see the test run details
Test Status⌛ Building Radius and pushing container images for functional tests... |
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]](diffhunk://#diff-87907dd86f66c5e0992fef2ea8d8bc09cf79e4cf4e6d9108cb137a536da03c10L166-R166) [[2]](diffhunk://#diff-87907dd86f66c5e0992fef2ea8d8bc09cf79e4cf4e6d9108cb137a536da03c10L197-R205) [[3]](diffhunk://#diff-0d19f5b0c83b43f0f60b644a588f32e118296e1c8232e239d3dcc164c53d8f0bL174-R174) [[4]](diffhunk://#diff-0d19f5b0c83b43f0f60b644a588f32e118296e1c8232e239d3dcc164c53d8f0bL243-R243) [[5]](diffhunk://#diff-0d19f5b0c83b43f0f60b644a588f32e118296e1c8232e239d3dcc164c53d8f0bL357-R357) [[6]](diffhunk://#diff-0d19f5b0c83b43f0f60b644a588f32e118296e1c8232e239d3dcc164c53d8f0bL525-R525) * 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]](diffhunk://#diff-870b0a9ddae1c288c449a9832bae630c5ac691849c4638f97db83a3aff1474bfL173-R171) [[2]](diffhunk://#diff-8714424570a548de543f7c2439e120756644a66bef1e65ffde34deb9c79182b9L191-L197) [[3]](diffhunk://#diff-6e4ca37857043430dd23825866827a35d340a873d66f164441763816b3138c3bL156-R154) [[4]](diffhunk://#diff-623c5339f1462c2be84f649e1df69d614cbd04fe523e854be5c8c51ff1930581L170-L176) [[5]](diffhunk://#diff-d332ce038a22ec95a48f0600648e5b6dadb8d358e8414b4285c4a2d938780439L34-R35) [[6]](diffhunk://#diff-d332ce038a22ec95a48f0600648e5b6dadb8d358e8414b4285c4a2d938780439L169-R177) [[7]](diffhunk://#diff-a9278b5777296d730e5b9d7a571cabec7045ac3e4a0d431b9cb1943ec0452317L36-R37) [[8]](diffhunk://#diff-a9278b5777296d730e5b9d7a571cabec7045ac3e4a0d431b9cb1943ec0452317L157-R151) [[9]](diffhunk://#diff-cc0d9ae95866ee9bc6780d1c664234d1860da36517a870828696934d72b31ec0L315-R320) [[10]](diffhunk://#diff-5666f913c4913108ef57c2f23dec3f4b6a4fc6bc653f2b0c51982b9619fb6e12L241-R239) **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]](diffhunk://#diff-870b0a9ddae1c288c449a9832bae630c5ac691849c4638f97db83a3aff1474bfL153-L154) [[2]](diffhunk://#diff-6e4ca37857043430dd23825866827a35d340a873d66f164441763816b3138c3bL144-L145) [[3]](diffhunk://#diff-d332ce038a22ec95a48f0600648e5b6dadb8d358e8414b4285c4a2d938780439L169-R177) [[4]](diffhunk://#diff-a9278b5777296d730e5b9d7a571cabec7045ac3e4a0d431b9cb1943ec0452317L141-L148) [[5]](diffhunk://#diff-cc0d9ae95866ee9bc6780d1c664234d1860da36517a870828696934d72b31ec0L315-R320) [[6]](diffhunk://#diff-5666f913c4913108ef57c2f23dec3f4b6a4fc6bc653f2b0c51982b9619fb6e12L231-L232) **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]](diffhunk://#diff-8714424570a548de543f7c2439e120756644a66bef1e65ffde34deb9c79182b9L191-L197) [[2]](diffhunk://#diff-8714424570a548de543f7c2439e120756644a66bef1e65ffde34deb9c79182b9L250-R249) [[3]](diffhunk://#diff-a595cf515e0d0ce861a0710659d126b2dd7c0748647bebc245c72575ff1a7b7eL148-R150) [[4]](diffhunk://#diff-a595cf515e0d0ce861a0710659d126b2dd7c0748647bebc245c72575ff1a7b7eL204-R203) [[5]](diffhunk://#diff-a595cf515e0d0ce861a0710659d126b2dd7c0748647bebc245c72575ff1a7b7eL263-R259) [[6]](diffhunk://#diff-a595cf515e0d0ce861a0710659d126b2dd7c0748647bebc245c72575ff1a7b7eL326-R315) [[7]](diffhunk://#diff-a595cf515e0d0ce861a0710659d126b2dd7c0748647bebc245c72575ff1a7b7eL379-R359) [[8]](diffhunk://#diff-a595cf515e0d0ce861a0710659d126b2dd7c0748647bebc245c72575ff1a7b7eL431-L434) [[9]](diffhunk://#diff-b832a493d5cce453ba312bc50cf533a7750c16b300c068739395600b543fe20cL101-R103) [[10]](diffhunk://#diff-f666f217fc3999475063fd8344f9f6cff023f1c98f27ce8bff6d6999b76ed049L111-R111) [[11]](diffhunk://#diff-c8b9a3315a934ca0d8e0b750b2872603b1c504239f5d310251e87e5fb6a8e4a2L344-R348) 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: radius-project#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 <!-- TaskRadio schema --> - [X] Not applicable <!-- TaskRadio schema --> - A design document PR is created in the [design-notes repository](https://github.com/radius-project/design-notes/), if new APIs are being introduced. - [ ] Yes <!-- TaskRadio design-pr --> - [X] Not applicable <!-- TaskRadio design-pr --> - The design document has been reviewed and approved by Radius maintainers/approvers. - [ ] Yes <!-- TaskRadio design-review --> - [X] Not applicable <!-- TaskRadio design-review --> - A PR for the [samples repository](https://github.com/radius-project/samples) is created, if existing samples are affected by the changes in this PR. - [ ] Yes <!-- TaskRadio samples-pr --> - [X] Not applicable <!-- TaskRadio samples-pr --> - A PR for the [documentation repository](https://github.com/radius-project/docs) is created, if the changes in this PR affect the documentation or any user facing updates are made. - [ ] Yes <!-- TaskRadio docs-pr --> - [X] Not applicable <!-- TaskRadio docs-pr --> - A PR for the [recipes repository](https://github.com/radius-project/recipes) is created, if existing recipes are affected by the changes in this PR. - [ ] Yes <!-- TaskRadio recipes-pr --> - [X] Not applicable <!-- TaskRadio recipes-pr --> --------- Signed-off-by: Zach Casper <zachcasper@microsoft.com> Co-authored-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com> Signed-off-by: Zach Casper <zachcasper@microsoft.com>
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]](diffhunk://#diff-87907dd86f66c5e0992fef2ea8d8bc09cf79e4cf4e6d9108cb137a536da03c10L166-R166) [[2]](diffhunk://#diff-87907dd86f66c5e0992fef2ea8d8bc09cf79e4cf4e6d9108cb137a536da03c10L197-R205) [[3]](diffhunk://#diff-0d19f5b0c83b43f0f60b644a588f32e118296e1c8232e239d3dcc164c53d8f0bL174-R174) [[4]](diffhunk://#diff-0d19f5b0c83b43f0f60b644a588f32e118296e1c8232e239d3dcc164c53d8f0bL243-R243) [[5]](diffhunk://#diff-0d19f5b0c83b43f0f60b644a588f32e118296e1c8232e239d3dcc164c53d8f0bL357-R357) [[6]](diffhunk://#diff-0d19f5b0c83b43f0f60b644a588f32e118296e1c8232e239d3dcc164c53d8f0bL525-R525) * 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]](diffhunk://#diff-870b0a9ddae1c288c449a9832bae630c5ac691849c4638f97db83a3aff1474bfL173-R171) [[2]](diffhunk://#diff-8714424570a548de543f7c2439e120756644a66bef1e65ffde34deb9c79182b9L191-L197) [[3]](diffhunk://#diff-6e4ca37857043430dd23825866827a35d340a873d66f164441763816b3138c3bL156-R154) [[4]](diffhunk://#diff-623c5339f1462c2be84f649e1df69d614cbd04fe523e854be5c8c51ff1930581L170-L176) [[5]](diffhunk://#diff-d332ce038a22ec95a48f0600648e5b6dadb8d358e8414b4285c4a2d938780439L34-R35) [[6]](diffhunk://#diff-d332ce038a22ec95a48f0600648e5b6dadb8d358e8414b4285c4a2d938780439L169-R177) [[7]](diffhunk://#diff-a9278b5777296d730e5b9d7a571cabec7045ac3e4a0d431b9cb1943ec0452317L36-R37) [[8]](diffhunk://#diff-a9278b5777296d730e5b9d7a571cabec7045ac3e4a0d431b9cb1943ec0452317L157-R151) [[9]](diffhunk://#diff-cc0d9ae95866ee9bc6780d1c664234d1860da36517a870828696934d72b31ec0L315-R320) [[10]](diffhunk://#diff-5666f913c4913108ef57c2f23dec3f4b6a4fc6bc653f2b0c51982b9619fb6e12L241-R239) **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]](diffhunk://#diff-870b0a9ddae1c288c449a9832bae630c5ac691849c4638f97db83a3aff1474bfL153-L154) [[2]](diffhunk://#diff-6e4ca37857043430dd23825866827a35d340a873d66f164441763816b3138c3bL144-L145) [[3]](diffhunk://#diff-d332ce038a22ec95a48f0600648e5b6dadb8d358e8414b4285c4a2d938780439L169-R177) [[4]](diffhunk://#diff-a9278b5777296d730e5b9d7a571cabec7045ac3e4a0d431b9cb1943ec0452317L141-L148) [[5]](diffhunk://#diff-cc0d9ae95866ee9bc6780d1c664234d1860da36517a870828696934d72b31ec0L315-R320) [[6]](diffhunk://#diff-5666f913c4913108ef57c2f23dec3f4b6a4fc6bc653f2b0c51982b9619fb6e12L231-L232) **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]](diffhunk://#diff-8714424570a548de543f7c2439e120756644a66bef1e65ffde34deb9c79182b9L191-L197) [[2]](diffhunk://#diff-8714424570a548de543f7c2439e120756644a66bef1e65ffde34deb9c79182b9L250-R249) [[3]](diffhunk://#diff-a595cf515e0d0ce861a0710659d126b2dd7c0748647bebc245c72575ff1a7b7eL148-R150) [[4]](diffhunk://#diff-a595cf515e0d0ce861a0710659d126b2dd7c0748647bebc245c72575ff1a7b7eL204-R203) [[5]](diffhunk://#diff-a595cf515e0d0ce861a0710659d126b2dd7c0748647bebc245c72575ff1a7b7eL263-R259) [[6]](diffhunk://#diff-a595cf515e0d0ce861a0710659d126b2dd7c0748647bebc245c72575ff1a7b7eL326-R315) [[7]](diffhunk://#diff-a595cf515e0d0ce861a0710659d126b2dd7c0748647bebc245c72575ff1a7b7eL379-R359) [[8]](diffhunk://#diff-a595cf515e0d0ce861a0710659d126b2dd7c0748647bebc245c72575ff1a7b7eL431-L434) [[9]](diffhunk://#diff-b832a493d5cce453ba312bc50cf533a7750c16b300c068739395600b543fe20cL101-R103) [[10]](diffhunk://#diff-f666f217fc3999475063fd8344f9f6cff023f1c98f27ce8bff6d6999b76ed049L111-R111) [[11]](diffhunk://#diff-c8b9a3315a934ca0d8e0b750b2872603b1c504239f5d310251e87e5fb6a8e4a2L344-R348) 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: radius-project#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 <!-- TaskRadio schema --> - [X] Not applicable <!-- TaskRadio schema --> - A design document PR is created in the [design-notes repository](https://github.com/radius-project/design-notes/), if new APIs are being introduced. - [ ] Yes <!-- TaskRadio design-pr --> - [X] Not applicable <!-- TaskRadio design-pr --> - The design document has been reviewed and approved by Radius maintainers/approvers. - [ ] Yes <!-- TaskRadio design-review --> - [X] Not applicable <!-- TaskRadio design-review --> - A PR for the [samples repository](https://github.com/radius-project/samples) is created, if existing samples are affected by the changes in this PR. - [ ] Yes <!-- TaskRadio samples-pr --> - [X] Not applicable <!-- TaskRadio samples-pr --> - A PR for the [documentation repository](https://github.com/radius-project/docs) is created, if the changes in this PR affect the documentation or any user facing updates are made. - [ ] Yes <!-- TaskRadio docs-pr --> - [X] Not applicable <!-- TaskRadio docs-pr --> - A PR for the [recipes repository](https://github.com/radius-project/recipes) is created, if existing recipes are affected by the changes in this PR. - [ ] Yes <!-- TaskRadio recipes-pr --> - [X] Not applicable <!-- TaskRadio recipes-pr --> --------- Signed-off-by: Zach Casper <zachcasper@microsoft.com> Co-authored-by: Brooke Hamilton <45323234+brooke-hamilton@users.noreply.github.com> Signed-off-by: Zach Casper <zachcasper@microsoft.com>
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:
Test updates for new log formats:
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
Fixes: #11769
Contributor checklist
Please verify that the PR meets the following requirements, where applicable: