-
Notifications
You must be signed in to change notification settings - Fork 54
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
Distro: fail on OSTree image options being provided for non-OSTree based image types #1071
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Modify unit tests common for all distros to add OSTree image options to the `ImageOptions` only for OSTree-based images. Alternatively, some unit tests that are focused on OSTree now skip testing non-OSTree image types. Signed-off-by: Tomáš Hozza <[email protected]>
Modify the `checkOptions()` function to return an `error` in case the OSTree image options are specified for a non-OSTree based image. Previously, these would be silently ignored. Signed-off-by: Tomáš Hozza <[email protected]>
Modify the `checkOptions()` function to return an `error` in case the OSTree image options are specified for a non-OSTree based image. Previously, these would be silently ignored. Signed-off-by: Tomáš Hozza <[email protected]>
Add a common distro unit test, which verifies that specifying OSTree image options for non-OSTree based image types produces an error, while specifying it for OSTree based images doesn't. Signed-off-by: Tomáš Hozza <[email protected]>
achilleas-k
approved these changes
Nov 27, 2024
thozza
added a commit
to thozza/osbuild-images
that referenced
this pull request
Dec 6, 2024
This was missed in PR#1071 [0]. [0] osbuild#1071 Signed-off-by: Tomáš Hozza <[email protected]>
thozza
added a commit
to thozza/osbuild-images
that referenced
this pull request
Dec 6, 2024
This was missed in PR#1071 [0]. [0] osbuild#1071 Signed-off-by: Tomáš Hozza <[email protected]>
thozza
added a commit
to thozza/osbuild-composer
that referenced
this pull request
Dec 7, 2024
Previously, the `OSTree` property in the Weldr API `ComposeRequest` struct was not a pointer to the `ostree.ImageOptions` type. As a result, it was initialized to an empty struct, even if not set in the client API call. As a result, the `OSTree` property in the `distro.ImageOptions` was always not `nil`, when initializing the osbuild manifest. However, after a change in `osbuild/images` [0], providing OSTree options for non-OSTree image types is no longer considered valid. This caused a failure to submit a new compose for any non-OSTree image type. Change the `OSTree` property in Weldr `ComposeRequest` to be a pointer and mark it as optional. [0] osbuild/images#1071 Signed-off-by: Tomáš Hozza <[email protected]>
ondrejbudai
pushed a commit
to osbuild/osbuild-composer
that referenced
this pull request
Dec 9, 2024
Previously, the `OSTree` property in the Weldr API `ComposeRequest` struct was not a pointer to the `ostree.ImageOptions` type. As a result, it was initialized to an empty struct, even if not set in the client API call. As a result, the `OSTree` property in the `distro.ImageOptions` was always not `nil`, when initializing the osbuild manifest. However, after a change in `osbuild/images` [0], providing OSTree options for non-OSTree image types is no longer considered valid. This caused a failure to submit a new compose for any non-OSTree image type. Change the `OSTree` property in Weldr `ComposeRequest` to be a pointer and mark it as optional. [0] osbuild/images#1071 Signed-off-by: Tomáš Hozza <[email protected]>
github-merge-queue bot
pushed a commit
that referenced
this pull request
Dec 9, 2024
This was missed in PR#1071 [0]. [0] #1071 Signed-off-by: Tomáš Hozza <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Modify
checkOptions()
of all distributions to fail if the OSTree image options are provided for the non-OSTree-based image type. Previously, these would be silently ignored. Add a unit test to verify the behavior.