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

feat: implement quota project from env var in google/auth #452

Merged
merged 9 commits into from
May 11, 2023

Conversation

bshaffer
Copy link
Contributor

@bshaffer bshaffer commented Apr 25, 2023

No description provided.

@bshaffer bshaffer requested a review from TimurSadykov April 26, 2023 18:25
@bshaffer bshaffer closed this Apr 26, 2023
@bshaffer bshaffer deleted the add-quota-project-env branch April 26, 2023 21:27
@bshaffer bshaffer restored the add-quota-project-env branch May 1, 2023 17:35
@bshaffer bshaffer reopened this May 1, 2023
@bshaffer bshaffer marked this pull request as ready for review May 1, 2023 18:50
@bshaffer bshaffer requested a review from a team as a code owner May 1, 2023 18:50
@bshaffer
Copy link
Contributor Author

bshaffer commented May 1, 2023

reopened at the request of @sai-sunder-s

tests/ApplicationDefaultCredentialsTest.php Outdated Show resolved Hide resolved
@bshaffer bshaffer requested a review from sai-sunder-s May 2, 2023 18:30
@vishwarajanand
Copy link
Contributor

It appears that if GOOGLE_CLOUD_QUOTA_PROJECT is set then setting $quotaProject shouldn't be required for service clients. Questions:

  1. We can't remove them from clients since they might be breaking? So, which one will be preferred?
  2. In case both are passed with different values, should we add a doc block in clients to clarify this?

@bshaffer
Copy link
Contributor Author

bshaffer commented May 9, 2023

It appears that if GOOGLE_CLOUD_QUOTA_PROJECT is set then setting $quotaProject shouldn't be required for service clients.

I do not think setting quotaProject is required anywhere.

  1. We can't remove them from clients since they might be breaking? So, which one will be preferred?

Removing it would definitely be breaking. Also we don't want to remove it. There is no "preferred", it's just that in some situations a user might want to use an env var, and in some situations a parameter.

  1. In case both are passed with different values, should we add a doc block in clients to clarify this?

In the case that both are set, the parameter is used. I'm all for adding clarity on this, and will add documentation to reflect this.

@bshaffer bshaffer requested a review from a team May 10, 2023 00:22
Copy link
Contributor

@vishwarajanand vishwarajanand left a comment

Choose a reason for hiding this comment

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

Lgtm

@bshaffer bshaffer merged commit a9e8ae3 into main May 11, 2023
@bshaffer bshaffer deleted the add-quota-project-env branch May 11, 2023 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants