Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from
Sep 7, 2021

Conversation

arithmetic1728
Copy link
Contributor

@arithmetic1728 arithmetic1728 commented Sep 3, 2021

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 review from silvolu and a team as code owners 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
tests/test__default.py Outdated Show resolved Hide resolved
@arithmetic1728
Copy link
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 join this conversation on GitHub. Already have an account? Sign in to comment
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