Skip to content
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

Apps installed from a global repository cannot be upgraded #1980

Closed
andresmgot opened this issue Aug 28, 2020 · 1 comment · Fixed by #1983
Closed

Apps installed from a global repository cannot be upgraded #1980

andresmgot opened this issue Aug 28, 2020 · 1 comment · Fixed by #1983

Comments

@andresmgot
Copy link
Contributor

Description:

When trying to upgrade an app installed from a global repository, this error comes up:

image

Steps to reproduce the issue:

  1. Install kubeapps, by default
  2. Install Apache in the default namespace
  3. Try to upgrade

Additional information you deem important (e.g. issue happens only occasionally):

There are two issues here:

  • The dashboard is not able to auto-discover the update info. This is because we are only asking for charts in the app namespace.
  • The form that allows to select the source of the application (SelectRepoForm) is no longer working (since we are only requesting app repos within the app namespace).
@absoludity
Copy link
Contributor

So there are a few questions that I had when I read this, I'll include the answers I've found as well :)

  1. Why did CI not pick this up, given that we have an explicit test for upgrading apache (both for a normal repo and a private app repo)

The reason is our integration tests didn't find this issues was that they were testing the upgrade in the kubeapps namespace. We use service accounts for authn/authz which are created in the kubeapps namespace. The integration test for the upgrade.js test starts at /#/login and so, since a specific namespace is not included in the initial route, Kubeapps defaults to the namespace of the service account, ie., kubeapps. So the upgrade.js test does not trigger the issue in the first place, since the request for charts in the kubeapps namespace includes the required data.

  1. Why did no one report this earlier?

It turns out they did. One user, @lingsamuel, who happened to be using the development images had reported this exact issue in #1845 before it was released. Not only did they report it, but they pointed out the actual cause and solution (that getPaginatedChartList had been updated to include global charts, but getChartsWithFilters had not, though it should have been).

There are two issues here:

* The dashboard is not able to auto-discover the update info. This is because we are only asking for charts in the app namespace.

* The form that allows to select the source of the application (SelectRepoForm) is no longer working (since we are only requesting app repos within the app namespace).

With the change suggested above (updating getChartsWithFilters() to also include global namespaces) the dashboard just works, since data for charts specific to the namespace, as well as global charts, are returned. See #1983 for details (currently only pg driver fixed).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants