Skip to content

Conversation

@mtrmac
Copy link
Contributor

@mtrmac mtrmac commented Nov 11, 2025

A superset of #456 .

  • Also migrate to the new moby/moby/* Go modules
  • Update tests, allowing to remove more subpackages and test-only dependencies

... like TestGetCredentialsInteroperability does, for the same reason.

Signed-off-by: Miloslav Trmač <[email protected]>
Some of the string constants moved to internal subpackages,
so just hard-code the values; that allows removing various packages
from the (test-only) dependency tree.

Signed-off-by: Miloslav Trmač <[email protected]>
@github-actions github-actions bot added storage Related to "storage" package common Related to "common" package image Related to "image" package labels Nov 11, 2025
podmanbot pushed a commit to podmanbot/buildah that referenced this pull request Nov 11, 2025
@podmanbot
Copy link

✅ A new PR has been created in buildah to vendor these changes: containers/buildah#6494

github.com/distribution/reference v0.6.0 // indirect
github.com/docker/cli v28.5.2+incompatible // indirect
github.com/docker/cli v29.0.0+incompatible // indirect
github.com/docker/docker v28.5.2+incompatible // indirect
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I must be missing something here, I looked hard but I cannot figure out where this indirect github.com/docker/docker dep comes from. I feel like I have lost any understanding of how this works because AFAIK go contradicts itself here.

in the common directory:

$ go mod why github.com/docker/docker
# github.com/docker/docker
(main module does not need package github.com/docker/docker)
$ go mod why github.com/docker/cli
# github.com/docker/cli
(main module does not need package github.com/docker/cli)

I guess it has to do something around these "incompatible" versions

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, I didn’t notice that remaining, and I should have.

It comes from go.podman.io/image/v5 :) C/common refers to the last tag, and that still refers to the old module name. (go mod graph was helpful here.)

After (cd common; go mod edit -replace go.podman.io/image/v5=github.com/mtrmac/container-libs/image/v5@1fdbcec8ae39480c3313b0f1a62059a01a2ad718 && go mod tidy) (referring to the top commit of this PR) the dependencies disappear.

I don’t think the dependencies remaining matter much (they only affect version selection when using the docker/docker module path) but I would be fine with adding a follow-up PR, after this one is merged and we have a commit to refer to, to update the c/common → c/image reference.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh right, yeah I guess that is the price of the go workspace replace because the module resolver for external users works different as they don't have a local replace.

I guess I am fine knowing that this will get solved during the next release when we bump the versions in go.mod

Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mtrmac mtrmac merged commit acb3639 into containers:main Nov 12, 2025
38 checks passed
@mtrmac mtrmac deleted the moby branch November 12, 2025 19:35
Luap99 added a commit to inknos/podman that referenced this pull request Nov 14, 2025
image got converted to the new docker modules which were finally renamed
to moby[1]. Podman however still uses docker so now the swagger lookup
seems to find duplicated types which in general breaks the generation so
exclude the new module for now until we convert podman and fix the new
type issues swagger found.

[1] containers/container-libs#459

Signed-off-by: Paul Holzinger <[email protected]>
timcoding1988 pushed a commit to timcoding1988/podman that referenced this pull request Nov 21, 2025
image got converted to the new docker modules which were finally renamed
to moby[1]. Podman however still uses docker so now the swagger lookup
seems to find duplicated types which in general breaks the generation so
exclude the new module for now until we convert podman and fix the new
type issues swagger found.

[1] containers/container-libs#459

Signed-off-by: Paul Holzinger <[email protected]>
arsenalzp pushed a commit to arsenalzp/podman that referenced this pull request Nov 28, 2025
image got converted to the new docker modules which were finally renamed
to moby[1]. Podman however still uses docker so now the swagger lookup
seems to find duplicated types which in general breaks the generation so
exclude the new module for now until we convert podman and fix the new
type issues swagger found.

[1] containers/container-libs#459

Signed-off-by: Paul Holzinger <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

common Related to "common" package image Related to "image" package storage Related to "storage" package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants