-
Notifications
You must be signed in to change notification settings - Fork 370
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
change: [M3-7383] - Replace hardcoded prices for LKE HA with data from lke/types
API endpoint
#10505
Conversation
lke/types
API endpoint
Coverage Report: ✅ |
packages/manager/src/features/Kubernetes/CreateCluster/CreateCluster.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/Kubernetes/CreateCluster/HAControlPlane.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/Kubernetes/CreateCluster/HAControlPlane.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/Kubernetes/KubernetesClusterDetail/UpgradeClusterDialog.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/Kubernetes/KubernetesClusterDetail/UpgradeClusterDialog.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/Kubernetes/KubernetesClusterDetail/KubeClusterSpecs.tsx
Outdated
Show resolved
Hide resolved
Please Note:Aside from resolving the merge conflicts, there's some optimizations that need to be implemented. There were additional use cases discovered and I'm waiting for input from UX on how to address them. For now, I've labeled this PR as |
nevermind, just saw the comment above. Maybe back into draft until ready to be reviewed? |
lke/types
API endpointlke/types
API endpoint
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.
Here's some initial feedback, @carrillo-erik. Let me know if you have any questions, and thanks for working with Andrew on some of the UX aspects.
packages/manager/src/features/Kubernetes/CreateCluster/HAControlPlane.test.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/Kubernetes/CreateCluster/HAControlPlane.test.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/Kubernetes/CreateCluster/HAControlPlane.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/Kubernetes/KubernetesClusterDetail/KubeClusterSpecs.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/Kubernetes/KubernetesClusterDetail/UpgradeClusterDialog.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/Kubernetes/CreateCluster/HAControlPlane.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/Kubernetes/CreateCluster/HAControlPlane.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/Kubernetes/CreateCluster/HAControlPlane.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/Kubernetes/CreateCluster/CreateCluster.tsx
Outdated
Show resolved
Hide resolved
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 addressing feedback, @carrillo-erik!
Confirmed that I'm seeing loading and error state when expected, and otherwise seeing HA pricing from the API reflected on the Kube create and details pages for normal regions, Jakarta, and Sao Paulo.
Left a few minor comments about some more clean up, but approving pending those are addressed.
packages/manager/src/features/Kubernetes/KubernetesClusterDetail/KubeClusterSpecs.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/Kubernetes/KubernetesClusterDetail/KubeClusterSpecs.tsx
Show resolved
Hide resolved
packages/manager/src/features/Kubernetes/KubernetesClusterDetail/KubeSummaryPanel.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/Kubernetes/CreateCluster/HAControlPlane.test.tsx
Show resolved
Hide resolved
packages/manager/src/features/Kubernetes/KubeCheckoutBar/KubeCheckoutBar.test.tsx
Show resolved
Hide resolved
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.
Pr looks good overall, so does the UI. great job overall with coding conventions and attention to details providing fallbacks in the UI.
There's a few non blocking items to cleanup, approving pending mine & Mariah's comments
packages/manager/src/features/Kubernetes/CreateCluster/CreateCluster.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/Kubernetes/KubeCheckoutBar/KubeCheckoutBar.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/Kubernetes/KubernetesClusterDetail/KubernetesClusterDetail.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/Kubernetes/KubernetesClusterDetail/UpgradeClusterDialog.tsx
Outdated
Show resolved
Hide resolved
@carrillo-erik i believe the e2e failure also is relevant here, you do want to fix it before merging |
@abailly-akamai @mjac0bs |
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.
LKE pricing looks good after the final suggestions I've left, so approving pending those are addressed. We need to make sure we don't render undefined
in the UI while the HA price is loading. (Toggling loading and error state on and off in the RQ dev tools is useful in testing this.)
I'm not seeing any regressions, but I didn't go to every single place that selectedRegionId now can be undefined
when it would previously be null
or an empty string to make sure that's handled as expected.
packages/manager/src/features/Kubernetes/CreateCluster/CreateCluster.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/Kubernetes/CreateCluster/CreateCluster.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/Kubernetes/KubeCheckoutBar/KubeCheckoutBar.test.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/Kubernetes/KubeCheckoutBar/KubeCheckoutBar.tsx
Outdated
Show resolved
Hide resolved
packages/manager/src/features/Kubernetes/CreateCluster/HAControlPlane.tsx
Outdated
Show resolved
Hide resolved
@carrillo-erik you have to fix conflicts and address feedback before this gets out of date again |
@abailly-akamai I've pushed my recent changes addressing the feedback. |
…m `lke/types` API endpoint (linode#10505) * change: [M3-7383] - Replace hardcoded LKE HA prices with API data * Add changesets * Update HA pricing logic to account for API errors * Revert file back to previous version * Show tooltip as part of radio button label during API error * Implement UX updates to handle error and loading states * Fix ha control plane tests * More changes from PR review * Fix tests (e2e and unit) and update regionId data type and PR feedback * Update highAvailability type and revert update to linode type values
Description 📝
The changes in this PR replace the hardcoded price values for LKE High Availability with the data from the
lke/types
endpoint.Changes 🔄
List any change relevant to the reviewer.
LK_HA_PRICE
const.default imports
withnamed imports
.ClusterDetail
is renamed toKubernetesClusterDetail
.kubernetesTypeFactory
type factory and corresponding tests.lke/types
API endpoint.How to test 🧪
Verification steps
(How to verify changes)
Jakarta, ID (id-cgk)
andSao Paulo, BR (br-gru)
should update the price forLKE HA
from $60.00 to $72.00 and $84.00, respectively.LKE HA
selection based on the appropriate region.As an Author I have considered 🤔
Check all that apply