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
firestore: detect-project-id overrides the emulator #1751
Labels
api: firestore
Issues related to the Firestore API.
priority: p2
Moderately-important priority. Fix may not be included in next release.
🚨
This issue needs some love.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Comments
tbpg
changed the title
packagename: short description of bug
firestore: detect-project-id overrides the emulator
Jan 27, 2020
tbpg
added
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
api: firestore
Issues related to the Firestore API.
and removed
triage me
I really want to be triaged.
labels
Jan 27, 2020
I have submitted a pull request here that fixes this. It's been there for 4 days now and no comments, so I am not sure if I've done it right. |
Thank you for sending it! I just responded on the CL, but I'd like to get one other review before merging. |
Has there been any progress on this? |
yoshi-automation
added
🚨
This issue needs some love.
and removed
🚨
This issue needs some love.
labels
May 19, 2020
broady
added a commit
that referenced
this issue
Jul 14, 2020
We can use a blank project ID when the emulator is being used. Emulator access is unauthenticated, so there's no sense in looking at the credentials to detect the project ID. Fixes #1751.
broady
added a commit
that referenced
this issue
Jul 14, 2020
We can use any project ID when the emulator is being used. Try to look detect a real-looking one, and fallback to a dummy ID. Fixes #1751.
broady
added a commit
that referenced
this issue
Jul 14, 2020
We can use any project ID when the emulator is being used. Try to look detect a real-looking one, and fallback to a dummy ID. Fixes #1751.
broady
added a commit
that referenced
this issue
Jul 14, 2020
We can use any project ID when the emulator is being used. Try to look detect a real-looking one, and fallback to a dummy ID. Fixes #1751.
tritone
added a commit
that referenced
this issue
Jul 29, 2020
We can use any project ID when the emulator is being used. Try to look detect a real-looking one, and fallback to a dummy ID. Fixes #1751. Co-authored-by: Chris Cotter <cjcotter@google.com>
tritone
added a commit
to tritone/google-cloud-go
that referenced
this issue
Aug 25, 2020
…pis#2598) We can use any project ID when the emulator is being used. Try to look detect a real-looking one, and fallback to a dummy ID. Fixes googleapis#1751. Co-authored-by: Chris Cotter <cjcotter@google.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
api: firestore
Issues related to the Firestore API.
priority: p2
Moderately-important priority. Fix may not be included in next release.
🚨
This issue needs some love.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Client
Firestore
Environment
gcloud beta emulators firestore start --host-port "localhost:8081"
export FIRESTORE_EMULATOR_HOST=localhost:8081
Code
Expected behavior
By default, the client lib ignores the specified Firestore project ID in a NewClient() call when it detects an emulator is running (i.e.
FIRESTORE_EMULATOR_HOST
env var is set) ... unless the project ID is set to the"*detect-project-id*"
sentinel value. It should check for the emulator env var before checking for the"*detect-project-id*"
project ID sentinel value, and ignore this value in the same way as it ignores any other project ID value. Developers using the sentinel value to auto-detect projects when running their code in GCP should not need to modify their code/configuration to use a different project ID value when using the local emulator. (I'm guessing that was the intended behavior, since it is ignored for every other value.)Actual behavior
When the sentinel value is used, the attempt to instantiate the client throws the following error:
firestore: see the docs on DetectProjectID
Screenshots
N/A
Additional context
None
The text was updated successfully, but these errors were encountered: