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

deploy-infra - problem when Firestore database created in deprecated Datastore Mode #239

Open
gregoryfoster opened this issue Nov 25, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@gregoryfoster
Copy link

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:

firebase deploy --only firestore:indexes

Error in the GitHub actions log:

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:

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]
@gregoryfoster gregoryfoster added the bug Something isn't working label Nov 25, 2023
@evamaxfield
Copy link
Member

I think the last time I did this process I also encountered this weirdness. Can you add those two lines of code to cdp-backend Justfile here: https://github.com/CouncilDataProject/cdp-backend/blob/main/cdp_backend/infrastructure/Justfile

@gregoryfoster
Copy link
Author

@evamaxfield, would you mind transferring this issue to cdp-backend? I'll pick it up there.

@evamaxfield evamaxfield transferred this issue from CouncilDataProject/cookiecutter-cdp-deployment Dec 2, 2023
@evamaxfield
Copy link
Member

Thanks!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants