manager icon indicating copy to clipboard operation
manager copied to clipboard

upcoming: [M3-7615] - Add placement group to payload

Open carrillo-erik opened this issue 1 year ago โ€ข 4 comments

Description ๐Ÿ“

The main concept with this PR is to include the details of the selected Placement Group as part of the Create Linode workflow.

Changes ๐Ÿ”„

List any change relevant to the reviewer.

  • The LabelAndTagsPanel has been renamed to DetailsPanel since the panel had been updated to include the PlacementGroupSelect component. Accordingly, the Details title has been added to the panel.
  • If the selected PlacementGroup does not have any capacity, an error Notice is displayed within the panel.
  • Updates to the Linodes schema to include Placement Group details.

Preview ๐Ÿ“ท

Details-Panel

Details-Panel-Error

How to test ๐Ÿงช

(How to setup test environment)

  • Enable the following using the Cloud Manager Dev Tools:
    • Placement Groups feature flag
    • MSW

Verification steps

Success

  • Go through the Create Linode workflow and select Newark, NJ (us-east) for the Region.
  • Select any of the listed Placement Groups.
  • Complete the remaining fields and click on the Create Linode button.
  • Verify that the request was successful.

Error

  • Update the placementGroupFactory by adding an additional element to the linode_ids array. This will make the Placement Group be at full capacity.
  • Go through the Create Linode workflow as above.
  • Verify that clicking on the Create Linode button results in an error and the Notice is displayed.

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 avatar Feb 14 '24 22:02 carrillo-erik

Coverage Report: โœ…
Base Coverage: 81.24%
Current Coverage: 81.24%

github-actions[bot] avatar Feb 16 '24 17:02 github-actions[bot]

  1. The placement_group payload is still sent when the flag is OFF, which we want to avoid

@abailly-akamai This makes sense, however, if the feature flag is OFF; should the value of placement_group be null or undefined?

carrillo-erik avatar Feb 16 '24 18:02 carrillo-erik

@carrillo-erik it should be undefined, because this key does not exist in the upstream schema

abailly-akamai avatar Feb 16 '24 18:02 abailly-akamai

@carrillo-erik When the error appears the tooltip icon shifts down. We should remove the tooltip icon here and just pass textFieldProps to <PlacementGroupsSelect />:

textFieldProps={{tooltipText}}

Obviously when you call the underlying <Autocomplete /> component you'll need to spread the props there {...textFieldProps} and maybe even add a tooltipText prop to the <TextField /> component itself in Autocomplete.tsx.

jaalah-akamai avatar Feb 17 '24 02:02 jaalah-akamai