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

Fix bug where functions shell failed to invoke event triggered functions in debug mode. #5609

Merged
merged 3 commits into from
Apr 6, 2023

Conversation

taeold
Copy link
Contributor

@taeold taeold commented Mar 16, 2023

When running functions shell with --inspect-functions flag (aka debug mode), the shell command wasn't preparing the emulated process to execute the trigger invoked by the user.

Including a small refactoring to add a property to the FunctionsEmulator class to denote whether it's in debug mode or not for clarity.

I recognize that there isn't any test here. Sadly, there is no existing test suite for the functions shell command, and frankly I understand why - it's tricky to setup a test that requires interactive input. I'm intentionally not taking up the challenge to set up a test suite here since the bug is fairly small, but I do hope that we'll have time in the future to pay this tech debt (famous last words?).

Fixes #5567

@taeold taeold enabled auto-merge (squash) April 6, 2023 02:36
@codecov-commenter
Copy link

codecov-commenter commented Apr 6, 2023

Codecov Report

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

Comparison is base (0a4a4c2) 55.98% compared to head (a220c47) 55.98%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5609      +/-   ##
==========================================
- Coverage   55.98%   55.98%   -0.01%     
==========================================
  Files         321      321              
  Lines       21660    21663       +3     
  Branches     4418     4419       +1     
==========================================
  Hits        12127    12127              
- Misses       8468     8471       +3     
  Partials     1065     1065              
Impacted Files Coverage Δ
src/emulator/functionsEmulator.ts 8.08% <0.00%> (-0.05%) ⬇️

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.

@taeold taeold merged commit 8976456 into master Apr 6, 2023
33 checks passed
@taeold taeold deleted the dl-fix-shell-inspect branch April 6, 2023 03:00
ProfHercules pushed a commit to ProfHercules/firebase-tools that referenced this pull request May 5, 2023
…ons in debug mode. (firebase#5609)

When running functions shell with `--inspect-functions` flag (aka debug mode), the shell command wasn't preparing the emulated process to execute the trigger invoked by the user.

Including a small refactoring to add a property to the FunctionsEmulator class to denote whether it's in debug mode or not for clarity.

I recognize that there isn't any test here. Sadly, there is no existing test suite for the functions shell command, and frankly I understand why - it's tricky to setup a test that requires interactive input. I'm intentionally not taking up the challenge to set up a test suite here since the bug is fairly small, but I do hope that we'll have time in the future to pay this tech debt (famous last words?).

Fixes firebase#5567
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.

Crash when inspecting pubsub functions in the shell
4 participants