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

Non interactive mode deployment doesn't work for firestore indexes #6539

Closed
nikita-mishchenko opened this issue Nov 23, 2023 · 2 comments · Fixed by #6541
Closed

Non interactive mode deployment doesn't work for firestore indexes #6539

nikita-mishchenko opened this issue Nov 23, 2023 · 2 comments · Fixed by #6541

Comments

@nikita-mishchenko
Copy link

[REQUIRED] Environment info

firebase-tools: 12.7.0

Platform: macOS

[REQUIRED] Test case

I'm getting there are 1 field overrides defined in your project that are not present in your firestore indexes file. To delete them, run this command with the --force flag. ? Would you like to delete these field overrides? Selecting no will continue the rest of the deployment. (y/N) prompt when deploying firebase app with --non-interactive flag and indexes definition in firestore.indexes.json is different from what is deployed.

[REQUIRED] Steps to reproduce

  1. Have you app with indexes deployed
  2. Add index / field override to you deployed app via firebase console UI and do not add it into you project's firestore.indexes.json file.
  3. Deploy an application with --non-interactive flag

[REQUIRED] Expected behavior

Deployment will fail.

[REQUIRED] Actual behavior

there are 1 field overrides defined in your project that are not present in your firestore indexes file. To delete them, run this command with the --force flag. ? Would you like to delete these field overrides? Selecting no will continue the rest of the deployment. (y/N) prompt is displayed.

@aalej
Copy link
Contributor

aalej commented Nov 24, 2023

Hi @nikita-mishchenko, thanks for reporting this issue. I was able to reproduce this. Passing the --non-interactive should error out if the command raises any prompts. Let me raise this to our team so they can take a look.

@koistya
Copy link

koistya commented Dec 6, 2023

Also, is there a way to deploy Firestore indexes and rules to different databases within the same GCP project?

$ firebase deploy --only firestore --non-interactive --database-id=test

  > error: unknown option '--database-id'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants