refactor(no-ticket): pass resolved credentials through credential-helper plumbing - #336
Draft
cloudsmith-iduffy wants to merge 1 commit into
Draft
refactor(no-ticket): pass resolved credentials through credential-helper plumbing#336cloudsmith-iduffy wants to merge 1 commit into
cloudsmith-iduffy wants to merge 1 commit into
Conversation
…per plumbing The credential-helper plumbing flattened opts.credential into loose api_key/auth_type strings, threaded the pair through every signature, then rebuilt a CredentialResult (with a fabricated source_name) just to hand it to initialise_api. The getattr fallback guarding auth_type could never fire: it is a declared dataclass field with a default. Pass the CredentialResult itself instead. The object carries its own auth scheme end to end, so a bearer credential's custom-domain lookup now goes out as Authorization: Bearer rather than being re-derived at the bottom of the stack. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Stack 1/4 — base of the credential-helper work. Reviews independently of the rest.
Pure refactor, no behaviour change. The credential-helper plumbing passed an
api_keystring alongside anauth_typestring, which meant every layer had tokeep the pair in sync and any new credential source had to thread two more
arguments through. This passes the resolved
CredentialResultitself instead, sothe object carries its own auth scheme (
X-Api-KeyvsAuthorization: Bearer)to the point of use.
Touches the Docker helper and the shared
custom_domains/commonhelpers. Thethree PRs above this one build on it.
Type of Change
Additional Notes
Test suite: 561 passed, 40 skipped at this commit.