Skip to content

Fix DatabricksWorkflowTaskGroup ignoring deps set before with block#68924

Open
moomindani wants to merge 1 commit into
apache:mainfrom
moomindani:fix-databricks-taskgroup-upstream
Open

Fix DatabricksWorkflowTaskGroup ignoring deps set before with block#68924
moomindani wants to merge 1 commit into
apache:mainfrom
moomindani:fix-databricks-taskgroup-upstream

Conversation

@moomindani

Copy link
Copy Markdown
Contributor

Fix DatabricksWorkflowTaskGroup so that upstream/downstream dependencies set via >> before the with block are correctly transferred to the internal launch task and leaf tasks.

When >> was called before the with task_group: block, the dependency was recorded on the task group but never transferred to the launch task (upstream) or the leaf tasks (downstream), because those tasks did not exist yet. Transfer self.upstream_task_ids and self.downstream_task_ids in __exit__() after creating the internal tasks.

Note: PR #67369 by @shubhgurav0590 identified the correct approach in this comment but the fix was never committed before the PR went stale. This PR implements that approach and adds downstream coverage. The commit includes Co-authored-by to preserve credit.

closes: #51598


Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 4.8)

Generated-by: Claude Code (Opus 4.8) following the guidelines

…re with block

When ``>>`` was called before the ``with task_group:`` block, the
dependency was recorded on the task group but never transferred to
the launch task (upstream) or the leaf tasks (downstream), because
those tasks did not exist yet. Transfer ``self.upstream_task_ids``
and ``self.downstream_task_ids`` in ``__exit__()`` after creating
the internal tasks.

closes: apache#51598

Co-authored-by: shubhgurav0590 <shubhgurav0590@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Airflow Databricks Operator Task Group Launch Task Not Properly Waiting for Upstream Tasks

1 participant