-
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
Improve upgradeView, reduce API calls #3540
Conversation
Now just 3 calls are required Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> Conflicts: dashboard/src/components/AppUpgrade/AppUpgrade.tsx dashboard/src/components/UpgradeForm/UpgradeForm.tsx
Let me know when you want a review of this one. |
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> Conflicts: dashboard/src/components/AppUpgrade/AppUpgrade.tsx dashboard/src/components/UpgradeForm/UpgradeForm.test.tsx dashboard/src/components/UpgradeForm/UpgradeForm.tsx
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com> Conflicts: dashboard/src/components/UpgradeForm/UpgradeForm.tsx
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
Signed-off-by: Antonio Gamez Diaz <agamez@vmware.com>
Ready :) |
releaseName: string; | ||
repoNamespace: string; | ||
installedAppAvailablePackageDetail: AvailablePackageDetail; | ||
installedAppInstalledPackageDetail: InstalledPackageDetail; |
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.
Nice, not only does it mean that less events are triggered, but it's simpler to reason about too. Thanks for cleaning up the props.
I'm going to land this now so it has more time in development for us to find any issues, if they arise. |
Description of the change
The UpgradeView has been causing some headaches recently in CI, also, we got some issues and PR related to this view. This PR is aimed at addressing some of the issues, starting from reducing the number of redundant API calls we were making.
I've simplified the objects used there and, from now on, the source of truth is the react state.
The high-level logic is:
AppUpgrade
: get the parameters from the URL and load theinstalledApp_InstalledPackageDetail
andinstalledApp_AvailablePackageDetail
.UpgradeForm
:Benefits
I hope the CI doesn't complain anymore about the failing upgrade.
Possible drawbacks
Unnoticed or unintended changes that lead to some unexpected behavior. However, I'll try to unit-test and e2e-test it as much as possible.
Applicable issues
GetAvailablePackageDetail
being unnecessarily called multiple times in the upgrade view #3538Additional information
Marking as a draft as test are still pending(personal note) merge and consider also this PR: https://github.com/kubeapps/kubeapps/pull/3525/filesDue to the myriad of changes in ongoing PRs, this one is likely subject to be modified while we merge some of them, (renaming, buttons using new API, etc). Holding off in the meantime.issue3536Fix.mp4
New: a comparison between the current v2.4.1 approach and the proposed one in this PR. Note the changes are not updated between package versions in the v2.4.1 (which is a bug).
refactorAppUpgrade.mp4