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-7951] Update Placement Groups region API limits #10343

Merged
merged 4 commits into from
Apr 3, 2024

Conversation

abailly-akamai
Copy link
Contributor

@abailly-akamai abailly-akamai commented Apr 2, 2024

Description 📝

This PR brings CM up to date with the latest region limits ALPHA deployments. This update's only concern is updating the GET region limits API response to match the expected shape.

export interface Region {  
  id: string;  
  label: string;  
  country: Country;  
  capabilities: Capabilities[];    
  maximum_pgs_per_customer: number;    
  maximum_vms_per_pg: number;    
  status: RegionStatus;  
  resolvers: DNSResolvers;  
  site_type: RegionSite;
} 

becomes:

export interface Region {  
  id: string;  
  label: string;  
  country: Country;  
  capabilities: Capabilities[];  
  placement_group_limits: {    
    maximum_pgs_per_customer: number;    
    maximum_linodes_per_pg: number;  
  };  
  status: RegionStatus;  
  resolvers: DNSResolvers;  
  site_type: RegionSite;
} 

It enables the UI to properly handle PG limits. Limits are currently set with hard coded values on the API side, so the behavior is predictable for now:

  • 5 max PGs per Customer
  • 5 max Linodes per PG

Changes 🔄

  • Update APIv4 Region response
  • Update related code

Preview 📷

Screenshot 2024-04-03 at 09 13 07
Screenshot 2024-04-02 at 14 22 26
Screenshot 2024-04-02 at 14 21 48
Screenshot 2024-04-02 at 14 21 38

How to test 🧪

⚠️ Note: Copy is still WIP (main copy, errors, notices)

Prerequisites

  • Switch your environment to ALHPA and pull code locally
  • Login with user pg-user-1 (1Password)

Verification steps

  • Navigate to http://localhost:3000/placement-groups
  • Confirm limits by navigating through and playing with the feature
    • Limit display in tables and summaries
    • Creating placement groups
    • Assigning Linodes
    • Create Linode flow

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

@abailly-akamai abailly-akamai marked this pull request as ready for review April 3, 2024 13:44
@abailly-akamai abailly-akamai requested a review from a team as a code owner April 3, 2024 13:44
@abailly-akamai abailly-akamai requested review from mjac0bs and carrillo-erik and removed request for a team April 3, 2024 13:44
@carrillo-erik
Copy link
Contributor

I noticed that the color of the tooltip seems lighter compared to others in the Create Linode flow. Also, the hover state doesn't turn it blue in Dark Mode. This might just require its own separate ticket to make the tooltips more consistent with each other. Code looks good and works as expected in the flows tested. The tooltip issue is not a show stopper for this PR.

Screen.Recording.2024-04-03.at.8.16.27.AM.mov

@abailly-akamai
Copy link
Contributor Author

@carrillo-erik sounds good thanks for catching. Let's create a ticket to look at that down the line

@abailly-akamai abailly-akamai merged commit 4725a71 into linode:develop Apr 3, 2024
17 checks passed
bnussman-akamai pushed a commit to bnussman-akamai/manager that referenced this pull request Apr 4, 2024
…#10343)

* Update PG limits region API

* Added changeset:  Modify Region Placement Groups Limits types

* Added changeset: Modify Regio

* Update changeset
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants