Skip to content

Fix DatabricksWorkflowTaskGroup ignoring deps set before with block#68924

Merged
eladkal merged 1 commit into
apache:mainfrom
moomindani:fix-databricks-taskgroup-upstream
Jun 24, 2026
Merged

Fix DatabricksWorkflowTaskGroup ignoring deps set before with block#68924
eladkal merged 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>

@eladkal eladkal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@eladkal
eladkal merged commit 73c8841 into apache:main Jun 24, 2026
81 checks passed
karenbraganz pushed a commit to karenbraganz/airflow that referenced this pull request Jun 30, 2026
…re with block (apache#68924)

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

2 participants