Skip to content

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

Closed

Description

@nikita-mishchenko

[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.

Activity

  1. aalej commented on Nov 24, 2023

    @aalej
    Contributor

    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.

  2. assigned and unassigned on Nov 27, 2023
  3. koistya commented on Dec 6, 2023

    @koistya

    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions