chore: Don't set keyFile when credentialsFetcher is given#8657
Merged
bshaffer merged 1 commit intogoogleapis:mainfrom Oct 20, 2025
Merged
Conversation
a56944a to
2651192
Compare
bshaffer
approved these changes
Oct 13, 2025
f422898 to
fbdaaef
Compare
Hectorhammett
approved these changes
Oct 16, 2025
fbdaaef to
07ebb7e
Compare
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.
#8617 marked
keyFileandkeyFilePathoptions as deprecated.When initializing, for example,
Google\Cloud\Storage\StorageClient, withthe
ClientTraitwill still look for akeyFileorkeyFilePathoption and if it doesn't find one, fall back to checking the environment variable or a well known file, and then set thekeyFileoption with it.With the changes of this PR, the
ClientTraitwill check if thecredentialsFetcheris set and implementsFetchAuthTokenInterface, and if it is, it will not look for or set thekeyFileoption. When determining the project ID, it will also check if thecredentialsFetcherimplements theProjectIdProviderInterfaceto determine the project it.If no
credentialsFetcheris given, it will fall back to the currently existing behavior.