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-8014] - Update APIv4 and Validation packages based on Image Service spec #10541

Conversation

hkhalil-akamai
Copy link
Contributor

Description 📝

Updates the api-v4 and validation packages to reflect the API spec.

Changes 🔄

  • Added total_size and regions field to Image type
  • New type: ImageRegion
  • New image capability: 'distributed-images'
  • Add updateImageRegions SDK method
  • New validation scheme: updateImageRegionsSchema

Target release date 🗓️

6/10

How to test 🧪

Prerequisites

Note

These changes are only available in alpha. Additionally, this functionality is not working currently as image service development is in progress.

  • Connect to alpha API
  • Verify the shape of the total_size and regions fields matches what is returned by the API
  • 🔜 Verify calling the updateImageRegions API method results in a 200 response code

@hkhalil-akamai hkhalil-akamai added @linode/api-v4 Changes are made to the @linode/api-v4 package @linode/validation Changes are made to the @linode/validation package labels Jun 3, 2024
@hkhalil-akamai hkhalil-akamai self-assigned this Jun 3, 2024
@hkhalil-akamai hkhalil-akamai requested a review from a team as a code owner June 3, 2024 20:25
@hkhalil-akamai hkhalil-akamai requested review from jdamore-linode and abailly-akamai and removed request for a team June 3, 2024 20:25
@hkhalil-akamai hkhalil-akamai added the Images Relating to Images label Jun 3, 2024
Copy link

github-actions bot commented Jun 3, 2024

Coverage Report:
Base Coverage: 82.35%
Current Coverage: 82.35%

@@ -12,7 +12,7 @@ export const baseImageSchema = object({
label: labelSchema.notRequired(),
description: string().notRequired().min(1).max(65000),
cloud_init: boolean().notRequired(),
tags: array(string()).notRequired(),
tags: array(string().min(3).max(50)).max(500).notRequired(),
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if we have a validation schema we can share across linodes, volumes, etc for tags

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Are the requirements for tags always the same across the API?

Copy link
Member

Choose a reason for hiding this comment

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

I'm not 100% sure, but I would assume they are. Might require some investigation

Comment on lines +13 to +14
| 'pending deletion'
| 'pending replication'
Copy link
Member

@bnussman-akamai bnussman-akamai Jun 3, 2024

Choose a reason for hiding this comment

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

Maybe we should ask for verification on this... It would be very unusual to have a status with spaces instead of underscores so I'm surprised this is what was reflected in the spec

Copy link
Contributor

Choose a reason for hiding this comment

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

++

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Confirmed by Priyank Patel on API team

Copy link
Member

@bnussman-akamai bnussman-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 good based on the API spec ✅

packages/api-v4/src/images/types.ts Show resolved Hide resolved
Comment on lines +13 to +14
| 'pending deletion'
| 'pending replication'
Copy link
Contributor

Choose a reason for hiding this comment

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

++

@hkhalil-akamai hkhalil-akamai force-pushed the M3-8014-image-service-api-changes branch from 2514286 to ee9d693 Compare June 4, 2024 17:17
@hkhalil-akamai hkhalil-akamai merged commit e092248 into linode:develop Jun 4, 2024
18 checks passed
@hkhalil-akamai hkhalil-akamai deleted the M3-8014-image-service-api-changes branch June 4, 2024 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Images Relating to Images @linode/api-v4 Changes are made to the @linode/api-v4 package @linode/validation Changes are made to the @linode/validation package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants