Skip to content

Task-value references ({{tasks.P.values.*}}) not added as dependencies → job creation rejected #30

Description

@matthewmoorcroft

Summary

File: src/flowx/bundler/dab_writer.py (new _backfill_task_value_dependencies, wired into _build_job_resource)

flowx rewrites ADF @variables('X') / @activity('Y').output into {{tasks.P.values.*}} task-value references (synthesised _init_<var> tasks and IfCondition/Switch/ForEach bridge tasks), but does not always add the matching depends_on edge. Databricks requires the producer task to be a (transitive) dependency of any task referencing its value.

Observed failure (deploy-time)

INVALID_PARAMETER_VALUE: Task 'P' must be a dependency of task 'T'

Impact

Job creation is rejected at deploy time whenever a bridge/init task references a task value without an explicit ordering edge. Blocks deployment of pipelines that use ADF variables or cross-activity output references.

Proposed fix

After _strip_dangling_task_value_refs, scan each task's condition_task.{left,right} and notebook_task.base_parameters for {{tasks.P.values.*}} refs; for each referenced producer P that exists in this job's task list but isn't already a direct dependency of the consumer, append {"task_key": P} to its depends_on. Operates within a single job scope; recurses into for_each_task.task bodies against their own sibling set.

Note

Intra-job / intra-pipeline dependency correctness — independent of the cross-pipeline lineage work in #23/#24.

Test gap

No test asserts the task-value ⟹ dependency invariant. Fix PR adds coverage.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions