-
Notifications
You must be signed in to change notification settings - Fork 873
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
Feat: add more detailed output for vela addon status
#3876
Conversation
Also prettify output Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
if a local addon has been installed, the AVAILABLE-VERSIONS column of the registry one will not truncate. this commit fixes that. Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
Limit Description length when using `addon list` Use simpler method to get addon info Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
…here Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
…egistry Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
Codecov Report
@@ Coverage Diff @@
## master #3876 +/- ##
==========================================
+ Coverage 64.12% 64.22% +0.09%
==========================================
Files 312 316 +4
Lines 29692 30453 +761
==========================================
+ Hits 19039 19557 +518
- Misses 8194 8369 +175
- Partials 2459 2527 +68
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
… to get addon status Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
Why not show the addon is not existed in this case? For other cases, this PR is really really great! 👍 |
merge(wholePackage) | ||
} | ||
} else { | ||
meta, err := r.ListAddonMeta() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will it use cache here? I'm not sure if the performance will be very bad here. \cc @wangyikewxgm
Maybe, we can downgrade the experience to the old mode if the registry is not versioned.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it is only called when
- vela cli
- verbose is on (default is off)
- non-versioned registry is used
So the user must explicitly say "hey I need detailed info", otherwise this code won't be executed. It think the performance here is not a big deal (with local registries, no noticeable delay when using cli).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generally LGTM, ping @wangyikewxgm for review, mainly about the performance.
We should keep the vela addon status
command response quickly.
Great suggestion, which will make the output more informative to the user. Will implement it! |
… the registry Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
…erflow Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
@wonderflow The main costs is fetching whole addon package. Because user cannot get knowledge of the parameter info about this addon by vela cli before, so I design this feature. Please note that the |
Yes, that is why I worried about the performance issue at first. But now |
Please be aware that if the network is too slow to get the whole addon package from registry, user should still check the addon status quickly, this is why I suggest show detail info only when |
Good idea. Will be implemented! |
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
…addon is not installed, but it does exist in the registry Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
Signed-off-by: Charlie Chiang <charlie_c_0129@outlook.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great job!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastic work!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description of your changes
Fixes #3860
vela addon status
now shows more detailed info.Screenshots
Before
After
If an addon is installed, and it also exists in the registry:
If an addon is not installed, but it does exist in the registry:
If an addon is installed, but it does not exist in the registry:
If an addon is not installed, nor does it exist in the registry:
-v/--verbose
is off, it is not possible to know whether this addon is in registry, so, onlydisabled
is shown)I have:
make reviewable
to ensure this PR is ready for review.backport release-x.y
labels to auto-backport this PR if necessary.How has this code been tested
Relevant unit tests have been added, which will test the four situations above.
Unit tests for helper functions have been created as well.
Special notes for your reviewer