manager icon indicating copy to clipboard operation
manager copied to clipboard

change: [M3-10174] - VM Host Maintenance API Updates

Open jaalah-akamai opened this issue 6 months ago โ€ข 1 comments

Waiting on: https://github.com/linode/manager/pulls/hkhalil-akamai

Description ๐Ÿ“

Changes to API spec

Changes ๐Ÿ”„

  1. id => slug
  2. name => label
  3. slug = 1 | 2; => slug = 'migrate' | 'power_off_on';
  4. type: 'migrate' | 'power-off/on'; => type: 'migrate' | 'power_off_on';
  5. maintenance_policy_id => maintenance_policy
  6. maintenance_policy now using the slug for possible values 'migrate' | 'power_off_on'

Target release date ๐Ÿ—“๏ธ

6/24

Preview ๐Ÿ“ท

Before After
๐Ÿ“ท ๐Ÿ“ท

How to test ๐Ÿงช

Prerequisites

(How to setup test environment)

  • ...
  • ...

Reproduction steps

(How to reproduce the issue, if applicable)

  • [ ] ...
  • [ ] ...

Verification steps

(How to verify changes)

  • [ ] ...
  • [ ] ...
Author Checklists

As an Author, to speed up the review process, I considered ๐Ÿค”

๐Ÿ‘€ 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


  • [ ] I have read and considered all applicable items listed above.

As an Author, before moving this PR from Draft to Open, I confirmed โœ…

  • [ ] All unit tests are passing
  • [ ] TypeScript compilation succeeded without errors
  • [ ] Code passes all linting rules

jaalah-akamai avatar Jun 13 '25 21:06 jaalah-akamai

Followup TODO:

  • [x] https://github.com/linode/manager/pull/12334#discussion_r2152548239
  • [x] https://github.com/linode/manager/pull/12334#discussion_r2152463920

jaalah-akamai avatar Jun 17 '25 15:06 jaalah-akamai

Looking into src/features/VPCs/VPCDetail/VPCSubnetsTable.test.tsx which passes locally ๐Ÿ‘€

jaalah-akamai avatar Jun 23 '25 15:06 jaalah-akamai

@bnussman-akamai did you have a more elegant way to address the type errors than casting? TypeScript is not properly inferring the form types in the Linode Create flow, LinodeCreateFormValues.

jaalah-akamai avatar Jun 23 '25 15:06 jaalah-akamai

@bnussman-akamai did you have a more elegant way to address the type errors than casting? TypeScript is not properly inferring the form types in the Linode Create flow, LinodeCreateFormValues.

~~I think I can actually resolve this with individual watch calls without combining them~~

https://github.com/linode/manager/blob/a8aba003bfba544552bf15261c38e70b7599e684/packages/manager/src/features/Linodes/LinodeCreate/Region.tsx#L60-L63:

const selectedLinode = useWatch({ control, name: 'linode' });
const selectedImage = useWatch({ control, name: 'image' });

jaalah-akamai avatar Jun 23 '25 15:06 jaalah-akamai

Cloud Manager UI test results

:tada: 662 passing tests on test run #9 โ†—๏ธŽ

:x: Failing:white_check_mark: Passing:arrow_right_hook: Skipped:clock1: Duration
0 Failing662 Passing4 Skipped146m 39s

linode-gh-bot avatar Jun 24 '25 01:06 linode-gh-bot

Closing this branch to start fresh. I feel there were things that maybe got introduced. New PR has all these issues fixed.

Edit: See https://github.com/linode/manager/pull/12417/files#r2162865311

jaalah-akamai avatar Jun 24 '25 02:06 jaalah-akamai

https://github.com/linode/manager/pull/12417

jaalah-akamai avatar Jun 24 '25 02:06 jaalah-akamai