CouncilDataProject / CouncilDataProject/cdp-backend
deploy-infra - problem when Firestore database created in deprecated Datastore Mode
- Dominant language
- Python
- Stars
- 25
- Forks
- 28
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the Bug
This may be related to CouncilDataProject/cookiecutter-cdp-deployment#146, all of which could be user error, but documenting as it was a little obscure.
In the `deploy-infra.yml` workflow during the "Run Infrastructure Deploy" step, the generated(?) `Justfile` `setup project` command is called. A fatal error was encountered while generating the Firestore indexes on line 90:
```bash
firebase deploy --only firestore:indexes
```
Error in the GitHub actions log:
```bash
Error: HTTP Error: 400, ANY_API ApiScope is not supported for Datastore Mode databases.
error: Recipe `deploy` failed on line 90 with exit code 1
Error: Process completed with exit code 1.
```
That seemed very weird as it indicated a problem with the configuration of the Firestore database in "Datastore Mode"
https://cloud.google.com/datastore/docs/firestore-or-datastore
I switched to "Native" mode with the following commands:
```bash
gcloud alpha firestore databases list
gcloud alpha firestore databases update --type=firestore-native
```
Re-running all of the jobs, not just the failed one, then worked.
### Expected Behavior
No weirdness.
### Reproduction
Following the standard install instructions.
### Environment
_Any additional information about your environment._
- OS Version: _[e.g. macOS 11.3.1]_
- Cookiecutter Version: _[e.g. 0.5.0]_
Contributor guide
Assessment
This issue has not been assessed yet.