Skip to content

[0.12] cherry-pick migration to distribution/reference#6

Merged
corhere merged 18 commits into
Mirantis:v0.12from
sondavidb:use-distribution-reference
Jul 6, 2026
Merged

[0.12] cherry-pick migration to distribution/reference#6
corhere merged 18 commits into
Mirantis:v0.12from
sondavidb:use-distribution-reference

Conversation

@sondavidb

Copy link
Copy Markdown

Hey Mirantis folks 👋

Was trying to do some dependency bumps over in moby/moby's 25.0 branch and found that I couldn't get a containerd version bump due to buildkit's dependency on docker/distribution/reference, which has been moved over to distribution/reference. Decided that cherry-picking a couple commits into here should do the trick, since it points to a release here.

After this, I included the requisite containerd upgrade that this was initially for. This includes the signature changes that are included in v1.7.28, feel free to let me know if you'd like to split anything out. (Or if this is not a PR you're interested in taking.)

Thanks!

@sondavidb

Copy link
Copy Markdown
Author

Added some extra deps here which ends up removing the runc dependency entirely from the vendor tree. Worth noting that "vendor: switch from idtools to moby/sys/user" was giving me some compiler errors for darwin/386, not really sure about the best way to tackle those as I don't own either machine to test this on...

@corhere any chance you could take a look at this? Sorry for the bother.

Comment thread cache/manager.go Outdated
New(ctx context.Context, parent ImmutableRef, s session.Group, opts ...RefOption) (MutableRef, error)
GetMutable(ctx context.Context, id string, opts ...RefOption) (MutableRef, error) // Rebase?
IdentityMapping() *idtools.IdentityMapping
IdentityMapping() *user.IdentityMapping

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is unfortunately a breaking change -- the types are not identical. See if it's possible to jettison the troublesome libcontainer/user dependencies without changing the buildkit module's exported API by bumping the github.com/docker/docker dependency to 25.0.x and sticking with the idtools types, because moby/moby@df3a321

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Great catch, thanks for this. I just bumped the docker version and after a pretty messy rebase I think this is making the bump much cleaner 🙂

@sondavidb sondavidb force-pushed the use-distribution-reference branch 2 times, most recently from 7ff1918 to fe1d355 Compare June 11, 2026 19:32
@sondavidb

Copy link
Copy Markdown
Author

My bad thought I had pushed the changes to remove the vars 😔

@corhere corhere force-pushed the use-distribution-reference branch 7 times, most recently from 992052e to fc7ebbc Compare July 6, 2026 20:53
sondavidb and others added 18 commits July 6, 2026 17:07
Signed-off-by: David Son <davbson@amazon.com>
Signed-off-by: David Son <davbson@amazon.com>
Signed-off-by: David Son <davbson@amazon.com>
G115 has too many false positives to be immediately useful.

Signed-off-by: David Son <davbson@amazon.com>
Part of this includes adding some one-off ignores

Signed-off-by: David Son <davbson@amazon.com>
This migrates uses of github.com/opencontainers/runc/libcontainer/user
to the new github.com/moby/sys/user module, which was extracted from
runc at commit [opencontainers/runc@a3a0ec4].

This is the initial release of the module, which is a straight copy, but
some changes may be made in the next release (such as fixing camel-casing
in some fields and functions (Uid -> UID).

[opencontainers/runc@a3a0ec4]: opencontainers/runc@a3a0ec4

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 253c678)
Signed-off-by: David Son <davbson@amazon.com>
This is done instead of a proper 25.0 release tag as a proper tagged
release broke building for my local processes. So I figured this was the
best way to immediately resolve it.

We should probably still try to resolve these issues and bump to a
properly tagged 25.0 release.

Signed-off-by: David Son <davbson@amazon.com>
This changes usage of `github.com/docker/docker/pkg/archive` to
`github.com/moby/go-archive` to reduce dependencies on
`github.com/docker/docker`.

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
(cherry picked from commit c179924)
Signed-off-by: David Son <davbson@amazon.com>
Also includes some changes made to some field names, which should be a
no-op.

Signed-off-by: David Son <davbson@amazon.com>
Signed-off-by: Cory Snider <csnider@mirantis.com>
We already have a `reference.Spec` and `reference.Spec.Digest()` does
exactly this. In addition, buildkit was the only external consumer of
the `reference.SplitObject` function, and it may be deprecated and removed
for containerd 2.0.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 316b5f5)
Signed-off-by: Cory Snider <csnider@mirantis.com>
Signed-off-by: David Son <davbson@amazon.com>
Signed-off-by: David Son <davbson@amazon.com>
Signed-off-by: David Son <davbson@amazon.com>
Signed-off-by: David Son <davbson@amazon.com>
The otelgrpc interceptors were deprecated. This updates the areas where
these were used to use the stat handlers instead of the interceptors.
This helps with creating a single method for both unary and stream rpcs
and also ensures we aren't using a deprecated function for the future.

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
(cherry picked from commit c3105e4)
Signed-off-by: David Son <davbson@amazon.com>
Signed-off-by: Cory Snider <csnider@mirantis.com>
Copies over the telemetry sdk detection to utilize our own version of
semconv rather than mix the versions between different packages. This
will keep a consistent schema url instead of constantly chasing
whichever one the otel sdk is using.

The only thing left from the otel sdk is `WithFromEnv` which is
schemaless and won't conflict for that reason so we can continue to use
it.

Signed-off-by: Jonathan A. Sternberg <jonathan.sternberg@docker.com>
(cherry picked from commit 9863dd3)
Signed-off-by: Cory Snider <csnider@mirantis.com>
The reproducible-build test reproducibly builds an image that does not
have the expected digest after bumping the containerd client. The test
always fails with the same digest after bumping dependencies so it
appears the builds are reproducible when using the same Buildkit build
but not necessarily across different Buildkits. Update the expected
digest to satisfy the tests.

Signed-off-by: Cory Snider <csnider@mirantis.com>
@corhere corhere force-pushed the use-distribution-reference branch from fc7ebbc to 559c0ef Compare July 6, 2026 21:08
@corhere corhere merged commit 0c43564 into Mirantis:v0.12 Jul 6, 2026
27 checks passed
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