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

Stop using AppEngine to check database mode #5261

Merged
merged 7 commits into from
Jan 26, 2023
Merged

Conversation

joehan
Copy link
Contributor

@joehan joehan commented Nov 21, 2022

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 then firebase deploy run without errors.

@joehan joehan requested a review from bkendall November 21, 2022 23:14
@codecov-commenter
Copy link

codecov-commenter commented Nov 21, 2022

Codecov Report

Base: 56.39% // Head: 56.40% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (92f8291) compared to base (225c1d7).
Patch coverage: 50.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #5261   +/-   ##
=======================================
  Coverage   56.39%   56.40%           
=======================================
  Files         313      313           
  Lines       21245    21243    -2     
  Branches     4336     4336           
=======================================
  Hits        11982    11982           
+ Misses       8223     8221    -2     
  Partials     1040     1040           
Impacted Files Coverage Δ
src/firestore/checkDatabaseType.ts 40.00% <40.00%> (ø)
src/init/features/firestore/index.ts 88.00% <100.00%> (-0.89%) ⬇️
src/emulator/auth/state.ts 85.43% <0.00%> (+0.56%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

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.

firebase init fails at Firestore Setup for new project
3 participants