Phase 1 stack #2: ADF discovery — inventory + lineage + motifs - #94
Open
matthewmoorcroft wants to merge 3 commits into
Open
matthewmoorcroft wants to merge 3 commits into
matthewmoorcroft wants to merge 3 commits into
Conversation
Map ADF exports onto the shared source-neutral discovery AST and emit a source-agnostic inventory, populate control/data lineage (Switch-aware), surface detected ADF motifs additively in the inventory, and carry the lineage/motif tags on the IR (data_reads/data_writes, motif_id on the Activity base; pipeline lineage block) with matching serialization. Consolidates PRs #79 (ADF -> shared source AST + inventory emitter), #80 (data/control lineage + Switch-aware walking), #81 (emit lineage into inventory.json) and #90/#64 (motif detection + exact-duplicate dedupe), plus the coverage golden. Co-authored-by: Isaac <no-reply@databricks.com>
FIX 1: When ADF discover parses zero pipelines (e.g. --source-dir pointed at a directory of ARM templates with no recognized pipelines/ layout), emit a loud stderr warning instead of finishing with a success-shaped "Loaded 0 pipeline(s)". The warning steers the operator to pass the ARM template as the file path or supply the expected export layout. Exit code for the 0-pipeline case is unchanged (still 0); behaviour for valid dirs/files is untouched. FIX 7: Label the discover summary's "Total activities" count as raw activities including nested, and note that convert reports top-level task-units after motif collapse, so the smaller convert number is not mistaken for a discrepancy. Console-output only -- inventory.json keys are byte-compatible (unchanged). Co-authored-by: Isaac <no-reply@databricks.com>
Cross-review (non-blocking): the loud 0-pipeline warning referenced the loader's internal --source-dir flag, but that is not what a user passes -- the discover runner takes --adf-source-path (the generic --source-path alias normalises to --source-dir internally). Name --adf-source-path in the guidance so the operator is pointed at the flag they actually use. Test asserts the user-facing flag is named and the internal one is not. Co-authored-by: Isaac <no-reply@databricks.com>
This branch has not been deployed
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.
Part of the Phase 1 stack. Stacked on #84 (shared source AST). Base:
discovery/shared-ast-standard.What this adds
Maps ADF onto the shared source AST and builds the unified
inventory.jsonfrom that AST, with control + data lineage and additive motifs. (Content of the former #79/#80/#81/#90.)sources/adf/discovery_mapping.py— AST →SourceGraph(1:1, source-faithful, no collapse)sources/adf/loader.py— inventory built from the discovery ASTsources/adf/dataset_lineage.py— ADF dataset →DataAsset(identity/signature)discovery_inventory.py— source-agnostic inventory emitter + additive per-pipelinemotifs[]Schema added (all additive; existing consumer keys byte-compatible)
source; per-activityoriginal_type, structureddependencies(with conditions), verbatimrawlineageblock:control_edges,data_edgesmotifs[]:motif_id,member_task_keys,databricks_replacement,confidence_notes— decoupled from lineage; discover does not collapse (the routing capability signal)