Skip to content

Conversation

@thaJeztah
Copy link
Member

relates to:

Commit cli@27b2797 forked the AuthConfig type from the API, and changed existing code to do a direct cast / convert of the forked type to the API type. This can cause issues if the API types diverges, such as the removal of the Email field.

This patch explicitly maps each field to the corresponding API type, but adds some TODOs, because various code-paths only included a subset of the fields, which may be intentional for fields that were meant to be handled on the daemon / registry-client only.

We should evaluate these conversions to make sure these fields should be sent from the client or not (and possibly even removed from the API type).

- What I did

- How I did it

- How to verify it

- Human readable description for the release notes

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

Commit [cli@27b2797] forked the AuthConfig type from the API, and changed
existing code to do a direct cast / convert of the forked type to the API
type. This can cause issues if the API types diverges, such as the removal
of the Email field.

This patch explicitly maps each field to the corresponding API type, but
adds some TODOs, because various code-paths only included a subset of the
fields, which may be intentional for fields that were meant to be handled
on the daemon / registry-client only.

We should evaluate these conversions to make sure these fields should
be sent from the client or not (and possibly even removed from the API
type).

[cli@27b2797]: docker@27b2797

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 9f02d96)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah added this to the 28.5.0 milestone Sep 29, 2025
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 37.34940% with 52 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cli/command/registry/login.go 30.00% 20 Missing and 1 partial ⚠️
cli/command/image/build.go 0.00% 10 Missing and 1 partial ⚠️
cli/command/registry.go 68.75% 10 Missing ⚠️
cli/command/registry/search.go 0.00% 10 Missing ⚠️

📢 Thoughts on this report? Let us know!

@thaJeztah thaJeztah force-pushed the 28.x_backport_authconfig_no_direct_cast branch from 29d710d to e491078 Compare September 29, 2025 11:27
@thaJeztah thaJeztah marked this pull request as ready for review September 29, 2025 11:52
@austinvazquez austinvazquez merged commit a106161 into docker:28.x Sep 29, 2025
108 of 185 checks passed
@thaJeztah thaJeztah deleted the 28.x_backport_authconfig_no_direct_cast branch September 30, 2025 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants