-
Notifications
You must be signed in to change notification settings - Fork 482
Open
Labels
Needs: Triage (Functions)compute-separationCompute separation / external worker supportCompute separation / external worker support
Description
In separated compute, the host cannot read host.json from disk — it lives in the worker's container. The worker sends it in StartStream.host_configuration_json. A custom IConfigurationSource blocks in ConfigureAppConfiguration until the worker provides it.
This works because the gRPC server starts at the WebHost level (via RpcInitializationService) before the ScriptHost is built.
Dependencies: M3 (#11645), PROTO (#11642)
Deliverables
| File | Purpose |
|---|---|
ExternalWorkers/HostJsonContentProvider.cs |
WebHost singleton — SetContent() from gRPC, WaitForContent() for config pipeline, Reset() for restarts |
ExternalWorkers/ExternalWorkerHostJsonConfigurationSource.cs |
IConfigurationSource + ConfigurationProvider — blocks in Load() |
ScriptHostBuilderExtensions.cs (modified) |
Conditional swap of config source |
Server/FunctionRpcService.cs (modified) |
Intercept host_configuration_json from StartStream |
Restart Handling
| Scenario | Behavior |
|---|---|
| ScriptHost restarts, worker connected | Reset() keeps cache → next Load() immediate |
| Worker disconnects | Reset(clearCache: true) → next Load() blocks |
| Placeholder mode | Returns default config {"version":"2.0"} without blocking |
Acceptance Criteria
- host.json from
StartStreamis parsed and applied as configuration - All downstream option bindings (
ScriptJobHostOptions, etc.) receive correct values - Placeholder mode returns defaults without blocking
- ScriptHost restart uses cached content when worker is still connected
- Worker disconnect clears cache
-
HostJsonFileConfigurationSourceis unchanged - Unit tests
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Needs: Triage (Functions)compute-separationCompute separation / external worker supportCompute separation / external worker support