-
Notifications
You must be signed in to change notification settings - Fork 969
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
Follow up to RuntimeWorkers change #1778
Conversation
@@ -69,6 +72,143 @@ export class EmulatorLogger { | |||
} | |||
} | |||
|
|||
static handleRuntimeLog(log: EmulatorLog, ignore: string[] = []): void { |
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.
All of this code is just moved over from FunctionsEmulator
. No changes.
// For analytics, track the invoked service | ||
track(EVENT_INVOKE, log.data.service); | ||
if (triggerId) { |
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.
By making this function not static
we were able to just used the trigger definitions held on the emu instance rather than waiting for a log.
@@ -293,180 +290,31 @@ export class FunctionsEmulator implements EmulatorInstance { | |||
return worker; | |||
} | |||
|
|||
static handleSystemLog(systemLog: EmulatorLog): void { |
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.
This is the code that was moved to EmulatorLogger
Description
This is a follow up to #1733 to make some of the changes that @yuchenshi asked for. This was a nice and productive rabbit hole.
Changes include:
FunctionsEmulator
no longer rely on theoptions
objectstatic
methods fromFunctionsEmulator
that were only static for testing purposesEmulatorLogger
where it belongssocketPath
for HTTPS functions before the function runs so that we don't have towait async for it to bubble up.
waitForSystemLog
function from the worker class, it's not needed anymore.ready
from background functions where it's not needed.Scenarios Tested
In addition to making the test suite run, I tested that these functions all work as expected:
Sample Commands
N/A