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

blueprint: add map conversion check to fs customization unmarshaller #1033

Merged

Conversation

achilleas-k
Copy link
Member

@achilleas-k achilleas-k commented Nov 11, 2024

If an element in the customizations.filesystem array is not an object, the existing code would fail the conversion without an error, but would fail on the d["mountpoint"].(type) conversion, which produces an error message that isn't very useful:

  mountpoint must be string, got <nil> of type <nil>

The commit catches the conversion error and instead prints a more useful error message.

If an element in the `customizations.filesystem` array is not an object,
the existing code would fail the conversion without an error, but would
fail on the `d["mountpoint"].(type)` conversion, which produces an error
message that isn't very useful:

  mountpoint must be string, got <nil> of type <nil>

The commit catches the conversion error and instead prints a more useful
error message.
@achilleas-k achilleas-k force-pushed the customizations/filesystem/toml/not-an-object branch from 20d2fc9 to 908c643 Compare November 11, 2024 23:22
Copy link
Contributor

@bcl bcl left a comment

Choose a reason for hiding this comment

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

Look ok

@ondrejbudai ondrejbudai added this pull request to the merge queue Nov 12, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 12, 2024
Copy link
Contributor

@mvo5 mvo5 left a comment

Choose a reason for hiding this comment

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

❤️

@mvo5 mvo5 added this pull request to the merge queue Nov 12, 2024
Merged via the queue into osbuild:main with commit 70fd73a Nov 12, 2024
19 checks passed
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.

4 participants