osbuild / images

Image builder image definition library
Apache License 2.0
23 stars 52 forks source link

datasize, blueprint: add new `datasizes.Size` type and use in blueprints #1049

Open mvo5 opened 1 day ago

mvo5 commented 1 day ago

This is split out from https://github.com/osbuild/images/pull/1041 and also includes a cleanup from https://github.com/osbuild/images/pull/951

The idea is to make simplify the filesystem customization decoding to only use primitive types (string and the new datasizes.Size type) which means simpler code (as the mountpoint to string conversion will be done automatically for us) and also that we can use meta.Undecoded() for the toml library.

The tradeoff is of couse that it's slightly ugly that we now need to cast MinSize to uint64, if that is considered too ugly I can close this again.

schutzbot commented 1 day ago

This PR changes the images API or behaviour causing integration failures with osbuild-composer. The next update of the images dependency in osbuild-composer will need work to adapt to these changes.

This is simply a notice. It will not block this PR from being merged.

achilleas-k commented 20 hours ago

if that is considered too ugly I can close this again.

I don't think it's ugly at all. Maybe it could be ever so slightly cleaner if we have a size.Uint64()? Not a big difference though.