-
Notifications
You must be signed in to change notification settings - Fork 54
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
blueprint: fix DiskCustomization.MinSize with existing pattern #1055
Conversation
The disk customizations min-size setting is not accepting strings or strings with units. This commit adds a failing test that will validate the fix.
This commit fixes the issue that minsize cannot be a string by using the existing pattern. See osbuild#1049 for alternative ideas.
9ee9d1e
to
d2a5d1a
Compare
@@ -18,6 +18,27 @@ type DiskCustomization struct { | |||
Partitions []PartitionCustomization `json:"partitions,omitempty" toml:"partitions,omitempty"` | |||
} | |||
|
|||
func (dc *DiskCustomization) UnmarshalJSON(data []byte) error { |
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.
meh, this lacks the toml unmarshaler :(
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.
Also needs some error tests
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.
We probably can close this in favor of #1057 which archives this with less code (but some boilerplate).
This commit fixes the issue that minsize cannot be a string by using the existing pattern. See osbuild#1055 for the alternative approach.
Moving to draft as this can most likely get closed in favor of #1057 |
Closing in favor of #1057 |
This commit fixes the issue that minsize cannot be a string by using the existing pattern. See #1055 for the alternative approach.
This commit fixes the issue that minsize cannot be a string
by using the existing pattern.
See #1049 for alternative
ideas.
The disk customizations min-size setting is not accepting strings
or strings with units. This commit adds a failing test that will
validate the fix.
[this was found as part of the work in bib, https://github.com/osbuild/bootc-image-builder/pull/721]