-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Closes #15617: emit container labels for container exited and exec died events #15633
Conversation
|
Here ya go # Prior to #15633, container labels would not appear in 'die' log events
@test "events - labels included in container die" {
local cname=c$(random_string 15)
local lname=l$(random_string 10)
local lvalue="v$(random_string 10) $(random_string 5)"
run_podman 17 --events-backend=file run --rm \
--name=$cname \
--label=$lname="$lvalue" \
$IMAGE sh -c 'exit 17'
run_podman --events-backend=file events \
--filter=container=$cname \
--filter=status=died \
--stream=false \
--format=json
local label_found=$(jq -r ".Attributes.$lname" <<<"$output")
assert "$label_found" = "$lvalue" "podman-events output includes container label"
} |
Thanks, @edsantiago ! |
LGTM other then handling tests. |
UPDATE: now that #15644 has merged, please rebase and change the last few lines of my suggestion above to:
|
LGTM. Thanks again. |
@edsantiago @vrothberg many thanks for helping me over the bats-based unit test hurdles; things start to finally dawn for me now. And now for something not completely different, the obligatory xkcd https://xkcd.com/1296/ ;) |
Oops! My bad, I didn't test with podman-remote, which apparently rejects |
- adds unit test for container labels on container die event - implements #15617 Signed-off-by: Harald Albrecht <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
Thanks!
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: thediveo, vrothberg The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Does this PR introduce a user-facing change?