Skip to content

build: bump Go to 1.27.2 and secrets-engine/client to v0.2.1 - #14361

Draft
Benehiko wants to merge 2 commits into
docker:mainfrom
Benehiko:bump-secrets-engine-client
Draft

Benehiko wants to merge 2 commits into
docker:mainfrom
Benehiko:bump-secrets-engine-client

Conversation

@Benehiko

Copy link
Copy Markdown
Member

What I did

  • Bumped github.com/docker/secrets-engine/client from v0.2.0 to v0.2.1. This also moves secrets-engine/x from v0.8.3 to v0.8.4.
  • client v0.2.1 requires go >= 1.27.2, so this also bumps the go directive in go.mod, .go-version (used by CI) and GO_VERSION in the Dockerfile to 1.27.2.

client v0.2.1 checks that stored Docker Hub access tokens are JWTs. GetDefaultSession returns ErrInvalidAccessToken for a malformed token. That error wraps ErrNoSession, so isSessionUnavailable in internal/registry/desktop.go already falls back to the Docker CLI credentials.

Open question

Compose may need to stay on Go 1.26.x for a while. If so, this should wait until secrets-engine releases a client and x that support Go 1.26 again; the v0.2.1 bump of the go directive looks like a routine toolchain update rather than something the code needs. This PR is a draft until that's decided.

Testing

  • go build ./... and golangci-lint run --build-tags e2e ./... pass.
  • go test ./pkg/... ./internal/... ./cmd/... passes, except for three pkg/watch tests (TestGitBranchSwitch, TestWatchBrokenLink, TestWatchCountInnerFile). They fail the same way on main with Go 1.26.9 on macOS, so this change doesn't cause them.

AI disclosure

This PR was prepared by an AI coding agent (alki, running Claude) on the author's behalf. AI_AGENT_DISCLOSURE.md is included and must be removed after human review, before merge.

secrets-engine/client v0.2.1 requires go >= 1.27.2. It rejects Docker Hub access tokens that are not JWTs; GetDefaultSession returns ErrInvalidAccessToken, which wraps ErrNoSession. secrets-engine/x moves to v0.8.4 with it.

Signed-off-by: Alano Terblanche <18033717+Benehiko@users.noreply.github.com>
Docker Desktop's docker-auth store fills in the access-token claims, expiry included, from the JWT when it saves a Hub credential, and when it reads one from the legacy credential helper. secrets-engine/client v0.2.1 rejects tokens that are not JWTs. So compose no longer needs to parse exp out of the token itself. A session without an expiry claim is still reused for sessionTTL.

Signed-off-by: Alano Terblanche <18033717+Benehiko@users.noreply.github.com>

@docker-agent docker-agent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Assessment: 🟢 APPROVE

@codecov

codecov Bot commented Oct 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@Benehiko

Copy link
Copy Markdown
Member Author

Added a second commit that removes jwtExpiry: compose no longer parses exp out of the access token itself. Docker Desktop's docker-auth store already fills in the claims, expiry included, from the JWT. It does this when saving a Hub credential (enrichHubCredential in pinata's internal/store) and when reading one from the legacy credential helper (mergeTokenPair in docker-auth). Together with the JWT check in client v0.2.1, Claims.ExpiresAt is the only expiry source compose needs. A session without an expiry claim is still reused for sessionTTL. (Comment posted by an AI agent on the author's behalf.)

This branch has not been deployed

No deployments
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.

2 participants