Skip to content

cli/trust: GetNotaryRepository: remove intermediate var#5961

Merged
vvoland merged 1 commit intodocker:masterfrom
thaJeztah:trust_remove_intermediate_var
Mar 31, 2025
Merged

cli/trust: GetNotaryRepository: remove intermediate var#5961
vvoland merged 1 commit intodocker:masterfrom
thaJeztah:trust_remove_intermediate_var

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

Leftover from another branch I was working on 😂

- Human readable description for the release notes

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

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah thaJeztah added status/2-code-review kind/refactor PR's that refactor, or clean-up code labels Mar 25, 2025
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 25, 2025

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
cli/trust/trust.go 0.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

Comment thread cli/trust/trust.go
Transport: authTransport,
Credentials: creds,
Scopes: []auth.Scope{scope},
ClientID: registry.AuthClientID,
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This one made me wonder; I see we're constructing token handlers in different places; for this one, and some paths in docker/docker, we set the ClientID; https://github.com/moby/moby/blob/330857ad0ffbc8114556f7886997fc43d7be4aad/distribution/registry.go#L123

But in cli/registry/client we use auth.NewTokenHandler

creds := registry.NewStaticCredentialStore(&authConfig)
tokenHandler := auth.NewTokenHandler(authTransport, creds, repoName, actions...)

Which means we end up with github.com/docker/distribution picking a default;

clientID := th.clientID
if clientID == "" {
// Use default client, this is a required field
clientID = defaultClientID
}

Which would be registry-client

const defaultClientID = "registry-client"

@vvoland vvoland merged commit 8e6de54 into docker:master Mar 31, 2025
96 checks passed
@vvoland vvoland added this to the 28.0.5 milestone Mar 31, 2025
@thaJeztah thaJeztah deleted the trust_remove_intermediate_var branch March 31, 2025 12:34
@thaJeztah thaJeztah modified the milestones: 28.0.5, 28.1.0 Apr 10, 2025
@thaJeztah thaJeztah self-assigned this May 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/refactor PR's that refactor, or clean-up code status/2-code-review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants