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

remote API: restore v4 payload in container inspect #22700

Merged
merged 1 commit into from
May 22, 2024

Conversation

Luap99
Copy link
Member

@Luap99 Luap99 commented May 14, 2024

The v5 API made a breaking chnage for podman inspect, this means that old client could not longer parse the result from the new 5.X server. The other way around new client and old server were already fixed.

In order to keep the API working we now have a version check and return the old v4 compatiable payload so the old remote client can still work against a newer server.

Fixes #22657

Does this PR introduce a user-facing change?

The remote API now return compatible v4.X container inspect output when a request with v4.0.0 is made. This makes old 4.X clients work with a new 5.X server. 

The v5 API made a breaking change for podman inspect, this means that
an old client could not longer parse the result from the new 5.X server.
The other way around new client and old server already worked.

As it turned out there were several users that run into this, one case
to hit this is using an old 4.X podman machine wich now pulls a newer
coreos with podman 5.0. But there are also other users running into it.
In order to keep the API working we now have a version check and return
the old v4 compatible payload so the old remote client can still work
against a newer server thus removing any major breaking change for an
old client.

Fixes containers#22657

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
Copy link
Contributor

openshift-ci bot commented May 14, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Luap99

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 May 14, 2024
@github-actions github-actions bot added the kind/api-change Change to remote API; merits scrutiny label May 14, 2024
Copy link

Ephemeral COPR build failed. @containers/packit-build please check.

Copy link

Cockpit tests failed for commit bcb7edf. @martinpitt, @jelly, @mvollmer please check.

@rhatdan
Copy link
Member

rhatdan commented May 14, 2024

LGTM

@Luap99
Copy link
Member Author

Luap99 commented May 22, 2024

@mheon PTAL

@mheon
Copy link
Member

mheon commented May 22, 2024

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label May 22, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit cc79d5e into containers:main May 22, 2024
88 of 91 checks passed
@Luap99 Luap99 deleted the libpod-inspect-API-v4 branch May 22, 2024 12:37
@Luap99
Copy link
Member Author

Luap99 commented May 22, 2024

/cherry-pick v5.1

@openshift-cherrypick-robot
Copy link
Collaborator

@Luap99: new pull request created: #22781

In response to this:

/cherry-pick v5.1

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/api-change Change to remote API; merits scrutiny lgtm Indicates that a PR is ready to be merged. release-note
Projects
None yet
Development

Successfully merging this pull request may close these issues.

when host has podman from podman-next and podman-remote is run inside a toolbox : unmarshalling error
4 participants