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

v0.44 backports plus v0.44.5 release #866

Merged
merged 8 commits into from
Dec 22, 2021

Conversation

vrothberg
Copy link
Member

As the title says.

@mheon @rhatdan @baude PTAL
@containers/podman-maintainers PTAL

With commit 86afb94 the dangling checks have been changed to be
compatible with Docker.  Since then, the dangling also need to compute
children.

Speed up the dangling and intermediate checks by computing the layer
tree *once* instead of for each filter invocation.

**Before:**
real    0m10.837s
user    0m11.308s
sys     0m4.231s

**After:**
real    0m0.476s
user    0m0.478s
sys     0m0.151s

Context: github.com/containers/podman/issues/11997
Signed-off-by: Valentin Rothberg <[email protected]>
Path-based transports may contain characters that are invalid for a
reference.  In such cases, we should pessimistically generate an ID
and not attempt to look at the (possibly path-based) string within the
transport.

This fixes an error when running `podman run dir:/tmp/CapitalChar` and
will prevent the same issue for the upcoming SIF transport.

Extend the tests to make sure we're not going to regress in the future.

Signed-off-by: Valentin Rothberg <[email protected]>
The previously inherited behavior from Podman was matching too
aggressively.  Now, the filter matches the exact behavior of
Docker, simplifies the code and is tested directly in libimage.

Context: containers/podman#11905
Signed-off-by: Valentin Rothberg <[email protected]>
It turns out that FamiliarMatch is only useful for matching Docker Hub
but we should not limit it to that and match values against registry.

For instance, FamiliarMatch is *not* able to match a FQN reference
against a Docker Hub image.  I am convinced that we should *not* behave
as Docker does in this case.

This brings us back to the behavior prior to commit 721661d but
with a fixed matching algorithm.  The specified value will now be
matched against 1) the FQN 2) without domain 3) without domain and path.
If specified also a second time without digest/tag.

Signed-off-by: Valentin Rothberg <[email protected]>
When loading a path we have to "guess" the underlying format and hence
attempt loading supported formats in a specific order.  When all
attempts have failed make sure that all loading errors are reported up,
in addition to debug logs, such that users can parse them for useful
information.

Fixes: github.com/containers/podman/issues/11730
Signed-off-by: Valentin Rothberg <[email protected]>
Archives generated with buildkit have some kind of "hybrid" layout which
is the same for OCI and Docker archives.  OCI ones ship with a
manifest.json but set the image's reference in the index.json but in a
custom annotation and not the one the OCI image spec wants.  Archives
in the Docker format set the reference in `RepoTags` of the
manifest.json.

To support these archives, simply look for the custom containerd
annotation *and* change the order back to give OCI archives precedence.

Fixes: containers/podman/issues/12560
Signed-off-by: Valentin Rothberg <[email protected]>
A series of backports for the Podman v3.5 release:

* load: support buildkit archives
* libimage: load: improve error messages
* libimage: fix reference filters
* reference filter: match exact behavior of Docker
* pull: fix pulling from dir transport
* libimage: speed up image filters

Signed-off-by: Valentin Rothberg <[email protected]>
Signed-off-by: Valentin Rothberg <[email protected]>
@flouthoc
Copy link
Collaborator

LGTM

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Dec 22, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: flouthoc, 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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@vrothberg
Copy link
Member Author

Heads up. The filter fixes may require tweaking a Podman test but they are fixing a bug nonetheless.

@rhatdan
Copy link
Member

rhatdan commented Dec 22, 2021

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Dec 22, 2021
@openshift-merge-robot openshift-merge-robot merged commit 560ed49 into containers:v0.44 Dec 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants