-
Notifications
You must be signed in to change notification settings - Fork 357
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
fix: [M3-8726] - Users unable to upgrade Kubernetes version from landing page #11056
fix: [M3-8726] - Users unable to upgrade Kubernetes version from landing page #11056
Conversation
Coverage Report: ✅ |
@@ -98,7 +98,7 @@ export const KubernetesLanding = () => { | |||
|
|||
const isRestricted = profile?.restricted ?? false; | |||
|
|||
const { data, error, isFetching } = useKubernetesClustersQuery( |
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.
For context
isLoading
is true
whenever the first fetch for the query is in-flight
isFetching
is true
whenever any fetch for the query is in-flight
Explanation
In the upgrade dialog, useKubernetesClusterMutation
is called, which invalidates the paginated list of Kubernets clusters, which causes useKubernetesClustersQuery
's isFetching
to become true
, which unmounted the upgrade dialog because of the if statement below. Switching to isLoading
allows the Upgrade dialog to stay mounted during the upgrade, which fixes the bug
There are probably other ways to fix this bug. For example, the UpgradeVersionModal
component could probably be made more robust. I decided to go with this fix because I think isLoading
is the desired loading state here rather than isFetching
anyway
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.
Thanks for the context. Agreed that the dialog is not in the best shape but that is out of scope.
The recent test addition was failing on my end when I ran it locally, but I saw it passed in this run here (and then I tried rerunning the tests but received a couple errors - not sure if I'm missing permissions or something?). Will look into some more! |
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.
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.
Thanks for fixing this. Can we convert the internal PDI ticket to an M3 ticket, so we have it in our project, and update this PR title?
I don't know how Jaalah managed to get the tests to pass. I was seeing the same thing as Connie. Left a comment on the spec about what seems to fix it.
Other than that, this looks good for approving pending the test update!
ui.button | ||
.findByTitle('Upgrade Version') | ||
.should('be.visible') | ||
.should('be.enabled') | ||
.click(); | ||
|
||
mockGetClusters([updatedCluster]).as('getClusters'); | ||
cy.wait(['@updateCluster', '@getClusters']); |
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.
ui.button | |
.findByTitle('Upgrade Version') | |
.should('be.visible') | |
.should('be.enabled') | |
.click(); | |
mockGetClusters([updatedCluster]).as('getClusters'); | |
cy.wait(['@updateCluster', '@getClusters']); | |
mockGetClusters([updatedCluster]).as('getClusters'); | |
ui.button | |
.findByTitle('Upgrade Version') | |
.should('be.visible') | |
.should('be.enabled') | |
.click(); | |
cy.wait(['@updateCluster', '@getClusters']); |
This appears to be what we actually need here to get the version to update to 1.26. I am not 100% clear on why the mock needs to go before the user action, but know that often when the right requests are being made, but the right data isn't showing, it's this kind of (timing?) issue.
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.
glad I wasn't going crazy! I'm also curious to how this test managed to pass in the automatic test checks when it's been failing for us.. 😅
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.
Also seeing this test fail locally.
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.
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.
Thanks for looking into this and adding relevant tests 🧪. Also seeing flake in the new test along with @mjac0bs. Approved pending test is fixed and fix changeset is added.
@@ -98,7 +98,7 @@ export const KubernetesLanding = () => { | |||
|
|||
const isRestricted = profile?.restricted ?? false; | |||
|
|||
const { data, error, isFetching } = useKubernetesClustersQuery( |
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.
Thanks for the context. Agreed that the dialog is not in the best shape but that is out of scope.
ui.button | ||
.findByTitle('Upgrade Version') | ||
.should('be.visible') | ||
.should('be.enabled') | ||
.click(); | ||
|
||
mockGetClusters([updatedCluster]).as('getClusters'); | ||
cy.wait(['@updateCluster', '@getClusters']); |
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.
Also seeing this test fail locally.
Cloud Manager E2E Run #6644
Run Properties:
|
Project |
Cloud Manager E2E
|
Run status |
Failed #6644
|
Run duration | 27m 08s |
Commit |
3e6d480c7c: fix: [M3-8726] - Users unable to upgrade Kubernetes version from landing page (#...
|
Committer | Banks Nussman |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
1
|
Flaky |
3
|
Pending |
2
|
Skipped |
0
|
Passing |
429
|
Tests for review
cypress/e2e/core/placementGroups/delete-placement-groups.spec.ts • 1 failed test
Test | Artifacts | |
---|---|---|
Placement Group deletion > can delete with Linodes assigned when unexpected error show up and retry |
Screenshots
Video
|
switch-linode-state.spec.ts • 1 flaky test
Test | Artifacts | |
---|---|---|
switch linode state > reboots a linode from details page |
Screenshots
Video
|
linode-config.spec.ts • 1 flaky test
Test | Artifacts | |
---|---|---|
Linode Config management > End-to-End > Clones a config |
Screenshots
Video
|
rebuild-linode.spec.ts • 1 flaky test
Test | Artifacts | |
---|---|---|
rebuild linode > cannot rebuild a provisioning linode |
Screenshots
Video
|
…ing page (linode#11056) * fix dialog unmounting during upgrade and add cypress test * fix cypress test * add changeset --------- Co-authored-by: Banks Nussman <banks@nussman.us>
Description 📝
isLoading
➡️isFetching
- see comment for explanationPreview 📷
Screen.Recording.2024-10-07.at.3.49.26.PM.mov
Screen.Recording.2024-10-07.at.3.55.16.PM.mov
How to test 🧪
Reproduction steps
Verification steps
As an Author I have considered 🤔