Skip to content

A script that checks a project's deployed Firestore rules against this repo #51

Open

Description

@jsconu

Every self-hoster of the cloud build runs their own Firebase project, and an app newer than its deployed firebase/firestore.rules fails in ways that look like unrelated bugs. Pairing breaking with "That code isn't active" is one we've already hit and fixed — the app was fine, the deployed rules were older than it.

There's currently no way to check short of eyeballing the Firebase console.

What to do

Add a small script under scripts/ that fetches the rules currently deployed to a project (the Firebase CLI can do this) and diffs them against firebase/firestore.rules, exiting non-zero with a readable diff when they differ. PowerShell or bash are both fine — match scripts/create-upload-keystore.ps1 if you like. Mention it in docs/SELF_HOSTING.md.

Done when

Running it against a project with stale rules prints what's missing and fails; against a current one it says so and exits 0.

Only relevant to cloud builds — a local build has no rules and no project.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions