Skip to content

Firebase Rules Deploy may not deploy rules when project has multiple databases #9910

@TomasMorton

Description

@TomasMorton

[REQUIRED] Environment info

15.3.1 (local dev build: 40df2d6)

firebase-tools:

Platform:
Linux (Debian)

[REQUIRED] Test case

See #7981, it's a similar problem.

[REQUIRED] Steps to reproduce

Prerequisites: multiple databases

# Download existing rules
firebase init firestore 
# TODO: Modify the rules to those of another database
# Deploy the rules
firebase deploy --only 'firestore:d:rules' --debug
# You may see `latest version of firestore.rules already up to date, skipping upload...`.

[REQUIRED] Expected behavior

The modified rules are deployed

[REQUIRED] Actual behavior

The modified rules may be skipped

Details

As noted above, similar to #7981, we are using getLatestRulesetName() to get the rules, which does not filter by database and so is indeterministic about which rules it actually downloads.

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