Skip to content

Vendor dependency cycle-free swarmkit#47443

Merged
cpuguy83 merged 3 commits into
moby:masterfrom
corhere:cnmallocator/lift-n-shift
Mar 21, 2024
Merged

Vendor dependency cycle-free swarmkit#47443
cpuguy83 merged 3 commits into
moby:masterfrom
corhere:cnmallocator/lift-n-shift

Conversation

@corhere

@corhere corhere commented Feb 23, 2024

Copy link
Copy Markdown
Contributor

Moby imports Swarmkit; Swarmkit no longer imports Moby. In order to accomplish this feat, Swarmkit has introduced a new plugin.Getter interface so it could stop importing our pkg/plugingetter package. This new interface is not entirely compatible with our
plugingetter.PluginGetter interface, necessitating a thin adapter.

Swarmkit had to jettison the CNM network allocator to stop having to import libnetwork as the cnmallocator package is deeply tied to libnetwork. Move the CNM network allocator into libnetwork, where it belongs. The package had a short an uninteresting Git history in the Swarmkit repository so no effort was made to retain history.

- What I did

- How I did it

- How to verify it

- Description for the changelog

- A picture of a cute animal (not mandatory but encouraged)

Comment thread libnetwork/cnmallocator/provider_test.go Outdated
Comment thread libnetwork/cnmallocator/networkallocator_test.go Outdated
@corhere corhere force-pushed the cnmallocator/lift-n-shift branch from 6fe7928 to 39f72ec Compare February 27, 2024 17:51
@corhere corhere changed the title WIP vendor dependency cycle-free swarmkit Vendor dependency cycle-free swarmkit Feb 27, 2024
@corhere corhere force-pushed the cnmallocator/lift-n-shift branch 2 times, most recently from b9c4449 to 7110620 Compare February 27, 2024 17:56
@corhere corhere marked this pull request as ready for review February 27, 2024 18:04
@corhere corhere force-pushed the cnmallocator/lift-n-shift branch from 7110620 to 80376cc Compare February 27, 2024 18:17
Moby imports Swarmkit; Swarmkit no longer imports Moby. In order to
accomplish this feat, Swarmkit has introduced a new plugin.Getter
interface so it could stop importing our pkg/plugingetter package. This
new interface is not entirely compatible with our
plugingetter.PluginGetter interface, necessitating a thin adapter.

Swarmkit had to jettison the CNM network allocator to stop having to
import libnetwork as the cnmallocator package is deeply tied to
libnetwork. Move the CNM network allocator into libnetwork, where it
belongs. The package had a short an uninteresting Git history in the
Swarmkit repository so no effort was made to retain history.

Signed-off-by: Cory Snider <csnider@mirantis.com>
@corhere corhere force-pushed the cnmallocator/lift-n-shift branch from 80376cc to 7b0ab10 Compare February 28, 2024 14:46
Apply command gotest.tools/v3/assert/cmd/gty-migrate-from-testify to the
cnmallocator package to be consistent with the assertion library used
elsewhere in moby.

Signed-off-by: Cory Snider <csnider@mirantis.com>
While github.com/stretchr/testify is not used directly by any of the
repository code, it is a transitive dependency via Swarmkit and
therefore still easy to use without having to revendor. Add lint rules
to ban importing testify packages to make sure nobody does.

Signed-off-by: Cory Snider <csnider@mirantis.com>
@neersighted neersighted added this to the v-future milestone Mar 7, 2024
@thaJeztah thaJeztah modified the milestones: v-future, 27.0.0 Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Development

Successfully merging this pull request may close these issues.

5 participants