-
Notifications
You must be signed in to change notification settings - Fork 61
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
bib failed to build out config.toml with customizations.filesystem.mountpoint #655
Comments
By the way, if use config.json format, it does work. |
I can reproduce and know what the issue is, it's a regression from #549 - it's not yet clear what the best fix but I'm on it |
The current toml filesytem customizations will decode a `FilesystemCustomization` as a map[string]interface{}. This means that the underlying toml engine will not konw what keys inside the map are decoded and which are not decoded. This lead to the issue osbuild/bootc-image-builder#655 in `bootc-image-builder` where we check if we have unencoded entries and if so error (in this case incorrectly). This commit fixes the issue by moving the toml decoding from the struct/map[string]interface{} to primitive types. It's a bit ugly as is (partly because of the limited go type system) but with that the tests pass and len(meta.Undecoded()) is the expected zero. I opened BurntSushi/toml#425 to see if there is another way via a custom unmarshaler.
The underlying issue is osbuild/images#951 - this needs some tweaking/thinking, we should probably do a quicker fix (by disabling the meta.Undecoded() check) short term as this is a rather big regression :/ Thanks for catching/reporting this! |
This commit partially reverts PT#549 to unblock filesystem customizations in bib. This is a short term fix and we should revert and do something smarter like osbuild/images#951 or see if we can do better in the toml unmarshaling. But to unblock toml customizations this is a (IMHO) reasonable first step. Closes: osbuild#655
The current toml filesytem customizations will decode a `FilesystemCustomization` as a map[string]interface{}. This means that the underlying toml engine will not konw what keys inside the map are decoded and which are not decoded. This lead to the issue osbuild/bootc-image-builder#655 in `bootc-image-builder` where we check if we have unencoded entries and if so error (in this case incorrectly). This commit fixes the issue by moving the toml decoding from the struct/map[string]interface{} to primitive types. It's a bit ugly as is (partly because of the limited go type system) but with that the tests pass and len(meta.Undecoded()) is the expected zero. I opened BurntSushi/toml#425 to see if there is another way via a custom unmarshaler.
This commit partially reverts PT#549 to unblock filesystem customizations in bib. This is a short term fix and we should revert and do something smarter like osbuild/images#951 or see if we can do better in the toml unmarshaling. But to unblock toml customizations this is a (IMHO) reasonable first step. Closes: osbuild#655
This commit partially reverts PT#549 to unblock filesystem customizations in bib. This is a short term fix and we should revert and do something smarter like osbuild/images#951 or see if we can do better in the toml unmarshaling. But to unblock toml customizations this is a (IMHO) reasonable first step. Closes: #655
step 1 create one config.toml with customization.filesystem as below:
step 2 , run bib to generate image, but throw error as below:
The text was updated successfully, but these errors were encountered: