-
Notifications
You must be signed in to change notification settings - Fork 2k
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 helloworld GCF test #739
Conversation
Note to Googlers: this PR fixes b/114412909 |
@@ -32,6 +34,10 @@ gcloud config set project $GCLOUD_PROJECT | |||
|
|||
# Start functions emulator, if appropriate | |||
if [[ $PROJECT == functions/* ]]; then | |||
export FUNCTIONS_LOG_PATH=$(pwd)/logs/cloud-functions-emulator.log | |||
npm install -g @google-cloud/functions-emulator |
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.
Is there a way we could avoid global installs? Would npx
solve that for us?
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.
Perhaps - however, these containers are (AFAIK) ephemeral. Is making (and potentially debugging) this change a good use of time?
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.
If anybody wants to reproduce this locally, they might end up with global installs which is not nice. Also, problem caused by globally installed dependencies are hard to debug.
It should be enough to delete the npm i -g
line and further down call:
npx functions-emulator start
(instead of functions-emulator start
).
Let's land it as is to figure out if it works. And then do another revision to get rid of the global installs.
@dpebot merge when green |
Okay! I'll merge when all statuses are green and all reviewers approve. |
Do not merge until
functions/helloworld
tests pass.