firebase-tools: Can no longer only deploy firestore rules or firestore indexes

[REQUIRED] Environment info

firebase-tools: 11.2.0

Platform: any

[REQUIRED] Test case

Just try to run the command

[REQUIRED] Steps to reproduce

Run firestore deploy --only firestore:indexes

[REQUIRED] Expected behavior

Only the firestore indexes would be deployed (and not the rules)

[REQUIRED] Actual behavior

An error:

Filters specified with colons (e.g. --only functions:func1,functions:func2) are only supported for functions and hosting

This change was introduced in https://github.com/firebase/firebase-tools/pull/4666 and I’m just wondering if this was intentional, since the commit message doesn’t say anything about changing this behavior.

Until this commit, I was able to deploy only the rules or only the index (or both), but now I’m no longer able to do so.

Is there a reason behind this change, or was this an accidental side effect of a cleanup action?

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 45
  • Comments: 19 (2 by maintainers)

Most upvoted comments

We appear to be having this issue as well. I believe it worked for us just a couple days ago and now we are getting the Filters specified with colons (e.g. --only functions:func1,functions:func2) are only supported for functions and hosting error

This one might be me. The filters/checks for only and except were rather broken and I may have made them more strict than I intended. I’ll take a look today.

(read: I didn’t realize we supported firestore:[rules|indexes] - and that’s very neat.)

@sivaneshl that’s what used to work, but now I get this output:

Screenshot 2022-07-04 at 08 50 09

@mckrava firestore is shorthand for firestore:rules,firestore:indexes, so in your command it’s redundant. You can simply do

firebase deploy --only storage,firestore

and it will deploy storage rules and firestore rules and indexes

As found out by others above, versions prior to 11.2.0 are still working. For us the fix was to pin the version in our deployFirebase.yml for the CI pipeline

    - name: Install Firebase CLI
      run: npm install -g firebase-tools@10.2.2     // <--- pin to 10.2.2 in our case