Stop using AppEngine to check database mode #5261
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Recently, we stopped automatically creating & linking AppEngine apps to Firestore on creation (https://cloud.google.com/firestore/docs/app-engine-requirement). However,
firebase init
was still checking for the location of this app, and relying on it to check what mode the database was in. We now instead check via the firestore API (https://cloud.google.com/firestore/docs/reference/rest/v1/projects.databases#DatabaseType) and skip the default resource location check.Fixes #5230 and #5452
Scenarios Tested
Created a new project, and created a Firestore DB. Checked that Cloud Resource location was not set yet (via the Firebase console settings page), and then confirmed that
firebase init firestore
thenfirebase deploy
run without errors.