Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

fix(cli): do not throw error for osm version when no control plane found #4433

Merged
merged 1 commit into from
Jan 13, 2022

Conversation

jaellio
Copy link
Contributor

@jaellio jaellio commented Jan 12, 2022

Description:

If a control plane is not installed in the specified namespace do
not throw an error for osm version. Currently, the command
returns an error in this scenario.

Resolves #4427

$ ./osm version
CLI Version: version.Info{Version:"dev", GitCommit:"d9426600787ac77a413fc97601ad6eef420f0e3c", BuildDate:""}
Mesh Version: No control plane found in namespace [osm-system]

$ echo $?
0

Signed-off-by: jaellio [email protected]

Testing done:

  • updated unit tests
  • manually verified output

Affected area:

Functional Area
New Functionality [ ]
CI System [ ]
CLI Tool [x]
Certificate Management [ ]
Control Plane [ ]
Demo [ ]
Documentation [ ]
Egress [ ]
Ingress [ ]
Install [ ]
Networking [ ]
Observability [ ]
Performance [ ]
SMI Policy [ ]
Security [ ]
Sidecar Injection [ ]
Tests [ ]
Upgrade [ ]
Other [ ]

Please answer the following questions with yes/no.

  1. Does this change contain code from or inspired by another project? no

    • Did you notify the maintainers and provide attribution?
  2. Is this a breaking change? no

If a control plane is not installed in the specified namespace do
not throw an error for `osm version`. Currently, the command
returns an error in this scenario.

Signed-off-by: jaellio <[email protected]>
@codecov-commenter
Copy link

Codecov Report

Merging #4433 (2ffc0c7) into main (a70d654) will decrease coverage by 0.09%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4433      +/-   ##
==========================================
- Coverage   69.22%   69.12%   -0.10%     
==========================================
  Files         212      212              
  Lines       14581    14580       -1     
==========================================
- Hits        10093    10078      -15     
- Misses       4436     4450      +14     
  Partials       52       52              
Flag Coverage Δ
unittests 69.12% <100.00%> (-0.10%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
cmd/cli/version.go 46.51% <100.00%> (+1.93%) ⬆️
pkg/messaging/workqueue.go 89.28% <0.00%> (-10.72%) ⬇️
pkg/crdconversion/crdconversion.go 69.40% <0.00%> (-5.23%) ⬇️
pkg/ticker/ticker.go 83.33% <0.00%> (-3.85%) ⬇️
pkg/certificate/rotor/rotor.go 84.78% <0.00%> (-2.18%) ⬇️
pkg/injector/webhook.go 89.13% <0.00%> (-0.12%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a70d654...2ffc0c7. Read the comment docs.

@jaellio jaellio marked this pull request as ready for review January 13, 2022 17:36
@jaellio jaellio added the backport-to/release=v1.0.0 Backport to release v1.0.0 label Jan 13, 2022
@jaellio jaellio merged commit 95fb342 into openservicemesh:main Jan 13, 2022
jaellio added a commit to jaellio/osm that referenced this pull request Jan 18, 2022
…penservicemesh#4433)

If a control plane is not installed in the specified namespace do
not throw an error for `osm version`. Currently, the command
returns an error in this scenario.

Signed-off-by: jaellio <[email protected]>
jaellio added a commit that referenced this pull request Jan 18, 2022
…4433) (#4457)

If a control plane is not installed in the specified namespace do
not throw an error for `osm version`. Currently, the command
returns an error in this scenario.

Signed-off-by: jaellio <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport-to/release=v1.0.0 Backport to release v1.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

osm version command should not throw an error when the control plane is not installed
5 participants