You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add the above condition to a remoteconfig template JSON referenced by firebase.json's remoteconfig.template
Run firebase deploy --only remoteconfig --dry-run
[REQUIRED] Expected behavior
Dry-run should report the invalid expression syntax as an error (or the CLI should document that remoteconfig dry-run does not perform this check).
[REQUIRED] Actual behavior
Dry-run prints "Dry run complete!" and exits 0. A subsequent real firebase deploy --only remoteconfig (no --dry-run) with the same broken expression is the first point where the error surfaces, server-side, on publish.
Root cause:
src/deploy/remoteconfig/functions.ts's validateInputRemoteConfigTemplate() only checks that etag is a non-empty string and conditions is an array. It never inspects expression content.
src/deploy/index.ts (around line 220): when options.dryRun is true, the deploys and releases phases are skipped entirely for every target. For remoteconfig, the release phase (the actual template PUT) is the only place server-side validation happens — so dry-run performs no expression validation at all.
This does not appear to be intentional: PR Add --dry-run to deploy #7574 ("Add --dry-run to deploy") added dedicated dry-run validation logic to database, dataconnect, and extensions (e.g. database/prepare.ts always calls rtdb.updateRules(..., { dryRun: true }) to check rules syntax server-side; dataconnect/prepare.ts calls diffSchema → upsertSchema(schema, validateOnly: true) when options.dryRun is set). remoteconfig was not touched by that PR and has no equivalent validation path.
The Remote Config REST API supports ?validate_only=true on the template PUT endpoint, which would let remoteconfig follow the same pattern, but the CLI never calls it.
[REQUIRED] Environment info
firebase-tools: 15.30.2
Platform: macOS
[REQUIRED] Test case
Set a Remote Config condition's
expressionto an invalid string:{ "conditions": [{ "name": "test", "expression": "this is not valid syntax at all !!!" }] }Run:
firebase deploy --only remoteconfig --dry-run[REQUIRED] Steps to reproduce
firebase.json'sremoteconfig.templatefirebase deploy --only remoteconfig --dry-run[REQUIRED] Expected behavior
Dry-run should report the invalid expression syntax as an error (or the CLI should document that remoteconfig dry-run does not perform this check).
[REQUIRED] Actual behavior
Dry-run prints "Dry run complete!" and exits 0. A subsequent real
firebase deploy --only remoteconfig(no--dry-run) with the same broken expression is the first point where the error surfaces, server-side, on publish.Root cause:
src/deploy/remoteconfig/functions.ts'svalidateInputRemoteConfigTemplate()only checks thatetagis a non-empty string andconditionsis an array. It never inspectsexpressioncontent.src/deploy/index.ts(around line 220): whenoptions.dryRunis true, thedeploysandreleasesphases are skipped entirely for every target. For remoteconfig, thereleasephase (the actual template PUT) is the only place server-side validation happens — so dry-run performs no expression validation at all.database,dataconnect, andextensions(e.g.database/prepare.tsalways callsrtdb.updateRules(..., { dryRun: true })to check rules syntax server-side;dataconnect/prepare.tscallsdiffSchema→upsertSchema(schema, validateOnly: true)whenoptions.dryRunis set).remoteconfigwas not touched by that PR and has no equivalent validation path.?validate_only=trueon the template PUT endpoint, which would letremoteconfigfollow the same pattern, but the CLI never calls it.