-
Notifications
You must be signed in to change notification settings - Fork 282
Handle UI plugins with chart version and appVersion not matching #14207
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
base: master
Are you sure you want to change the base?
Conversation
@jtomasek this PR needs a rebase from |
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.
Left a specific comment @jtomasek
Also, could you be clear on how I can reproduce this issue with the repo+branch you've mentioned on the PR? Where in the published extensions did you make the manual change?
This is the change I did on the repository to reproduce the problem: jtomasek/dashboard-extensions@ab1829d I am setting the chart version to be different from appVersion. Which matches the convention Edge team uses for releasing charts. In such case, when an extension is installed the UIPlugin version is populated form appVersion and when UI runs the logic to determine if an upgrade is available it finds a chart version which does not match the UIPlugin version and suggests an upgrade. This PR fixes the problem by checking the UIPlugin version against Chart appVersion (or Chart version if appVersion is not set). |
@jtomasek I ran your branch and the With this logic change you implemented, shouldn't the card also read ![]() |
Yeah, so if the extension is not installed, we are showing helm chart versions in both extension box and extension panel. If the extension is installed, the UIPlugin exists and in that case in the extension card we are showing UIPlugin version which equals Helm chart appVersion. In the extension panel we are always showing available Helm chart versions. That is why we are getting a mismatch (visible in your screenshot). Should we always show Helm chart appVersion (if present) in the extension box and extension panel? |
I think that the versions must match in all places where we convey that information to the user. If you look at the card when it's ![]() If you look at the card in the ![]() These are all taken from running your branch locally. We can't have this information inconsistency. I believe it should be an easy fix |
I agree, the question I am raising is whether to show an appVersion (the actual version of the extension, in my branch equal to My take is that it makes much more sense to show an extension version (= appVersion) because that is the information which the user is interested in when deciding to install the extension. |
I would say just go for the same approach: |
0471f37
to
fea7a15
Compare
This change adds handling for UIPlugins which are installed from charts where chart version and chart appVersion don't match. - Determine plugin upgradability by comparing UIPlugin version with chart appVersion with a fallback to chart version if appVersion is not available - Update PluginInfoPanel to handle plugin version not matching chart version by checking appVersion first - Update InstallDialog to handle plugin version not matching chart version by checking appVersion first - Display plugin versions in `appVersion (chart version)` format if appVersion differs from chart version Fixes issue rancher#14204
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
@jtomasek could you add some tests for this, please? FYI @richard-cox |
Summary
Fixes #14204
Occurred changes and/or fixed issues
This change adds handling for UIPlugins which are installed from charts where chart version and chart appVersion don't match.
I've tested the PR with KubeVirt dashboard extension from the following Helm chart repository:
Type: git,
URL: https://github.com/jtomasek/dashboard-extensions,
Branch: ghp-test
Technical notes summary
Areas or cases that should be tested
Areas which could experience regressions
Screenshot/Video
Checklist