pkg/domain: return an error instead of nil on remote event parse failure#29055
Open
ROKUMATE wants to merge 2 commits into
Open
pkg/domain: return an error instead of nil on remote event parse failure#29055ROKUMATE wants to merge 2 commits into
ROKUMATE wants to merge 2 commits into
Conversation
fefb8b2 to
a69f2e7
Compare
danishprakash
left a comment
Member
There was a problem hiding this comment.
Please refer to main/CONTRIBUTING.md main/LLM_POLICY.md.
And also it'd be helpful if you could follow the PR template for the description.
Contributor
Author
|
@danishprakash i read it i added the checklist for now |
|
[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore. |
Signed-off-by: ROKUMATE <rohitkumawat0110@gmail.com>
Signed-off-by: ROKUMATE <rohitkumawat0110@gmail.com>
a69f2e7 to
88e6c48
Compare
This file contains hidden or 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
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.
What
In remote mode,
podman events --format jsoncould print the literalnullinstead of an event object.
ConvertToLibpodEventreturnednilon a parsefailure and the tunnel forwarded it as an event with no error set, so the nil
event was marshalled to
null.This returns an error from
ConvertToLibpodEventand sends it on the eventchannel (which the CLI already handles) instead of a nil event.
Test
pkg/domain/entities/events_test.go: a valid event converts correctly, andunknown status, unknown type, and an invalid
containerExitCodeeach return anerror instead of nil.
Checklist
make validateprDoes this PR introduce a user-facing change?
the
podman events --format jsoncmd no longer prints null when a server event can't be parsed ... it returns an error instead