-
Notifications
You must be signed in to change notification settings - Fork 903
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 CLI was unable to deploy Firebase Functions in some monorepo setups #5391
Conversation
Codecov ReportBase: 56.32% // Head: 56.32% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #5391 +/- ##
==========================================
- Coverage 56.32% 56.32% -0.01%
==========================================
Files 315 315
Lines 21296 21298 +2
Branches 4342 4342
==========================================
Hits 11996 11996
- Misses 8261 8263 +2
Partials 1039 1039
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 at Codecov. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Partially fixes #4952.
#5215 made changes to the CLI to detect Functions SDK even in monorepo setups where Functions SDK is hoisted (i.e. Functions SDK dependency is declared in the parent directory but not in the sub-package directory).
We should've made corresponding change in how the Functions SDK binary is executed - instead of always looking up the sub-package's
node_modules
, we should be looking at thenode_modules
closest to where the Functions SDK dependency is declared.This setup seems common in scenarios where the developer bundles the functions source using bundlers like vite/webpack/etc. This kind of technique has shown to help AWS lambda's cold start time, and I think it's something we'd want to explore in Google Cloud Functions too.