firebase-tools icon indicating copy to clipboard operation
firebase-tools copied to clipboard

Gracefully close rules runtime on storage emulator stop

Open tonyjhuang opened this issue 3 years ago • 1 comments

Description

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

Fixes https://github.com/firebase/firebase-tools/issues/3799

Scenarios Tested

Sample Commands

tonyjhuang avatar Aug 18 '22 15:08 tonyjhuang

Codecov Report

Patch coverage has no change and project coverage change: -0.01 :warning:

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%) :arrow_down:
src/emulator/storage/rules/runtime.ts 11.30% <0.00%> (-0.07%) :arrow_down:

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

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

codecov-commenter avatar Aug 18 '22 16:08 codecov-commenter

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?

etienne-ditchlabs avatar May 25 '23 23:05 etienne-ditchlabs