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

legacy events: also set Action="die" #12643

Merged
merged 2 commits into from
Jan 4, 2022

Conversation

leahneukirchen
Copy link
Contributor

Closes #12628.

This only affects the legacy Docker API, so can be merged as a bugfix.

Since containers#10168, on the event "died", the Status is set to "die"
for compatibility with the Docker API.  Docker also sets
the field Action to "died", so do the same here.

Signed-off-by: Leah Neukirchen <[email protected]>
@mheon
Copy link
Member

mheon commented Dec 17, 2021

CI is complaining about lack of a regression test; otherwise LGTM

/approve

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 17, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: leahneukirchen, mheon

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 17, 2021
@leahneukirchen
Copy link
Contributor Author

I would love to add a test, but I couldn't find any for this part of the code yet?

@rhatdan
Copy link
Member

rhatdan commented Dec 18, 2021

LGTM
Thanks @leahneukirchen

@TomSweeneyRedHat
Copy link
Member

LGTM
but tests are unhappy, I suspect it's a flake and not related.

@mheon
Copy link
Member

mheon commented Dec 22, 2021

Naw, it's still angry about tests. Integration tests can't test this because it's specific to the HTTP API - APIv2 tests at https://github.com/containers/podman/tree/main/test/apiv2 would seem the appropriate place, but I can find no tests for the events endpoint in there.

For Status = "die", Docker sets the exit code of the container
to a field "exitCode".  Podman uses "containerExitCode".
Copy the value into "exitCode" as well, for compatibility.

Signed-off-by: Leah Neukirchen <[email protected]>
@leahneukirchen
Copy link
Contributor Author

These failures are totally unrelated to what I touched, no?

@mheon
Copy link
Member

mheon commented Jan 4, 2022

Restarted the failed test

@rhatdan
Copy link
Member

rhatdan commented Jan 4, 2022

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jan 4, 2022
@openshift-merge-robot openshift-merge-robot merged commit 9a35494 into containers:main Jan 4, 2022
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docker incompatibility: events API uses Action="died", not Action="die"
5 participants