-
Notifications
You must be signed in to change notification settings - Fork 367
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-7756] - Placement Groups limits updates #10191
Conversation
@@ -3,6 +3,7 @@ import { COUNTRY_CODE_TO_CONTINENT_CODE } from './constants'; | |||
export type Capabilities = | |||
| 'Bare Metal' | |||
| 'Block Storage' | |||
| 'Block Storage Migrations' |
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.
Unrelated to this PR. This key actually is returned from the API so I added it to our types
@@ -27,6 +29,8 @@ export interface Region { | |||
label: string; | |||
country: Country; | |||
capabilities: Capabilities[]; | |||
maximum_pgs_per_customer: number; | |||
maximum_vms_per_pg: number; |
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.
These are the big changes warranting this PR. Limits now come from the region endpoint, not the PG itself
'aria-disabled', | ||
'true' | ||
); | ||
}); | ||
}); |
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.
The UI has changed so we don't need to test for this anymore
linodesError: error, | ||
region, | ||
}; | ||
}; |
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.
This is our new hook to:
- have a handy util to fetch PG data
- reduce repetition in code and keep things DRYer
- facilitate future refactors
It is meant (at least for now) to be consumed by components already having a defined placement group
Coverage Report: ✅ |
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.
Tested and found no regressions.
@hkhalil-akamai Now, while it's super useful in the case of one click apps since that query takes a few seconds, it does seem trivial to cold cache the regions endpoint. I'll ask at the cafe 👍 |
packages/manager/src/features/PlacementGroups/PlacementGroupsLanding/PlacementGroupsRow.tsx
Show resolved
Hide resolved
...ures/PlacementGroups/PlacementGroupsDetail/PlacementGroupsLinodes/PlacementGroupsLinodes.tsx
Outdated
Show resolved
Hide resolved
The updates looks good, once this is merged I'll update my changes in my PR. |
Description 📝
This PR implements recent changes to the Placement Groups API that need to be rolled into the APP to prevent building on the wrong specs (and incur more refactoring as we go)
Changes 🔄
Type changes
compliant
changed tois_compliant
number
number
as a result of 3.1 and 3.2 we need to deprecate the "capacity" field from the PG Interface, update related code and mock data/factories
Preview 📷
There is no change to the UI, everything should be looking and behaving exactly the same except for the PG landing page which lost the sentence about max PG amount reached
How to test 🧪
Prerequisites
Verification steps
As an Author I have considered 🤔
Check all that apply