Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

register rtdb triggers per-namespace in functions emulator #1413

Merged
merged 1 commit into from Jun 18, 2019

Conversation

jmwski
Copy link
Contributor

@jmwski jmwski commented Jun 18, 2019

Description

In the original commit used to wire together the functions emulator with the database emulator, we did not register function triggers per-namespace. Without a namespace query paramter (ns), the RTDB emulator assumes the request is for a special fake sentinel namespace called 'fake-server'. This is confusing because developers may expect that the function emulator registers triggers with a namespace whose name matches the project id of their currently active firebase project.

In the current state of things, writes to a namespace whose name matches the active firebase project id would not trigger RTDB functions because those triggers are always registered with the sentinel namespace.

Scenarios Tested

I tested triggering an RTDB function for a specified namespace, something like:

curl -X PUT -d '{"data": true}' http://localhost:9000/rtdbReact.json?ns=my-namespace

Sample Commands

@googlebot googlebot added the cla: yes Manual indication that this has passed CLA. label Jun 18, 2019
@jmwski jmwski requested a review from samtstern June 18, 2019 20:30
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.002%) to 61.367% when pulling 39b1d3a on wyszynski/rtdb-emulator-per-namespace-triggers into 589387b on master.

@samtstern
Copy link
Contributor

@IanWyszynski gonna merge. No need for a changelog since that will be included in the changelog for my RTDB change.

@samtstern samtstern merged commit 8337e70 into master Jun 18, 2019
@bkendall bkendall deleted the wyszynski/rtdb-emulator-per-namespace-triggers branch August 4, 2021 19:24
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.

None yet

4 participants