Azure / Azure/azure-functions-host

[Compute Separation][AH4-M1] Prove one real .NET isolated HTTP worker in project mode

Open
#11,975 0 comments 0 reactions 1 assignee Claimed by @brettsam View on GitHub
compute-separation
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 10h
Merged PRs (30d)
36

Description

> **Parallel non-blocking validation.** This issue is outside `BYOC-M1`, is not a required sub-issue of #11965, and is not a prerequisite for #11965 or [internal BYOC #219](https://github.com/serverless-paas-balam/FlexConsumption-BYOC/issues/219). It is an optional early real-worker oracle.

## Roadmap mapping

| Field | Value |
|---|---|
| Roadmap ID | `AH4` M1 subset |
| Lane | Aspire integration harness |
| Related Feature | #11965, non-blocking |
| Depends on | Aspire foundation, `HT5`, `HT6`, `HP3+HP5A-M1`, `HP4` |
| Blocks | Only `AH4B` |
| Related risk | `WC2` existing-worker connection retry |

## Why this PR exists

Run a real unchanged .NET isolated worker before production composition exists. This surfaces worker handshake, capabilities, metadata, HttpUri, dual-leg completion, and connection-retry problems early while an external worker fix still has lead time. A test-only Client driver remains the composition stand-in.

## Source material

- Roadmap AH4, WC1/WC2/WC3, HI3/HI4.
- Reference-only `tools/ComputeSeparation/SampleIsolatedApp`, its startup arguments, and README flow.
- Product `HT5` dispatcher, `HT6` metadata provider, WorkerProxy HP3/HP4, and shared `WorkerChannel` completion behavior.
- [internal BYOC #219](https://github.com/serverless-paas-balam/FlexConsumption-BYOC/issues/219), [internal BYOC #117](https://github.com/serverless-paas-balam/FlexConsumption-BYOC/issues/117), and [internal BYOC #123](https://github.com/serverless-paas-balam/FlexConsumption-BYOC/issues/123).

## Current state

The foundation harness proves only a MockWorker relay connection. It does not prove a real worker's init, capability merge, metadata, dynamic HTTP endpoint, invocation, completion, or retry when WorkerProxy starts late.

## Proposed implementation

1. Add a minimal current-SDK `SampleIsolatedApp` with exactly one `AuthorizationLevel.Anonymous` GET/POST function returning a fixed body. Keep it in the focused harness solution only.
2. Add an unchanged real .NET isolated worker project resource pointed at WorkerProxy's worker-facing FunctionRpc endpoint using the standard worker startup contract and dynamic endpoints.
3. Keep MockWorker selectable as the fast smoke path.
4. Extend the test Client driver to compose the real HT5 dispatcher and HT6 metadata provider over a ready RpcClientWorkerChannel. Production composition remains absent.
5. Drive the minimal WorkerProxy assignment/readiness call so specialization completes and HP4 freezes/rewrites the worker's advertised HttpUri.
6. Use platform-style environment configuration, default `{"version":"2.0"}`, explicit secret-storage behavior, and the anonymous trigger. No customer host.json.
7. Generate any required local key per run and never persist or log it; the target happy path needs no function key.
8. Automate one HTTP request after metadata/load readiness and assert result plus both terminal legs.
9. Characterize WC2 by starting the worker before WorkerProxy listens. Record whether it exits, retries boundedly/unboundedly, or hangs. Do not hide the behavior with harness sequencing or modify the worker here.

## Tests and evidence

- Real worker StartStream/init completes through relay and final capabilities, including HttpUri, are observed once.
- HT6 returns the single function and load completes.
- Anonymous HTTP request returns `200` and expected body.
- HTTP and FunctionRpc invocation legs terminate for the same invocation ID.
- Correlation and clean teardown hold for real worker and MockWorker paths.
- WC2 conclusion explicitly says no worker change needed or identifies a narrow retry fix, owner, and lead time.
- Standard product and shipping outputs remain unchanged; no `src` -> `tools` reference.

The exit signal for AH4B is the reusable assertion set proving a real unchanged worker through the test driver.

## Explicit exclusions

No real compute composition, ScriptHost startup, link/capacity, containers/images, customer host.json, auth/TLS, drain/reconnect/failure matrix, multi-worker, extension gRPC, Durable, assembly streaming, worker/SDK modification, required CI, or performance testing.

## PR stop condition

Stop when project mode runs WorkerProxy, the test Client driver, and one unchanged real .NET isolated worker; one anonymous HTTP request returns `200`; both legs terminate under one correlation ID; MockWorker parity remains; WC2 is recorded; and standard Host is unchanged. Do not add production composition, capacity, or containers.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.