Skip to content

Backfill task-value dependency edges so jobs are accepted at deploy - #35

Open
matthewmoorcroft wants to merge 2 commits into
unify/reconcile-internalfrom
pr/task-value-dependency-edges
Open

Backfill task-value dependency edges so jobs are accepted at deploy#35
matthewmoorcroft wants to merge 2 commits into
unify/reconcile-internalfrom
pr/task-value-dependency-edges

Conversation

@matthewmoorcroft

Copy link
Copy Markdown
Member

Closes #30

What

Databricks rejects a job whose task references {{tasks.P.values.Y}} when P is not a dependency of the referencing task (INVALID_PARAMETER_VALUE: Task 'P' must be a dependency of task 'T'). flowx rewrites ADF @variables() / @activity().output into such task-value refs (synthesised _init_<var> tasks and IfCondition/Switch/ForEach bridges) without always adding the matching depends_on edge.

New _backfill_task_value_dependencies runs after _strip_dangling_task_value_refs: it scans condition_task.{left,right} and notebook_task.base_parameters for {{tasks.P.values.*}} refs and appends {"task_key": P} to the consumer's depends_on when P exists in the job's task list and isn't already a direct dependency. Operates per job scope; recurses into for_each bodies against their own sibling set.

Scope

src/flowx/bundler/dab_writer.py only (the task-value dependency backfill; the cross-bundle ref rewrite is a separate PR). Intra-job correctness — independent of the lineage epic (#23/#24).

Testing

make test full unit suite green (714 passed, 1 skipped); test_bundler.py + test_bundle_invariants.py pass.

This pull request and its description were written by Isaac.

matthewmoorcroft and others added 2 commits September 1, 2026 11:14
Rewrite internal package-proxy URLs (pypi-proxy.dev.databricks.com) to
pypi.org / files.pythonhosted.org so public CI resolves deps. Same pinned
versions and hashes; matches main.

Co-authored-by: Isaac <no-reply@databricks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant