Skip to content

Create github.com/moby/moby/api and github.com/moby/moby/client module#50280

Merged
thaJeztah merged 6 commits intomoby:masterfrom
dmcgowan:api-go-mod
Jul 21, 2025
Merged

Create github.com/moby/moby/api and github.com/moby/moby/client module#50280
thaJeztah merged 6 commits intomoby:masterfrom
dmcgowan:api-go-mod

Conversation

@dmcgowan
Copy link
Copy Markdown
Member

Create a go module from the api directory and uses it in the main module.

Note: first just testing this out, we can figure out how to automate the replace similar to what was done in containerd later. At least having a command for go mod edit -replace=github.com/moby/moby/api=./api

Depends on #50278

@dmcgowan dmcgowan added this to the 29.0.0 milestone Jun 30, 2025
@dmcgowan dmcgowan force-pushed the api-go-mod branch 6 times, most recently from 73d6977 to 30ca98f Compare July 2, 2025 22:46
@dmcgowan
Copy link
Copy Markdown
Member Author

dmcgowan commented Jul 2, 2025

The validation doesn't seem to handle the go modules, I imagine we explicitly turn off the environment variable. Validation will currently fail if the submodules require a testing library that the main module doesn't use. We can probably solve this in the future once the other modules are complete, in the meantime, #50317 fixes the validation.

The gocompat had similar issues but we shouldn't need it after this since api and client will be the supported packages.

@dmcgowan
Copy link
Copy Markdown
Member Author

dmcgowan commented Jul 2, 2025

Also see #50318

@dmcgowan dmcgowan moved this to In Progress in go modules transition Jul 2, 2025
@dmcgowan dmcgowan changed the title Create github.com/moby/moby/api module Create github.com/moby/moby/api and github.com/moby/moby/client module Jul 3, 2025
@dmcgowan dmcgowan moved this from New to Open in 🔦 Maintainer spotlight Jul 3, 2025
@dmcgowan dmcgowan force-pushed the api-go-mod branch 2 times, most recently from f33eae5 to 5de6ee4 Compare July 8, 2025 17:40
@dmcgowan dmcgowan marked this pull request as ready for review July 8, 2025 23:11
Comment thread vendor.mod
Comment thread vendor.mod Outdated
@thompson-shaun thompson-shaun added the release-blocker PRs we want to block a release on label Jul 14, 2025
@dmcgowan dmcgowan force-pushed the api-go-mod branch 3 times, most recently from c3c52d1 to 57c5046 Compare July 16, 2025 19:50
Copy link
Copy Markdown
Contributor

@austinvazquez austinvazquez left a comment

Choose a reason for hiding this comment

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

🎉 wow, looks clean.

Copy link
Copy Markdown
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

I need to have a closer look before going ahead

dmcgowan added 6 commits July 21, 2025 09:29
These tests don't account well for submodules and are not needed when
importers are using go modules. The tests are still relevant in the 28
branch which does not use go modules.

Signed-off-by: Derek McGowan <[email protected]>
@thaJeztah
Copy link
Copy Markdown
Member

thaJeztah commented Jul 21, 2025

Copy link
Copy Markdown
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-blocker PRs we want to block a release on

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

6 participants