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

upcoming: [M3-7220, M3-7355] - Add DC Get Well logic to various user flows pt2 and cleanup #9945

Merged
merged 17 commits into from
Dec 1, 2023

Conversation

coliu-akamai
Copy link
Contributor

@coliu-akamai coliu-akamai commented Nov 30, 2023

Description 📝

  • Adds some additional logic to disable regions when creating kubernetes
  • cleans up existing DC Get Well logic (make a prop required, clean up comments) + update tests as needed

Preview 📷

kubernetes msw
image

How to test 🧪

Prerequisites

Verification steps

Without the MSW (and with/without the DC get well feature flag), for Kubernetes and VPCs

  • Verify that the creation (or migration) flow for each entity still works as expected
  • Verify that this PR still has the same regions as prod
    • ** Tokyo no longer appears in this PR bc we've removed fake regions
    • ** order of continent/regions may not be the same, we've alphabetized everything

With the MSW + dc get well feature flag, for Kubernetes only

  • Verify that disabled regions appear as expected for each entity/capability (see mock data for account/availability endpoint in serverHandlers.ts)
  • Verify that if a region doesn't have a capability for some entity, that region doesn't appear. You can do this by adding or removing capabilities in regions.json
  • clicking on the "learn more" link takes you to https://www.linode.com/global-infrastructure/availability (page does not yet exist but will soon)

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

@coliu-akamai coliu-akamai added Wait to Merge DC Get Well Relating to the DC Get Well project labels Nov 30, 2023
@coliu-akamai coliu-akamai self-assigned this Nov 30, 2023
Comment on lines -104 to -108
React.useEffect(() => {
if (filteredRegions.length === 1 && !selectedRegionID) {
setSelectedRegionID(filteredRegions[0].id);
}
}, [filteredRegions, selectedRegionID]);
Copy link
Contributor Author

@coliu-akamai coliu-akamai Nov 30, 2023

Choose a reason for hiding this comment

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

Deleted this logic to preselect a region if there's only one region with kubernetes capability: we've moved the region filtering logic inside the RegionSelect (filteredRegions is no longer declared). We can't preselect a region anymore because we can no longer assume that all regions in regionsData have Kubernetes as a capability, even if regionsData.length === 1.

@coliu-akamai coliu-akamai changed the title upcoming: [M3-7220] - Add DC Get Well logic to various user flows pt1 and cleanup upcoming: [M3-7220, M3-7355] - Add DC Get Well logic to various user flows pt1 and cleanup Nov 30, 2023
@coliu-akamai coliu-akamai changed the title upcoming: [M3-7220, M3-7355] - Add DC Get Well logic to various user flows pt1 and cleanup upcoming: [M3-7220, M3-7355] - Add DC Get Well logic to various user flows pt2 and cleanup Nov 30, 2023
@coliu-akamai coliu-akamai marked this pull request as ready for review November 30, 2023 20:30
@coliu-akamai coliu-akamai requested a review from a team as a code owner November 30, 2023 20:30
@coliu-akamai coliu-akamai requested review from jdamore-linode, dwiley-akamai and abailly-akamai and removed request for a team November 30, 2023 20:30
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.

🎉 Looks great

  • confirmed the proper behavior for those services RegionSelects ✅
  • confirmed comments and cleanups ✅

@coliu-akamai coliu-akamai added the Add'tl Approval Needed Waiting on another approval! label Nov 30, 2023
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.

Looks good, thanks Connie! Confirmed the flows in your description. Thanks for the thorough doc comments too!

Copy link
Contributor

@dwiley-akamai dwiley-akamai left a comment

Choose a reason for hiding this comment

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

Without the MSW (and with/without the DC get well feature flag), for Kubernetes and VPCs:

  • Creation flow for each entity still works as expected ✅
  • This branch has the same regions as prod ✅
    • Tokyo no longer appears in this PR bc we've removed fake regions ✅
    • Order of continent/regions may not be the same, we've alphabetized everything ✅

With the MSW + dc get well feature flag, for Kubernetes only:

Disabled regions appear as expected for each entity/capability ✅
If a region doesn't have a capability for some entity, that region doesn't appear ✅
Clicking on the "learn more" link takes you to https://www.linode.com/global-infrastructure/availability

* Only use `undefined` for situations where there is no relevant capability for the RegionSelect - this will not filter any of the regions passed in.
* Otherwise, a capability should always be passed in.
*
* See `ImageUpload.tsx` for an example of a RegionSelect with an undefined `currentCapability` - there is no capability associated with Images yet.
Copy link
Contributor

Choose a reason for hiding this comment

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

"there is no capability associated with Images yet" -- is this something API is planning on adding?

Copy link
Contributor Author

@coliu-akamai coliu-akamai Dec 1, 2023

Choose a reason for hiding this comment

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

I'm not completely sure to be honest. Images is currently out of scope, but we'll make a backlog ticket to ask API about this soon

Edit: M3-7525

@coliu-akamai coliu-akamai merged commit 2f467dc into linode:develop Dec 1, 2023
11 checks passed
@coliu-akamai coliu-akamai added Approved Multiple approvals and ready to merge! and removed Add'tl Approval Needed Waiting on another approval! labels Dec 1, 2023
@coliu-akamai coliu-akamai deleted the m3-7220 branch December 8, 2023 16:05
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 Get Well Relating to the DC Get Well project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants