Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rad group switch output #7488

Merged
merged 4 commits into from
Apr 14, 2024

Conversation

gpltaylor
Copy link
Contributor

Description

rad cli group switch output to display success message when switching output to a group

Type of change

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

Fixes: #7395

@gpltaylor gpltaylor requested review from a team as code owners April 11, 2024 10:28
@gpltaylor
Copy link
Contributor Author

UPDATE: I will look into the test. I did some manual testing but I didn't run tests locally as the change was insignificant... We live and learn.

image

@gpltaylor
Copy link
Contributor Author

Updated and tests running successfully locally.

image

@@ -156,6 +158,7 @@ func Test_Run(t *testing.T) {
ConnectionFactory: &connections.MockFactory{ApplicationsManagementClient: appManagementClient},
Workspace: workspace,
UCPResourceGroupName: "a",
Output: outputSink,
Copy link
Contributor

@rynowak rynowak Apr 11, 2024

Choose a reason for hiding this comment

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

Can you add an assert below to verify the output?

Here's an example you can borrow from: https://github.com/radius-project/radius/blob/main/pkg/cli/cmd/app/delete/delete_test.go#L280

Copy link
Contributor

@rynowak rynowak left a comment

Choose a reason for hiding this comment

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

Could you update the test to verify the console output? Other than that change looks great!

Copy link

codecov bot commented Apr 12, 2024

Codecov Report

Attention: Patch coverage is 60.00000% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 63.83%. Comparing base (d4be47e) to head (8c68345).

Files Patch % Lines
pkg/cli/cmd/group/groupswitch/switch.go 60.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7488      +/-   ##
==========================================
- Coverage   63.83%   63.83%   -0.01%     
==========================================
  Files         417      417              
  Lines       23497    23501       +4     
==========================================
+ Hits        14999    15001       +2     
- Misses       7228     7229       +1     
- Partials     1270     1271       +1     

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

ytimocin
ytimocin previously approved these changes Apr 12, 2024
Copy link
Contributor

@ytimocin ytimocin left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for your contribution!

@@ -128,6 +131,12 @@ func (r *Runner) Run(ctx context.Context) error {

return nil
})
return err

Copy link
Contributor

Choose a reason for hiding this comment

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

nit: extra line can be removed

@ytimocin
Copy link
Contributor

You also need a rebase/merge with the main branch.

@radius-functional-tests
Copy link

radius-functional-tests bot commented Apr 12, 2024

Radius functional test overview

🔍 Go to test action run

Name Value
Repository gpltaylor/radius
Commit ref 81790f7
Unique ID func4c8b0575fd
Image tag pr-func4c8b0575fd
Click here to see the list of tools in the current test run
  • gotestsum 1.10.0
  • KinD: v0.20.0
  • Dapr: 1.12.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.1.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/testrecipes/test-bicep-recipes/<name>:pr-func4c8b0575fd
  • 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-func4c8b0575fd
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-func4c8b0575fd
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-func4c8b0575fd
  • 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 msgrp functional tests...
⌛ Starting shared functional tests...
⌛ Starting datastoresrp functional tests...
⌛ Starting cli functional tests...
⌛ Starting samples functional tests...
⌛ Starting daprrp functional tests...
⌛ Starting kubernetes functional tests...
✅ msgrp functional tests succeeded
✅ ucp functional tests succeeded
✅ samples functional tests succeeded
✅ kubernetes functional tests succeeded
✅ daprrp functional tests succeeded
✅ datastoresrp functional tests succeeded
✅ cli functional tests succeeded
✅ shared functional tests succeeded

rad cli group switch output to display success message when switching output to a group

fixes radius-project#7395

Signed-off-by: gpltaylor <gpltaylor@gmail.com>
Signed-off-by: gpltaylor <gpltaylor@gmail.com>
Signed-off-by: gpltaylor <gpltaylor@gmail.com>
@gpltaylor gpltaylor force-pushed the rad-group-switch-output-7395 branch from 81790f7 to 67496f2 Compare April 12, 2024 16:37
Signed-off-by: gpltaylor <gpltaylor@gmail.com>
Copy link
Contributor

@rynowak rynowak left a comment

Choose a reason for hiding this comment

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

Awesome, thanks @gpltaylor

@radius-functional-tests
Copy link

radius-functional-tests bot commented Apr 14, 2024

Radius functional test overview

🔍 Go to test action run

Name Value
Repository gpltaylor/radius
Commit ref 8c68345
Unique ID func01a809466d
Image tag pr-func01a809466d
Click here to see the list of tools in the current test run
  • gotestsum 1.10.0
  • KinD: v0.20.0
  • Dapr: 1.12.0
  • Azure KeyVault CSI driver: 1.4.2
  • Azure Workload identity webhook: 1.1.0
  • Bicep recipe location ghcr.io/radius-project/dev/test/testrecipes/test-bicep-recipes/<name>:pr-func01a809466d
  • 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-func01a809466d
  • controller test image location: ghcr.io/radius-project/dev/controller:pr-func01a809466d
  • ucp test image location: ghcr.io/radius-project/dev/ucpd:pr-func01a809466d
  • 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 shared functional tests...
⌛ Starting samples functional tests...
⌛ Starting msgrp functional tests...
⌛ Starting ucp functional tests...
⌛ Starting datastoresrp functional tests...
⌛ Starting kubernetes functional tests...
⌛ Starting daprrp functional tests...
✅ msgrp functional tests succeeded
✅ samples functional tests succeeded
✅ kubernetes functional tests succeeded
✅ ucp functional tests succeeded
✅ daprrp functional tests succeeded
✅ cli functional tests succeeded
✅ datastoresrp functional tests succeeded
✅ shared functional tests succeeded

@gpltaylor
Copy link
Contributor Author

@rynowak hows this looking?
Let me know if you need anything else.

@rynowak
Copy link
Contributor

rynowak commented Apr 14, 2024

Th

@rynowak hows this looking? Let me know if you need anything else.

I'm merging this now. Thanks again.

@rynowak rynowak merged commit 4c23622 into radius-project:main Apr 14, 2024
16 checks passed
sk593 pushed a commit that referenced this pull request Apr 15, 2024
# Description
rad cli group switch output to display success message when switching
output to a group

## Type of change
- This pull request fixes a bug in Radius and has an approved issue
(issue link required).

Fixes: #7395

---------

Signed-off-by: gpltaylor <gpltaylor@gmail.com>
sk593 added a commit that referenced this pull request Apr 15, 2024
@gpltaylor gpltaylor deleted the rad-group-switch-output-7395 branch May 7, 2024 16:37
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.

rad group switch doesn't print success message
3 participants