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
Speed up functions deployment by doing in-place trigger parsing #578
Conversation
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.
One small thing, but otherwise this is great! 😄
lib/prepareFunctionsUpload.js
Outdated
return parseTriggers(getProjectId(options), tmpdir.name); | ||
var configValues; | ||
var sourceDir = options.config.path(options.config.get('functions.source')); | ||
return _prepareSource(context).then(function(result) { |
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.
It's kinda weird that a function called prepareSource
resolves with config values. Can we refactor this just a bit now that "preparing source" isn't copying things to a tmp dir?
LGTM |
* Add delete and config emulator util APIs. * Clean up typos and linter warnings.
Description
Addresses #536.
Speeds up functions deployment:
.runtimeconfig.json
. The config variables are put inside an environment variable so that trigger parsing will still work, and are stuffed into the archive right before uploading. (must be used with Overload process.env.CLOUD_RUNTIME_CONFIG to be JSON or path to JSON firebase-functions#155 version of firebase-functions)This has been manually tested, deploy works as expected, and the uploaded source zip contains .runtimeconfig.json with the correct config values.
Sample Commands
No change to commands.