Skip to content

Conversation

thaJeztah
Copy link
Member

@thaJeztah thaJeztah commented Jul 17, 2025

- What I did

- How I did it

- How to verify it

- Human readable description for the release notes

Go SDK: migrate to `github.com/moby/moby/api` and `github.com/moby/moby/client` modules.

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

@codecov-commenter
Copy link

codecov-commenter commented Jul 17, 2025

Codecov Report

Attention: Patch coverage is 25.00000% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cli/command/cli.go 0.00% 2 Missing ⚠️
internal/test/cli.go 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link
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.

🚀

@thaJeztah
Copy link
Member Author

@vvoland ptal 🤗

@@ -6,6 +6,12 @@ module github.com/docker/cli

go 1.23.0

replace (
// FIXME(thaJeztah): temporarily need to pin on commits, otherwise go modules won't resolve until these are tagged.
github.com/moby/moby/api => github.com/moby/moby/api v0.0.0-20250721205005-81caabae43aa
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't want to just put these in the require for now rather than use replace?

Copy link
Member Author

Choose a reason for hiding this comment

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

That didn't want to work, because api/ and client/ don't have existing tags, so go modules then generates an invalid pseudo version and barfs out

Copy link
Member Author

Choose a reason for hiding this comment

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

I can give it another try to see what the exact error was; there's some more PRs merged in moby that I can bump as well; otherwise we'll just have to keep the replace for now

Copy link
Contributor

Choose a reason for hiding this comment

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

Can still get this in, but would be curious about the error with pseudo versioning. Personally, I really don't like the pseudo versioning and would rather just create alpha/beta tags. For pseudo versioning I always have to try it, fail, then copy in the pseudo version from the error.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, Go should never have done the pseudo-versions; just considered "if you specify a commit, we won't do any version resolution; it's your responsibility now").

This is the error I get; problem looks to be that it wants to generate a pseudo version, but can't do so, because there's no pre-existing api/vx.y.z or client/vx.y.z tag - I suspect this is all because it want's to dream up a version. Honestly I think it's a bug in Go (for v0.0.0 case)

3.472 go 1.23.0
3.472 + trap 'rm -f "${ROOTDIR}/go.mod"' EXIT
3.472 + GO111MODULE=on
3.472 + GOTOOLCHAIN=local
3.472 + ./scripts/vendor update
3.473 + go mod tidy -modfile=vendor.mod
5.318 go: github.com/moby/moby/[email protected]: reading github.com/moby/moby/api/go.mod at revision api/v0.0.0: unknown revision api/v0.0.0
5.321 + rm -f /src/go.mod

Trying to trick it into using the same version as docker/docker also doesn't work, because it has a go.mod so +incompatible is no longer allowed;

17.95 	github.com/kylelemons/godebug/diff: github.com/moby/moby/[email protected]+incompatible: invalid version: module contains a go.mod file, so module path must match major version ("github.com/moby/moby/api/v28")

So I tried to trick it with the last "SemVer" tag in moby/moby master, which was v1.13.1, so using v1.13.2 pseudo-version, but nope, it still wants a api/vxxx tag;

18.21 	github.com/kylelemons/godebug/diff: github.com/moby/moby/[email protected]: invalid pseudo-version: preceding tag (v1.13.1) not found

@thaJeztah
Copy link
Member Author

Let me bring this one in; more coming after this

@thaJeztah thaJeztah merged commit 03ff54b into docker:master Jul 22, 2025
110 of 115 checks passed
@thaJeztah thaJeztah deleted the bump_engine branch July 22, 2025 07:19
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.

5 participants