-
Notifications
You must be signed in to change notification settings - Fork 706
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
[regression] Cannot control which chart versions are displayed #6020
Comments
thanks in advance :) |
Thank you for demoing the issue. So I've reproduced this, and fixed it locally but want to write a test to ensure it's covered (so it can't regress again). For those interested, the issue was a change that unintentionally loads the config in an inner scope: kubeapps/cmd/kubeapps-apis/plugins/helm/packages/v1alpha1/server.go Lines 104 to 115 in 969a91c
So
Case of an extra colon :/ and our issue for not testing that properly (I'll do that tomorrow and submit the fix). |
<!-- Before you open the request please review the following guidelines and tips to help it be more easily integrated: - Describe the scope of your change - i.e. what the change does. - Describe any known limitations with your change. - Please run any tests or examples that can exercise your modified code. Thank you for contributing! --> ### Description of the change <!-- Describe the scope of your change - i.e. what the change does. --> In [#5339 we inadvertently switched](https://github.com/vmware-tanzu/kubeapps/pull/5339/files#diff-da1b1406426f28c45f4b63a5ae7547e9c29747e118bf70df6a4694d575710f94R104) from an [assignment](https://go.dev/ref/spec#Assignment_statements) to a [short variable declaration](https://go.dev/ref/spec#Short_variable_declarations): ```diff - pluginConfig, err = common.ParsePluginConfig(pluginConfigPath) + pluginConfig, err := common.ParsePluginConfig(pluginConfigPath) ``` which meant that, in context, a *new* `pluginConfig` var was created in that scope, so that the actual `pluginConfig` var from the outside scope remained empty. ### Benefits Plugin config works again for the Helm plugin. ### Possible drawbacks <!-- Describe any known limitations with your change --> ### Applicable issues <!-- Enter any applicable Issues here (You can reference an issue using #) --> - fixes #6020 ### Additional information <!-- If there's anything else that's important and relevant to your pull request, mention that information here.--> I spent some time trying to write a test for this, but I could either extract the 5 lines to a separate function and test that or test the `NewServer` function itself. The latter is very difficult because it instantiates a bunch of network requests, and the former seems redundant since we already extract the functionality to the `common.ParsePluginConfig()` function... it's really just a golang gotcha that is important to be aware of: `a := foo` is equivalent to `var a atype \n a = foo` and so is always creating a new variable in that scope. Signed-off-by: Michael Nelson <minelson@vmware.com>
In the past we had solved the problem of how to display a useful set of versions to users in #3588, but the issue appears to have regressed and needs investigation:
From @linhvuntu #3588 (comment)
So I tried to create a brand new kubeapps with Helm
Package version 12.2.4 / App Version 2.6.3
, and with the config of{10 10 10}
and the logs are as belowSo it seems updated successfully, but when checking the Package Version dropdown list, it still display in with the setting of
{3 3 3}
The Helm package I'm checking is the public ingress-nginx chart from Kubernetes here: https://github.com/kubernetes/ingress-nginx/tree/main/charts/ingress-nginx
When I check the this chart versions from terminal, it shows full list of versions as below
But from the Package Version dropdown list in the Kubeapps Dashboards, it show only
For some specific reason, we need to use the Chart version 4.2.5 but it is not displayed.
Do I need to config anything else at the kubeappsController or elsewhere? I have cleared cache, use another laptop to check but it's still the same
The text was updated successfully, but these errors were encountered: