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

change: [M3-7383] - Replace hardcoded prices for LKE HA with data from lke/types API endpoint #10505

Merged
merged 16 commits into from
Jun 18, 2024

Conversation

carrillo-erik
Copy link
Contributor

@carrillo-erik carrillo-erik commented May 22, 2024

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.

  • Removal of the LK_HA_PRICE const.
  • Replacement of outstanding default imports with named imports.
  • ClusterDetail is renamed to KubernetesClusterDetail.
  • New kubernetesTypeFactory type factory and corresponding tests.
  • New DC Specific Pricing queries for Kubernetes (LKE HA).
  • New lke/types API endpoint.

How to test 🧪

  • Go through the normal Kubernetes Create workflow.

Verification steps

(How to verify changes)

  • Verify that existing LKE create workflows behave as expected.
  • Verify that switching between different regions changes the price. In particular Jakarta, ID (id-cgk) and Sao Paulo, BR (br-gru) should update the price for LKE HA from $60.00 to $72.00 and $84.00, respectively.
  • Verify that the total price reflects the LKE HA selection based on the appropriate region.
  • Verify there are no visual regressions as a result of these changes.

As an Author I have considered 🤔

Check all that apply

  • 👀 Doing a self review
  • ❔ Our contribution guidelines
  • 🤏 Splitting feature into small PRs
  • ➕ Adding a changeset
  • 🧪 Providing/Improving test coverage
  • 🔐 Removing all sensitive information from the code and PR description
  • 🚩 Using a feature flag to protect the release
  • 👣 Providing comprehensive reproduction steps
  • 📑 Providing or updating our documentation
  • 🕛 Scheduling a pair reviewing session
  • 📱 Providing mobile support
  • ♿ Providing accessibility support

@carrillo-erik carrillo-erik self-assigned this May 22, 2024
@carrillo-erik carrillo-erik requested a review from a team as a code owner May 22, 2024 17:15
@carrillo-erik carrillo-erik requested review from mjac0bs and abailly-akamai and removed request for a team May 22, 2024 17:15
@carrillo-erik carrillo-erik changed the title Change/m3 7383 change: [M3 7383] - Replace hardcoded prices for LKE HA with data from lke/types API endpoint May 22, 2024
@carrillo-erik carrillo-erik added the Help Wanted Teamwork makes the dream work! label May 22, 2024
Copy link

github-actions bot commented May 22, 2024

Coverage Report:
Base Coverage: 82.85%
Current Coverage: 83.08%

@carrillo-erik carrillo-erik added Work in Progress and removed Help Wanted Teamwork makes the dream work! labels May 24, 2024
@carrillo-erik
Copy link
Contributor Author

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 Work in Progress.

@abailly-akamai
Copy link
Contributor

abailly-akamai commented May 29, 2024

@carrillo-erik can we resolve the conflict before review?

nevermind, just saw the comment above. Maybe back into draft until ready to be reviewed?

@carrillo-erik carrillo-erik changed the title change: [M3 7383] - Replace hardcoded prices for LKE HA with data from lke/types API endpoint change: [M3-7383] - Replace hardcoded prices for LKE HA with data from lke/types API endpoint Jun 3, 2024
@carrillo-erik carrillo-erik requested a review from a team as a code owner June 6, 2024 14:46
@carrillo-erik carrillo-erik requested review from jdamore-linode and removed request for a team June 6, 2024 14:46
Copy link
Contributor

@mjac0bs mjac0bs left a 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.

@mjac0bs mjac0bs added the @linode/api-v4 Changes are made to the @linode/api-v4 package label Jun 7, 2024
@carrillo-erik carrillo-erik requested a review from mjac0bs June 10, 2024 19:48
Copy link
Contributor

@mjac0bs mjac0bs left a 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.

Copy link
Contributor

@abailly-akamai abailly-akamai left a 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

@abailly-akamai
Copy link
Contributor

@carrillo-erik i believe the e2e failure also is relevant here, you do want to fix it before merging

@mjac0bs mjac0bs self-requested a review June 13, 2024 17:15
@carrillo-erik
Copy link
Contributor Author

@abailly-akamai @mjac0bs
There's been a few updates to this PR and it continually got bigger (although the changes were minimal). I'm more than happy to schedule a pair review session before merging this PR.

Copy link
Contributor

@mjac0bs mjac0bs left a 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.

@abailly-akamai
Copy link
Contributor

@carrillo-erik you have to fix conflicts and address feedback before this gets out of date again

@carrillo-erik
Copy link
Contributor Author

@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.

@mjac0bs mjac0bs added the Approved Multiple approvals and ready to merge! label Jun 18, 2024
@carrillo-erik carrillo-erik merged commit 1f2d666 into linode:develop Jun 18, 2024
18 checks passed
nikhagra-akamai pushed a commit to nikhagra-akamai/manager that referenced this pull request Jun 19, 2024
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Approved Multiple approvals and ready to merge! DC-Specific Pricing @linode/api-v4 Changes are made to the @linode/api-v4 package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants