Skip to content

Conversation

samtstern
Copy link
Contributor

@samtstern samtstern commented Jun 1, 2019

Watches the file specified in firebase.json for changes and updates the rules in the emulator.

Successful Change
Screenshot from 2019-06-28 08-34-14

Unsuccessful Change
image

I styled the error printing based on what the TypeScript compiler does in "watch" mode.

@googlebot googlebot added the cla: yes Manual indication that this has passed CLA. label Jun 1, 2019
@ryanpbrewster
Copy link
Contributor

What is the behavior you'd expect if you have a syntax error in your rules?

@samtstern
Copy link
Contributor Author

@ryanpbrewster I would expect the emulator to reject the ruleset with a 4xx error ... what does it actually do?

@coveralls
Copy link

coveralls commented Jun 3, 2019

Coverage Status

Coverage decreased (-0.4%) to 61.644% when pulling 7bcf35a on ss-rules-watcher into 89614cb on master.

@ryanpbrewster
Copy link
Contributor

It does indeed fail, and as a result does not update the rules. You end up in a situation where you're editing your rules and the edits aren't taking effect. Unless you look at the emulator suite logging (often in the background or in some other terminal) you won't be able to figure out why.

@samtstern samtstern changed the base branch from master to next June 6, 2019 22:36
@samtstern samtstern changed the base branch from next to master June 13, 2019 01:11
@samtstern samtstern changed the title [WIP]: Firestore emulator live update on rules file changes Firestore emulator live update on rules file changes Jun 28, 2019
@samtstern samtstern requested a review from yuchenshi July 3, 2019 16:20
Copy link
Member

@yuchenshi yuchenshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Much better!

@samtstern
Copy link
Contributor Author

The Travis build passed but I think the webhook back to GitHub must have been dropped:
https://travis-ci.org/firebase/firebase-tools/builds/553869724?utm_source=github_status&utm_medium=notification

So I am going to merge this.

@samtstern samtstern merged commit 46f3c31 into master Jul 3, 2019
@samtstern samtstern deleted the ss-rules-watcher branch July 3, 2019 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Manual indication that this has passed CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants