Skip to content

Gracefully close rules runtime on storage emulator stop - #4902

Merged
tonyjhuang merged 14 commits into
masterfrom
shutdown
May 23, 2023
Merged

tonyjhuang merged 14 commits into
masterfrom
shutdown

Conversation

@tonyjhuang

@tonyjhuang tonyjhuang commented Aug 18, 2022 •

Copy link
Copy Markdown
Contributor

Description

Prevents the Firebase Rules runtime process exit signal from throwing an Error and preventing data export from happening on emulator stoppage.

Fixes #3799

Removes /internal/setRules endpoint since file watching fulfills the same purpose.

Scenarios Tested

Sample Commands

@codecov-commenter

codecov-commenter commented Aug 18, 2022 •

Copy link
Copy Markdown

Codecov Report

Patch coverage has no change and project coverage change: -0.01 ⚠️

Comparison is base (38413e0) 55.92% compared to head (a7bf21a) 55.92%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4902      +/-   ##
==========================================
- Coverage   55.92%   55.92%   -0.01%     
==========================================
  Files         322      322              
  Lines       21706    21709       +3     
  Branches     4427     4428       +1     
==========================================
  Hits        12140    12140              
- Misses       8501     8504       +3     
  Partials     1065     1065              
Impacted Files Coverage Δ
src/emulator/storage/rules/manager.ts 12.50% <0.00%> (-0.55%) ⬇️
src/emulator/storage/rules/runtime.ts 11.30% <0.00%> (-0.07%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@christhompsongoogle
christhompsongoogle self-requested a review April 3, 2023 19:03
@tonyjhuang
tonyjhuang enabled auto-merge (squash) April 3, 2023 19:22
@tonyjhuang
tonyjhuang merged commit ff2b2b2 into master May 23, 2023
@tonyjhuang
tonyjhuang deleted the shutdown branch May 23, 2023 23:10
@etienne-ditchlabs

etienne-ditchlabs commented May 25, 2023 •

Copy link
Copy Markdown

By removing the endpoint, it is breaking: https://github.com/firebase/firebase-js-sdk/blob/df8604e4dada5874ce0513e3376ded130b6231b4/packages/rules-unit-testing/src/impl/rules.ts#L75

My tests aren't working anymore because of this change. If you intend to keep this change, what would be the alternative?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error: Storage Emulator Rules runtime exited unexpectedly.

4 participants