Repository navigation
feat: export deterministic OpenMetadata service roots per stage - #221
Conversation
#131's first slice: OpenMetadata is one shared instance, but its live Iceberg/Dagster/Superset connections still collapse to a single stage (main.tf's governance_dagster_stage/governance_superset_stage), even though governed_stages already carries every stage that asked for governance. Nothing exported by the provider contract let a future bootstrap represent more than one. Add pipeline_service_name (dagster_<stage>) to every stage's orchestration binding and dashboard_service_name (superset_<stage>) to every analytics stage's reporting binding, sourced from the same stage_databases locals main.tf already derives them from, so they cannot drift. Combined with the existing catalog.catalog_name (lakehouse_<stage>) and each stage's own optional governance block, ProviderContracts.stages already amounts to a per-stage map; add a governed_stages property that filters it to the governed subset so an adapter has one place to loop over instead of re-deriving the filter. This is the contract only: the OpenMetadata module's bootstrap still registers one stage's connections (module "openmetadata" stays count = governance_enabled ? 1 : 0, and the Terraform check limiting governed stages to one for that reason is untouched) - looping it over governed_stages needs a live cluster to verify and is the next slice. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f742b511ee
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
`governed_stages` cannot be the single loop for all three service roots. Analytics and governance are independent per-stage capabilities (ADR 0011), so with governance on DEV and analytics on PROD, iterating the governed set registers DEV's services and silently skips superset_prod -- the only Superset root that exists. Terraform already draws this distinction: main.tf selects the Superset connection from analytics_stages, not the governed set. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ee4ac3b4a5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…utput Codex (PR #221, comment 4024581239): aws-provider-contracts-v3.json and azure-provider-contracts-v3.json are captures standing in for `terraform output -json provider_contracts` from aws-poc/azure-poc's contracts.tf, and test_provider_conformance.py treats them as such. Neither root emits pipeline_service_name or dashboard_service_name yet - that adapter work is deliberately still open in #131 - so adding the fields to those fixtures made the suite pass against a shape no real cloud deployment produces, masking exactly the gap this slice leaves for later. Revert both fixtures to their origin/main state and rebuild the two tests that needed a multi-governed-stage input from a hand-assembled contract instead, built off local-provider-contracts-v3.json (the one root that genuinely emits both fields) with governance/reporting grafted on. The helper's docstring says why it exists rather than reading a fixture, so a reader can't mistake it for a capture. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
@codex review |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…fied roots OpenMetadata collapsed governance to one stage: the bootstrap created a single `<service>.lakehouse_<stage>` database and registered unqualified `dagster` and `superset` services pointed at whichever stage two root locals picked, and a Terraform check warned against a second governed stage. A DEV+PROD profile governs both, so PROD's activation seeded schemas under a `polaris.lakehouse_prod` database that never existed. The module now takes a `stages` map and a `canonical_stage`. For every governed stage the bootstrap upserts the stage's database root, a `dagster_<stage>` pipeline service, and a `superset_<stage>` dashboard service when the stage also runs analytics; it removes the services of a stage that is no longer governed and the legacy unqualified pair. The one Iceberg connection still crawls a single catalog, the canonical stage's, whose pipeline service now receives OpenLineage pipelines. The local root passes every governed stage, with names taken from the same stage_databases the provider contract exports (#221), and drops the one-governed-stage check. AWS and Azure pass the one stage they already registered and keep their check until their own adapter changes. Refs #131. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…fied roots OpenMetadata collapsed governance to one stage: the bootstrap created a single `<service>.lakehouse_<stage>` database and registered unqualified `dagster` and `superset` services pointed at whichever stage two root locals picked, and a Terraform check warned against a second governed stage. A DEV+PROD profile governs both, so PROD's activation seeded schemas under a `polaris.lakehouse_prod` database that never existed. The module now takes a `stages` map and a `canonical_stage`. For every governed stage the bootstrap upserts the stage's database root, a `dagster_<stage>` pipeline service, and a `superset_<stage>` dashboard service when the stage also runs analytics; it removes the services of a stage that is no longer governed and the legacy unqualified pair. The one Iceberg connection still crawls a single catalog, the canonical stage's, whose pipeline service now receives OpenLineage pipelines. The local root passes every governed stage, with names taken from the same stage_databases the provider contract exports (#221), and drops the one-governed-stage check. AWS and Azure pass the one stage they already registered and keep their check until their own adapter changes. Refs #131. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…fied roots (#237) * feat: register every governed stage in OpenMetadata under stage-qualified roots OpenMetadata collapsed governance to one stage: the bootstrap created a single `<service>.lakehouse_<stage>` database and registered unqualified `dagster` and `superset` services pointed at whichever stage two root locals picked, and a Terraform check warned against a second governed stage. A DEV+PROD profile governs both, so PROD's activation seeded schemas under a `polaris.lakehouse_prod` database that never existed. The module now takes a `stages` map and a `canonical_stage`. For every governed stage the bootstrap upserts the stage's database root, a `dagster_<stage>` pipeline service, and a `superset_<stage>` dashboard service when the stage also runs analytics; it removes the services of a stage that is no longer governed and the legacy unqualified pair. The one Iceberg connection still crawls a single catalog, the canonical stage's, whose pipeline service now receives OpenLineage pipelines. The local root passes every governed stage, with names taken from the same stage_databases the provider contract exports (#221), and drops the one-governed-stage check. AWS and Azure pass the one stage they already registered and keep their check until their own adapter changes. Refs #131. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: pin the canonical crawl to its own database and never delete roots Every governed stage's database now sits under the one catalog service, so the canonical stage's crawl must not be able to retire another stage's root. OpenMetadata 1.12.10 already defaults markDeletedDatabases and markDeletedSchemas to false and scopes markDeletedTables to the schema being ingested; state both explicitly and pin databaseFilterPattern to the canonical database so an upgrade that changes those defaults cannot. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: upsert the canonical crawler so a stage switch refreshes its filter The bootstrap reused an existing Iceberg ingestion pipeline as-is and only wrote databaseFilterPattern when creating one. After the canonical stage changes on a live deployment (DEV governance turned off, PROD kept), the database service connection moved to PROD but the kept pipeline still filtered for ^lakehouse_dev$, matching nothing and silently ending the catalog refresh. PUT the pipeline on every apply instead, which also brings a pipeline created before #131 up to the pinned filter. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…LakeForge#221) * feat: export deterministic OpenMetadata service roots per stage OpenLakeForge#131's first slice: OpenMetadata is one shared instance, but its live Iceberg/Dagster/Superset connections still collapse to a single stage (main.tf's governance_dagster_stage/governance_superset_stage), even though governed_stages already carries every stage that asked for governance. Nothing exported by the provider contract let a future bootstrap represent more than one. Add pipeline_service_name (dagster_<stage>) to every stage's orchestration binding and dashboard_service_name (superset_<stage>) to every analytics stage's reporting binding, sourced from the same stage_databases locals main.tf already derives them from, so they cannot drift. Combined with the existing catalog.catalog_name (lakehouse_<stage>) and each stage's own optional governance block, ProviderContracts.stages already amounts to a per-stage map; add a governed_stages property that filters it to the governed subset so an adapter has one place to loop over instead of re-deriving the filter. This is the contract only: the OpenMetadata module's bootstrap still registers one stage's connections (module "openmetadata" stays count = governance_enabled ? 1 : 0, and the Terraform check limiting governed stages to one for that reason is untouched) - looping it over governed_stages needs a live cluster to verify and is the next slice. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * feat: track analytics stages separately from governed stages `governed_stages` cannot be the single loop for all three service roots. Analytics and governance are independent per-stage capabilities (ADR 0011), so with governance on DEV and analytics on PROD, iterating the governed set registers DEV's services and silently skips superset_prod -- the only Superset root that exists. Terraform already draws this distinction: main.tf selects the Superset connection from analytics_stages, not the governed set. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> * fix: stop asserting stage service roots against uncaptured provider output Codex (PR OpenLakeForge#221, comment 4024581239): aws-provider-contracts-v3.json and azure-provider-contracts-v3.json are captures standing in for `terraform output -json provider_contracts` from aws-poc/azure-poc's contracts.tf, and test_provider_conformance.py treats them as such. Neither root emits pipeline_service_name or dashboard_service_name yet - that adapter work is deliberately still open in OpenLakeForge#131 - so adding the fields to those fixtures made the suite pass against a shape no real cloud deployment produces, masking exactly the gap this slice leaves for later. Revert both fixtures to their origin/main state and rebuild the two tests that needed a multi-governed-stage input from a hand-assembled contract instead, built off local-provider-contracts-v3.json (the one root that genuinely emits both fields) with governance/reporting grafted on. The helper's docstring says why it exists rather than reading a fixture, so a reader can't mistake it for a capture. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
…fied roots (OpenLakeForge#237) * feat: register every governed stage in OpenMetadata under stage-qualified roots OpenMetadata collapsed governance to one stage: the bootstrap created a single `<service>.lakehouse_<stage>` database and registered unqualified `dagster` and `superset` services pointed at whichever stage two root locals picked, and a Terraform check warned against a second governed stage. A DEV+PROD profile governs both, so PROD's activation seeded schemas under a `polaris.lakehouse_prod` database that never existed. The module now takes a `stages` map and a `canonical_stage`. For every governed stage the bootstrap upserts the stage's database root, a `dagster_<stage>` pipeline service, and a `superset_<stage>` dashboard service when the stage also runs analytics; it removes the services of a stage that is no longer governed and the legacy unqualified pair. The one Iceberg connection still crawls a single catalog, the canonical stage's, whose pipeline service now receives OpenLineage pipelines. The local root passes every governed stage, with names taken from the same stage_databases the provider contract exports (OpenLakeForge#221), and drops the one-governed-stage check. AWS and Azure pass the one stage they already registered and keep their check until their own adapter changes. Refs OpenLakeForge#131. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: pin the canonical crawl to its own database and never delete roots Every governed stage's database now sits under the one catalog service, so the canonical stage's crawl must not be able to retire another stage's root. OpenMetadata 1.12.10 already defaults markDeletedDatabases and markDeletedSchemas to false and scopes markDeletedTables to the schema being ingested; state both explicitly and pin databaseFilterPattern to the canonical database so an upgrade that changes those defaults cannot. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: upsert the canonical crawler so a stage switch refreshes its filter The bootstrap reused an existing Iceberg ingestion pipeline as-is and only wrote databaseFilterPattern when creating one. After the canonical stage changes on a live deployment (DEV governance turned off, PROD kept), the database service connection moved to PROD but the kept pipeline still filtered for ^lakehouse_dev$, matching nothing and silently ending the catalog refresh. PUT the pipeline on every apply instead, which also brings a pipeline created before OpenLakeForge#131 up to the pinned filter. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Part of #131.
What this slice does
OpenMetadata is deployed once for the whole platform, but its live
Iceberg/Dagster/Superset connections still collapse to a single stage:
main.tf'sgovernance_dagster_stage/governance_superset_stagepick"the selected stage if it qualifies, else the first one sorted" out of
governed_stages, even thoughgoverned_stagesalready holds everystage that enabled governance. Nothing exported by the provider
contract let a future bootstrap represent more than one governed
stage at all.
This PR adds the missing piece to the contract, per the issue's target
service-root naming (
lakehouse_<stage>/dagster_<stage>/superset_<stage>):stages.<name>.orchestration.pipeline_service_name=dagster_<stage>,on every enabled stage's orchestration binding (not gated on
governance - it's a stage property, independent of who reads it).
stages.<name>.reporting.dashboard_service_name=superset_<stage>,on every analytics stage's reporting binding.
contracts.tffrom the samestage_databaseslocals
main.tfalready derivesdagster_<stage>/superset_<stage>from, so the names cannot drift from what Postgres actually
provisions.
catalog.catalog_name(lakehouse_<stage>) already existed perstage, so with these two additions
ProviderContracts.stagesalready carries everything a future bootstrap needs, keyed by stage.
Added two properties:
ProviderContracts.governed_stages(stageswhose governance capability is on - the database/pipeline roots) and
ProviderContracts.analytics_stages(stages whose analyticscapability is on - the dashboard roots). They're separate because
the two capabilities are independent per stage (ADR 0011): a stage
can have analytics without governance or vice versa, so a consumer
that only loops
governed_stageswould silently miss asuperset_<stage>root that exists on an ungoverned analyticsstage.
docs/schema/provider-contracts.schema.jsonandtools/olf/olf/provider_contracts.py's parser (new optional fields,each validated against its own stage's canonical name) plus their
tests. Both new fields are optional, matching the existing
backward-compat pattern for
orchestration.code_locations: a v3contract persisted before this change still parses.
AWS and Azure do not emit these fields yet, on purpose
infra/terraform/environments/aws-poc/contracts.tfandazure-poc/contracts.tfare untouched by this PR and do not setpipeline_service_nameordashboard_service_name- onlyinfra/terraform/environments/local/contracts.tfdoes. That isdeliberate: this slice is the contract plus its tests, with no adapter
consuming it, and AWS/Azure adapters are their own slice by design (see
"Explicitly out of scope" below).
Because of that,
tools/olf/tests/fixtures/aws-provider-contracts-v3.jsonand
azure-provider-contracts-v3.json- captures standing in forterraform output -json provider_contractsfrom those roots, whichtest_provider_conformance.pytreats as ground truth for what eachprovider actually emits - are not touched by this PR either. An
earlier revision of this branch had added the two new fields to those
captures to get a two-governed-stage test fixture cheaply; Codex
correctly flagged that as asserting behaviour no real cloud deployment
produces, which would have hidden the exact adapter gap this slice
defers. The two tests that need a multi-governed-stage input now build
one directly (
_synthetic_multi_capability_contractintest_provider_contracts.py), assembled fromlocal-provider- contracts-v3.json- the one fixture that is honest about these fieldsExplicitly out of scope (left for #131's remaining slices)
governed_stagestoactually register per-stage services in OpenMetadata.
module "openmetadata"is untouched (count = governance_enabled ? 1 : 0),and the Terraform
checklimiting governed stages to one for thatsame reason is untouched. This needs a live cluster to verify
(
local-e2e), which this environment does not have.aws-poc/azure-poc'scontracts.tfemitpipeline_service_name/dashboard_service_name,see above.
OpenLakeForgeStageclassification/tag.defaultPipelineService,namespaceToServiceMapping).superset_<stage>dashboard services in OpenMetadata itself(depends on Add stage-aware Superset authoring and report promotion #130, only partly landed) - this PR only exports the
deterministic name, it does not register anything.
ws_<user>_*exclusion - vacuous until Run personal DEV workspaces locally with DuckDB over Iceberg catalog adapters #117 lands.Falsification
ProviderContracts.governed_stages, collapsed to simulate the bug thischange fixes:
Restored; full file green again (105 passed).
ProviderContracts.analytics_stages, aliased to the governance filterto simulate the bug the second test guards against (a consumer that
loops the governed set for dashboard roots too):
Restored (diffed clean against backup); full file green again (105
passed).
The two canonical-name checks were falsified the same way earlier
(commented out
pipeline_service_name's check) and also confirmed tofail without the guard; that guard is unchanged by this update.
Gates
🤖 Generated with Claude Code
https://claude.ai/code/session_01Tq7cZuHZp5U2DQ5NsuxZE2