feat(observation): add platform-neutral Databricks observed state - #186
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add the minimal M1 platform-observation foundation without making Databricks semantics part of the core domain model.
Changes
ObservedPlatformState, asset, property, and identity models undersemapact.observation;platform + ordered namespace + assetrather than hard-codingcatalog/schemainto the domain;WorkspaceClient.tables.get(...) -> TableInfoand projects it directly into observed state;WorkspaceClientand does not resolve PATs, Azure/OAuth credentials, profiles, service principals, managed identity, or other auth methods;datacontract-cli[databricks]through thesemapact[databricks]optional dependency instead of maintaining a separate Databricks dependency envelope;UnityImporter, create ODCS, or reuse ODCS type/logical-type projection;deltalakeextra, so installing Databricks support no longer imports unrelated Delta dependencies;Boundary
The shared/reused layer is Databricks connectivity + typed
TableInfo, not datacontract-cli's ODCS projection. Credential resolution stays outside the observation adapter.Core identity stays provider-neutral:
Future Snowflake/Fabric adapters can map their own hierarchy without changing the observation domain model.
Observation does not
Existing Unity contract import implementation remains unchanged; CI explicitly verifies that it is still importable from a fresh
semapact[databricks]installation.Dependency validation
The repository keeps its existing frozen
uv.lockbaseline rather than implicitly re-resolving the whole dependency graph for this feature. A dedicated CI job therefore performs a fresh install from project metadata:That smoke path currently resolves
datacontract-cli 1.1.2anddatabricks-sdk 0.133.0, verifiesWorkspaceClient,TableInfo, and the existingimport_unity_contractboundary, then runs the Databricks observation tests against the official SDK type.Follow-up
Authentication/client construction is intentionally a separate roadmap story (
semapact-project#121). Its initial CLI path may constructWorkspaceClient(host=..., token=...), while this observation API remains unchanged as other Databricks auth mechanisms are added.Validation
semapact[databricks]dependency-resolution smoke;TableInfoobservation tests: 8/8 passing;