Vamsi-klu opened a new pull request, #66681:
URL: https://github.com/apache/airflow/pull/66681

   The runtime fix for issue #47614 shipped in #48492 (commit 9dcce2f71b). The
   GitHub issue stayed open because:
   
   1. The existing unit test (`test_convert_to_databricks_workflow_task`) passed
      `relevant_upstreams = [MagicMock(task_id="upstream_task")]` — a list of
      mock objects, not strings — so the `task_id in relevant_upstreams` filter
      was silently always-False and the `depends_on` branch was never exercised.
      The fix could regress without anyone noticing.
   2. A few small follow-on quality issues in the same area were worth 
tightening.
   3. The issue was not linked to the merged PR, so it wasn't auto-closed.
   
   This PR is therefore a lock-in / regression / hardening change, not a new 
fix.
   
   ## Changes
   
   - `databricks.py`: corrected `relevant_upstreams` annotation from
     `list[BaseOperator]` to `list[str]` on both `DatabricksTaskBaseOperator`
     and `DatabricksNotebookOperator` overrides.
   - `databricks_workflow.py`: changed `self.relevant_upstreams = [task_id]`
     to `self.relevant_upstreams: list[str] = []`. Behavior is unchanged
     (the launch task's raw, unprefixed task_id was previously filtered out
     only by an accidental prefix mismatch); the new initializer makes the
     intent explicit.
   - `test_databricks_workflow.py`: new `TestWorkflowDependsOn` class with 7
     end-to-end tests that build a real `DAG` + `DatabricksWorkflowTaskGroup`
     with real `DatabricksNotebookOperator` tasks and assert on the
     `tasks[*]['depends_on']` payload returned by `create_workflow_json()`.
     Covers default keys, custom parent key, >100-char parent key, diamond,
     fan-out, root tasks (launch task is filtered out), and external
     upstream filtering.
   - `test_databricks.py`: fixed the existing
     `test_convert_to_databricks_workflow_task` to pass strings instead of
     mocks and to assert the correct parent-keyed `depends_on`. Added
     `test_generate_databricks_task_key_requires_task_dict_when_task_id_passed`.
   - `changelog.rst`: Bug Fixes entry under 7.14.0.
   
   closes: #47614
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Code (Opus 4.7)
   
   Generated-by: Claude Code (Opus 4.7) following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to