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

blueprints: fix filesystem customizations to allow toml Undecoded() #951

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Sep 24, 2024

  1. blueprints: fix filesystem customizations to allow toml Undecoded()

    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.
    mvo5 committed Sep 24, 2024
    Configuration menu
    Copy the full SHA
    f55bad7 View commit details
    Browse the repository at this point in the history