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

COMPOSER-2016: blueprint: make Convert respect nils #3612

Merged
merged 1 commit into from
Aug 10, 2023

Conversation

ondrejbudai
Copy link
Member

Previously, nil values in the conversion source were in some cases converted to empty arrays or empty objects. This is undesirable, because it can be in certain cases changing the semantics of the blueprint. See e.g. https://github.com/osbuild/images/blob/f317064da574a8475d438972e9c54bc67ffa1dfb/pkg/distro/rhel7/imagetype.go#L239C7-L239C7

This commit modifies the conversion process so nil values are converted without any changes. Also, the Convert function was covered with a unit test.

This pull request includes:

  • adequate testing for the new functionality or fixed issue

Previously, nil values in the conversion source were in some cases converted
to empty arrays or empty objects. This is undesirable, because it can be in
certain cases changing the semantics of the blueprint. See e.g.
https://github.com/osbuild/images/blob/f317064da574a8475d438972e9c54bc67ffa1dfb/pkg/distro/rhel7/imagetype.go#L239C7-L239C7

This commit modifies the conversion process so nil values are converted
without any changes. Also, the `Convert` function was covered with a unit
test.
@achilleas-k achilleas-k merged commit 1a6dac1 into osbuild:main Aug 10, 2023
32 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.

2 participants