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

fix(compose): .build Quadlet file error reporting #127

Merged
merged 1 commit into from
Oct 28, 2024

Conversation

k9withabone
Copy link
Member

If there was an error converting the build section of a Compose service it would not be reported to the user. The rest of the service would fail to convert to a .container Quadlet file as the image would not be set (it's set after the build section is successfully converted). The user would receive a "image or build is required" error as the service error would be reported first.

Changed podlet::cli::compose::services_try_into_quadlet_files() so that if an error occurs when converting the build section, it is reported to the user without attempting to convert the rest of the service.

Fixes: #126

If there was an error converting the `build` section of a Compose
service it would not be reported to the user. The rest of the service
would fail to convert to a `.container` Quadlet file as the `image`
would not be set (it's set after the `build` section is successfully
converted). The user would receive a "`image` or `build` is required"
error as the service error would be reported first.

Changed `podlet::cli::compose::services_try_into_quadlet_files()` so
that if an error occurs when converting the `build` section, it is
reported to the user without attempting to convert the rest of the
service.

Fixes: #126
Signed-off-by: Paul Nettleton <[email protected]>
@k9withabone k9withabone added the bug Something isn't working label Oct 26, 2024
@k9withabone k9withabone added this to the v0.3.1 milestone Oct 26, 2024
@k9withabone
Copy link
Member Author

@Timon-Schneider could you test this out? Thanks for reporting the issue!

@Timon-Schneider
Copy link

Works: #126

@k9withabone k9withabone merged commit 8e7585e into main Oct 28, 2024
13 checks passed
@k9withabone k9withabone deleted the fix-compose-build-error-reporting branch October 28, 2024 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compose with build section: image or build is required.
2 participants