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(internal/detect): add helper to detect projectID from env #4582

Merged
merged 5 commits into from
Aug 13, 2021
Merged

feat(internal/detect): add helper to detect projectID from env #4582

merged 5 commits into from
Aug 13, 2021

Conversation

codyoss
Copy link
Member

@codyoss codyoss commented Aug 9, 2021

This is meant to be used by certain veneers so that we can detect the projectID in a consistent manner. Future PRs will use this logic.
Fixes: #1294

@codyoss codyoss requested a review from a team as a code owner August 9, 2021 21:17
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Aug 9, 2021
@codyoss
Copy link
Member Author

codyoss commented Aug 9, 2021

cc @crwilcox Some of your libraries can use this in the future. I think you brought this up not too long ago...

Copy link
Contributor

@noahdietz noahdietz left a comment

Choose a reason for hiding this comment

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

LGTM but is there a way to add a test?

@crwilcox
Copy link
Contributor

crwilcox commented Aug 9, 2021

How does this differ from https://github.com/googleapis/google-cloud-go/blob/master/firestore/client.go#L83 / https://github.com/googleapis/google-cloud-go/blob/master/firestore/client.go#L104

Is the goal here to centralize this as most veneers have this (more or less) duplicated code?

@codyoss
Copy link
Member Author

codyoss commented Aug 10, 2021

@crwilcox

Is the goal here to centralize this as most veneers have this (more or less) duplicated code?

Yes. Just wanted to have a consistent implementation for all to use.

@codyoss
Copy link
Member Author

codyoss commented Aug 13, 2021

@noahdietz Done.

@codyoss codyoss added the automerge Merge the pull request once unit tests and other checks pass. label Aug 13, 2021
@codyoss codyoss merged commit cc65d94 into googleapis:master Aug 13, 2021
@codyoss codyoss deleted the detect-project branch August 13, 2021 20:56
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Aug 13, 2021
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.

all: provide project ID detection
3 participants