You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* add startup and teardown hook support
* add initial types
* move hook data handling to wokrer channel
* add app startup hooks to worker init handler
* run new script file on functionEnvironmentReloadRequest
* add logger to base hook
* refactor
* update comment
* create copies of hook data for invocation contexts
* don't copy for app startup hook data + add function app directory
* function environment reload logic
* implement logger interface in hook context
* add host version to startup hooks
* fix tests
* rename app startup function
* remove teardown hooks
* proper message category and functionInvocationId in hook logs
* make sure it compiles
* remove logger
* refactor app startup code
* don't reset the hook data
* simplify copying hook data
* add specialization test for environment reload handler
* add test for loading entry point in specialization scenario
* add test for running app startup hook in non-specialization scenario
* assert called with right context
* add test for specialization scenario
* add test for persisting hook data from startup hooks
* add comment
* allow functionAppDirectory to be undefined in workerInitRequest
* rename to appStart
* one more file rename
* add appHookData and hookData distinction + tests
* fix tests
* remove outdated comment
* non null hostVersion and remove log warning
* fix tests
* old hookData behavior
* address PR comments
* Starting an app can happen in two places, depending on if the worker was specialized or not
17
+
* 1. The worker can start in "normal" mode, meaning `workerInitRequest` will reference the user's app
18
+
* 2. The worker can start in "placeholder" mode, meaning `workerInitRequest` will reference a dummy app to "warm up" the worker and `functionEnvironmentReloadRequest` will be sent with the user's actual app.
19
+
* This process is called worker specialization and it helps with cold start times.
20
+
* The dummy app should never have actual startup code, so it should be safe to call `startApp` twice in this case
21
+
* Worker specialization happens only once, so we don't need to worry about cleaning up resources from previous `functionEnvironmentReloadRequest`s.
0 commit comments