pierrejeambrun commented on code in PR #58059:
URL: https://github.com/apache/airflow/pull/58059#discussion_r2690928812
##########
airflow-core/tests/unit/api_fastapi/core_api/routes/ui/test_dependencies.py:
##########
@@ -272,3 +272,35 @@ def test_with_node_id_filter_not_found(self, test_client):
assert response.json() == {
"detail": "Unique connected component not found, got [] for
connected components of node missing_node_id, expected only 1 connected
component.",
}
+
+ @pytest.mark.parametrize(
+ ("dependency_type", "has_dag", "has_task"),
+ [
+ (None, True, False), # default is scheduling
+ ("scheduling", True, False),
+ ("data", False, True),
+ ],
+ )
+ def test_dependency_type_filter(self, test_client, asset1_id,
dependency_type, has_dag, has_task):
+ params = {"node_id": f"asset:{asset1_id}"}
+ if dependency_type is not None:
+ params["dependency_type"] = dependency_type
+
+ response = test_client.get("/dependencies", params=params)
+ assert response.status_code == 200
+
+ result = response.json()
+ node_types = {node["type"] for node in result["nodes"]}
+
+ assert "asset" in node_types
+ assert ("dag" in node_types) == has_dag
+ assert ("task" in node_types) == has_task
Review Comment:
Also in the UI we see
<img width="1601" height="784" alt="Screenshot 2026-01-14 at 16 28 18"
src="https://github.com/user-attachments/assets/dcddf3a4-65f1-4db5-9a4a-41ad10a88299"
/>
But we don't know the `dag id` this task is from. There could be multiple
tasks with the same name accross different dags.
--
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]