Skip to content

Conversation

thaJeztah
Copy link
Member

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

Related issue

(not mandatory) A picture of a cute animal, if possible in relation to what you did

@thaJeztah thaJeztah requested a review from a team as a code owner September 29, 2025 11:50
@thaJeztah thaJeztah requested review from ndeloof and glours September 29, 2025 11:50
@thaJeztah thaJeztah force-pushed the authconfig_no_direct_cast branch from b5ef738 to 07b2734 Compare September 29, 2025 11:51
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/cli@27b2797

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah force-pushed the authconfig_no_direct_cast branch from 07b2734 to f5fcf7e Compare September 29, 2025 13:12
@ndeloof ndeloof merged commit 713de5b into docker:main Sep 29, 2025
45 of 46 checks passed
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.

3 participants