Skip to content

refactor(disk_image): update DiskImage struct and related types #250

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

Merged
merged 3 commits into from
Apr 25, 2025

Conversation

uzaxirr
Copy link
Contributor

@uzaxirr uzaxirr commented Apr 22, 2025

No description provided.

@uzaxirr uzaxirr requested a review from Copilot April 22, 2025 17:08
@uzaxirr uzaxirr self-assigned this Apr 22, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors the DiskImage structures and related types to update field names and add new metadata properties. Key changes include:

  • Updating the DiskImage struct to include additional fields such as CreatedAt, CreatedBy, and DistributionDefault.
  • Adding new fields (Source and InitialUser) to CreateDiskImageParams and updating image size fields.
  • Modifying CreateDiskImageResponse to include new properties and potentially redundant image size fields.
Comments suppressed due to low confidence (2)

disk_image.go:61

  • There are two fields related to image size ('DiskImageSizeBytes' and 'ImageSize') in the response struct, which may lead to confusion. Consider consolidating them into a single, consistently named field.
ImageSize           int64     `json:"image_size"`

disk_image.go:30

  • The JSON tag for 'DistributionDefault' is used without omitempty in DiskImage but with omitempty in CreateDiskImageResponse. Ensure consistent tag usage across structures to avoid discrepancies.
DistributionDefault bool      `json:"distribution_default"`

Copy link
Contributor

@TheRealSibasishBehera TheRealSibasishBehera left a comment

Choose a reason for hiding this comment

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

I think there are test present in here which uses the types that are updated. So tests should be updated as well

@uzaxirr uzaxirr merged commit e23a4e3 into master Apr 25, 2025
16 checks passed
@uzaxirr uzaxirr deleted the disk-show branch April 28, 2025 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants