Skip to content

[release/1.5] go.mod: cut circular dependency on github.com/containerd/containerd#5457

Merged
estesp merged 2 commits intocontainerd:release/1.5from
thaJeztah:1.5_backport_dont_loop_da_loop
May 6, 2021
Merged

[release/1.5] go.mod: cut circular dependency on github.com/containerd/containerd#5457
estesp merged 2 commits intocontainerd:release/1.5from
thaJeztah:1.5_backport_dont_loop_da_loop

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

backport of #5441

thaJeztah added 2 commits May 6, 2021 12:42
Signed-off-by: Sebastiaan van Stijn <[email protected]>
(cherry picked from commit 15e0bd5)
Signed-off-by: Sebastiaan van Stijn <[email protected]>
This forces vendoring to only take dependencies of this repository to
be taken into account, effectively cutting the circular dependency (for
the vendored code), and to prevent depending on transitive dependencies
coming from older versions of containerd.

go mod does not allow using the main module as a local "replace" rule using
a path; see golang/go#45492 and golang/go#34417, so instead, an empty module
is used.

One change observed is that older versions containerd depended on an older
version of imgcrypt that had an "indirect" dependency on more current versions
of gopkg.in/yaml.v2 and prometheus/procfs.

For those, a temporary "indirect" dependency was added, until prometheus/client_golang
and kubernetes are updated.

from go mod graph (before):

    github.com/containerd/[email protected] gopkg.in/[email protected]
    github.com/containerd/[email protected] github.com/prometheus/[email protected]

For some reason, some older versions of containerd are still taken into account,
causing satori/go.uuid to be added as "indirect" dependency, likely because some
modules have this dependency in their go.sum. This should likely disappear once
those plugins are updated to contain a current version of containerd.

    git grep 'github.com/satori/go.uuid'
    vendor/github.com/Microsoft/hcsshim/go.sum:github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
    vendor/github.com/containerd/aufs/go.sum:github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
    vendor/github.com/containerd/imgcrypt/go.sum:github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
    vendor/github.com/containerd/nri/go.sum:github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
    vendor/github.com/containerd/zfs/go.sum:github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=

Signed-off-by: Sebastiaan van Stijn <[email protected]>
(cherry picked from commit e26fc84)
Signed-off-by: Sebastiaan van Stijn <[email protected]>
@thaJeztah thaJeztah added this to the 1.5.1 milestone May 6, 2021
Copy link
Copy Markdown
Member

@dims dims left a comment

Choose a reason for hiding this comment

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

LGTM

yes please!

Copy link
Copy Markdown
Contributor

@Zyqsempai Zyqsempai left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

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

LGTM

@estesp estesp merged commit 7507b47 into containerd:release/1.5 May 6, 2021
@thaJeztah thaJeztah deleted the 1.5_backport_dont_loop_da_loop branch May 6, 2021 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants