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

fix: [M3-7059] - Stop resetting count and disabling Add button when adding node pool to Kubernetes cluster #10215

Merged
merged 2 commits into from
Feb 22, 2024

Conversation

mjac0bs
Copy link
Contributor

@mjac0bs mjac0bs commented Feb 21, 2024

Description 📝

🐛 On the cluster creation page, if you remove an added node pool from the cluster summary, that plan in the node pool does not become re-enabled.

Fix: This was happening because the number of node pools in the map was being reset to 0 when a node pool was added to a cluster. When the number input is 0, the add button is disabled. We should not reset the number of node pools to 0 once it has been added to the pool.

Changes 🔄

List any change relevant to the reviewer.

  • Removed the call to updatePlanCount in the handler for adding a node pool to a cluster.

Preview 📷

Before After
Screen.Recording.2024-02-21.at.2.28.21.PM.mov
Screen.Recording.2024-02-21.at.2.28.54.PM.mov

How to test 🧪

Prerequisites

Reproduction steps

(How to reproduce the issue, if applicable)

  1. In prod, go to the Create Cluster page.
  2. Click the Add button for a plan in the node pools table. That Add button is now disabled.
  3. In the Cluster Summary section, click the X to remove that node pool. The Add button for that plan stays disabled.

Verification steps

(How to verify changes)

  1. Check out this PR and go to the Create Cluster page.
  2. Click the Add button for a plan in the node pools table. That Add button remains enabled and the number input is not reset to 0; instead, it remains the same as whatever the user last input.
  3. Verify the correct number of nodes and pricing shows up in the Cluster Summary, then remove the node pool from the cluster summary.
  4. Confirm that the Add button remains enabled with the same number of nodes as whatever the user last input.
  5. The behavior should be the same in mobile view with the selection cards.
  6. Confirm kube e2es still pass.

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

@mjac0bs mjac0bs added the Bug Fixes for regressions or bugs label Feb 21, 2024
@mjac0bs mjac0bs self-assigned this Feb 21, 2024
@mjac0bs mjac0bs marked this pull request as ready for review February 21, 2024 22:34
@mjac0bs mjac0bs requested a review from a team as a code owner February 21, 2024 22:34
@mjac0bs mjac0bs requested review from bnussman-akamai and jaalah-akamai and removed request for a team February 21, 2024 22:34
@mjac0bs mjac0bs changed the title fix: [M3-7059] - Stop resetting plan count when node pool is added fix: [M3-7059] - Stop resetting count and disabling Add button when adding node pool to Kubernetes cluster Feb 21, 2024
Copy link

Coverage Report:
Base Coverage: 81.33%
Current Coverage: 81.33%

Copy link
Contributor

@jdamore-linode jdamore-linode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks @mjac0bs for the explanation and detailed reproduction/verification tests!

Copy link
Member

@bnussman-akamai bnussman-akamai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OMG! This reminds me of some feedback (#7654 (review)) I got on one of my first PRs I did at Linode 🥺

I think in the past we made it reset to 0 so that mobile users had some kind of indication that something actually happened, but I think this change is still fine.

@mjac0bs mjac0bs added the Approved Multiple approvals and ready to merge! label Feb 22, 2024
@mjac0bs mjac0bs merged commit 2173f45 into linode:develop Feb 22, 2024
18 checks passed
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! Bug Fixes for regressions or bugs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants