Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

fix: disable warning if quota project id provided to auth.default() - #856

Merged
arithmetic1728 merged 3 commits into
mainfrom
silent_error
Sep 7, 2021
Merged

fix: disable warning if quota project id provided to auth.default()#856
arithmetic1728 merged 3 commits into
mainfrom
silent_error

Conversation

@arithmetic1728

@arithmetic1728 arithmetic1728 commented Sep 3, 2021

Copy link
Copy Markdown
Contributor

If quota_project_id is provided via google.auth.default(quota_project_id="my_id"), then we pass the quota_project_id all the way down to load_credentials_from_file. In this case the created user credentials will have the quota_project_id set even if it is not available from the json file, so the users won't see the warning.

Fixes: #769

@arithmetic1728
arithmetic1728 requested a review from a team September 3, 2021 00:03
@google-cla google-cla Bot added the cla: yes This human has signed the Contributor License Agreement. label Sep 3, 2021
Comment thread tests/test__default.py Outdated
@arithmetic1728

Copy link
Copy Markdown
Contributor Author

@tseaver added more tests to directly test the expected behavior

@arithmetic1728
arithmetic1728 merged commit 11ebaeb into main Sep 7, 2021
@arithmetic1728
arithmetic1728 deleted the silent_error branch September 7, 2021 21:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

google.auth.default(quota_project_id="..") still results in end user credentials warning

2 participants