Repository navigation
Description
Context
#115 moved Dagster user-code ownership from Terraform to olf project deploy.
The two sides now decide the code-location set independently, and nothing keeps
them in agreement.
Terraform renders the webserver's workspace.yaml from every configured
location: variables.tf:65
declares code_locations as a list of {name, definitions_module}, all three
environment roots pass it from local.orchestration_contract.code_locations
(e.g. aws-poc/main.tf:679),
and release.tf:59
renders one workspace server per entry.
Activation renders exactly one, hardcoded:
# tools/olf/olf/deployment/activation.py:225
"name": "openlakeforge-dagster",
"dagsterApiGrpcArgs": ["--module-name", "lakehouse_code.definitions"],Both currently agree only because they happen to repeat the module variable's
default, which is the single merged location ADR 0006 documents.
Impact
Configure code_locations as anything other than that default and the stage
breaks, silently at apply time:
- Renamed location — the workspace points at a Service name activation never
creates, so the sole code server is unreachable and no domain loads. - Split locations (one per domain) — the workspace names N servers,
activation creates one; every location but the first has no matching Service. - A renamed
definitions_moduleis not expressible by activation at all.
dagster-user-deployments names each Service after its deployment, so the
contract's code-location name is also its in-cluster host — which is exactly why
the two sides have to derive it from one source.
Latent rather than broken today: only the default is shipped, and the AWS
acceptance run passed on it. But the module variable is a supported knob whose
own description offers the split-location trade-off, so nothing warns a user off.
Why this needs a contract change
Activation cannot read what Terraform used. The v3 stage contract exposes
orchestration only as refs:
"orchestration": {
"service_ref": "stage/dev/orchestration",
"endpoint_ref": "stage/dev/endpoints/orchestration"
}and neither contracts.py nor provider_contracts.py mentions code_locations
anywhere — no env var carries the name or definitions_module to the CLI. Under
AGENTS.md rule 1 ("contracts before providers"), the code-location set belongs in
the provider contract, with both Terraform and activation reading it from there.
Acceptance criteria
- The provider contract carries the stage's code locations (
nameand
definitions_module), with the schema and fixtures updated. -
olf project deployrenders one user deployment per contracted location
instead of a hardcoded pair. - The Terraform-rendered workspace and the activation-rendered Services agree
by construction for a renamed location and for split locations, with a test
covering both — a test asserting only the default would not have caught this. -
manage_user_deployments = true(the deprecatedolf deploypath,
ADR 0006) keeps its current behaviour. - ADR 0006 records where the code-location set is owned.
Notes
Found during review of #184 and deliberately not fixed there: it needs a
contract schema change, which is wider than that PR's scope. Its review thread
carries the same analysis.
Activity
fix: carry the stage's dagster code locations in the provider contract
fix: render dagster user deployments from the contracted code locations
fix: render dagster user deployments from the contracted code locations
fix: carry the stage's dagster code locations in the provider contract
fix: render dagster user deployments from the contracted code locations
fix: render dagster user deployments from the contracted code locations
fix: carry the stage's dagster code locations in the provider contract
fix: carry the stage's dagster code locations in the provider contract (
fix: render dagster user deployments from the contracted code locations
fix: render dagster user deployments from the contracted code locatio…
malon64 commentedon Sep 10, 2026
Delivered by #194 (contract) and #195 (consumer), both merged.
stages.<name>.orchestration.code_locationsnow carries the set, emitted by all three roots from the samelocal.orchestration_contract.code_locationsTerraform already passes to the Dagster module, andactivation.pyrenders one user deployment per contracted entry. One source, two readers — the hardcoded literal at what wasactivation.py:225(line 272 by the time it was fixed) is gone.Two things worth carrying forward from review:
olf project deploywould have failed until someone ran Terraform. It defaults to the single merged location such a platform is actually running.fullmatch, since$also matches before a trailing newline.Review also surfaced two defects in the surrounding activation code that are fixed in #195:
release_runs_activationaccepted a release when any deployment matched (equivalent toallonly while one location was possible), and the rollback path could pair an image with modules it never shipped.fix: carry the stage's dagster code locations in the provider contract (
fix: render dagster user deployments from the contracted code locatio…