openservicemesh / osm

Open Service Mesh (OSM) is a lightweight, extensible, cloud native service mesh that allows users to uniformly manage, secure, and get out-of-the-box observability features for highly dynamic microservice environments.
https://openservicemesh.io/
Apache License 2.0
2.59k stars 277 forks source link

Appended version check #5266

Closed mudit-01 closed 1 year ago

mudit-01 commented 1 year ago

Now OSM CLI version check will happen regardless of any K8s cluster

Signed-off-by: mudit singh mudit.singh@india.nec.com

Description: Earlier the OSM CLI version check only happened when there is K8s cluster present as below ss1 If no K8s cluster is present below is the output ss2

Testing done: Yes Manual testing done below are the screenshots With K8s cluster ss3

Without K8s cluster ss4

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?
    • Did you notify the maintainers and provide attribution? No
  2. Is this a breaking change? No
  3. Has documentation corresponding to this change been updated in the osm-docs repo (if applicable)?
codecov-commenter commented 1 year ago

Codecov Report

Merging #5266 (e8a49f3) into main (16f2c15) will decrease coverage by 0.00%. The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main    #5266      +/-   ##
==========================================
- Coverage   69.53%   69.52%   -0.01%     
==========================================
  Files         197      197              
  Lines       16070    16070              
==========================================
- Hits        11174    11173       -1     
- Misses       4839     4840       +1     
  Partials       57       57              
Flag Coverage Δ
unittests 69.52% <0.00%> (-0.01%) :arrow_down:

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

Impacted Files Coverage Δ
cmd/cli/version.go 43.96% <0.00%> (ø)
pkg/certificate/manager.go 87.29% <0.00%> (-0.41%) :arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

mudit-01 commented 1 year ago

@keithmattix @shalier @jaellio @steeling go mock test is taking too much time PTAL thanks

mudit-01 commented 1 year ago

Thanks, @jaellio for the comment, I tried with v1.2.1 but it did not show the new version cli

Even with OSM CLI v1.2.2 it do not show latest v1.2.3 available. cli2

By moving logic it can output the desired new version cli3

mudit-01 commented 1 year ago

@jaellio PTAL, thanks

jaellio commented 1 year ago

Thanks, @jaellio for the comment, I tried with v1.2.1 but it did not show the new version cli

Even with OSM CLI v1.2.2 it do not show latest v1.2.3 available. cli2

By moving logic it can output the desired new version cli3

Yes, you're correct! I missed the return statement on line 79.

LGTM

mudit-01 commented 1 year ago

Thanks! @keithmattix for the review.

mudit-01 commented 1 year ago

@jaellio @keithmattix we can merge this?

mudit-01 commented 1 year ago

Thanks! @jaellio