This is an automated email from the ASF dual-hosted git repository.

pierrejeambrun pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 388f4c850af AIP-84 remove 'sensor' from graph node type (#44657)
388f4c850af is described below

commit 388f4c850afd26667982a751153ea7314c050e5d
Author: Pierre Jeambrun <[email protected]>
AuthorDate: Thu Dec 5 02:46:41 2024 +0800

    AIP-84 remove 'sensor' from graph node type (#44657)
---
 airflow/api_fastapi/core_api/datamodels/ui/structure.py | 2 +-
 airflow/api_fastapi/core_api/openapi/v1-generated.yaml  | 1 -
 airflow/ui/openapi-gen/requests/schemas.gen.ts          | 2 +-
 airflow/ui/openapi-gen/requests/types.gen.ts            | 4 ++--
 airflow/utils/task_group.py                             | 3 ---
 5 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/airflow/api_fastapi/core_api/datamodels/ui/structure.py 
b/airflow/api_fastapi/core_api/datamodels/ui/structure.py
index 9461ba85a76..cb135c141bb 100644
--- a/airflow/api_fastapi/core_api/datamodels/ui/structure.py
+++ b/airflow/api_fastapi/core_api/datamodels/ui/structure.py
@@ -39,7 +39,7 @@ class NodeResponse(BaseModel):
     label: str
     tooltip: str | None = None
     setup_teardown_type: Literal["setup", "teardown"] | None = None
-    type: Literal["join", "sensor", "task", "asset_condition"]
+    type: Literal["join", "task", "asset_condition"]
     operator: str | None = None
 
 
diff --git a/airflow/api_fastapi/core_api/openapi/v1-generated.yaml 
b/airflow/api_fastapi/core_api/openapi/v1-generated.yaml
index 9973ee7c6bb..b877e8988a1 100644
--- a/airflow/api_fastapi/core_api/openapi/v1-generated.yaml
+++ b/airflow/api_fastapi/core_api/openapi/v1-generated.yaml
@@ -7809,7 +7809,6 @@ components:
           type: string
           enum:
           - join
-          - sensor
           - task
           - asset_condition
           title: Type
diff --git a/airflow/ui/openapi-gen/requests/schemas.gen.ts 
b/airflow/ui/openapi-gen/requests/schemas.gen.ts
index 566452ee11e..c745b04fbd0 100644
--- a/airflow/ui/openapi-gen/requests/schemas.gen.ts
+++ b/airflow/ui/openapi-gen/requests/schemas.gen.ts
@@ -3171,7 +3171,7 @@ export const $NodeResponse = {
     },
     type: {
       type: "string",
-      enum: ["join", "sensor", "task", "asset_condition"],
+      enum: ["join", "task", "asset_condition"],
       title: "Type",
     },
     operator: {
diff --git a/airflow/ui/openapi-gen/requests/types.gen.ts 
b/airflow/ui/openapi-gen/requests/types.gen.ts
index 78fbc609499..2831e7225f7 100644
--- a/airflow/ui/openapi-gen/requests/types.gen.ts
+++ b/airflow/ui/openapi-gen/requests/types.gen.ts
@@ -766,11 +766,11 @@ export type NodeResponse = {
   label: string;
   tooltip?: string | null;
   setup_teardown_type?: "setup" | "teardown" | null;
-  type: "join" | "sensor" | "task" | "asset_condition";
+  type: "join" | "task" | "asset_condition";
   operator?: string | null;
 };
 
-export type type = "join" | "sensor" | "task" | "asset_condition";
+export type type = "join" | "task" | "asset_condition";
 
 /**
  * Request body for Clear Task Instances endpoint.
diff --git a/airflow/utils/task_group.py b/airflow/utils/task_group.py
index c8ee4923acb..dafd87ab7df 100644
--- a/airflow/utils/task_group.py
+++ b/airflow/utils/task_group.py
@@ -82,7 +82,6 @@ def task_group_to_dict(task_item_or_group):
     from airflow.models.abstractoperator import AbstractOperator
     from airflow.models.baseoperator import BaseOperator
     from airflow.models.mappedoperator import MappedOperator
-    from airflow.sensors.base import BaseSensorOperator
 
     if isinstance(task := task_item_or_group, AbstractOperator):
         setup_teardown_type = {}
@@ -95,8 +94,6 @@ def task_group_to_dict(task_item_or_group):
             setup_teardown_type["setup_teardown_type"] = "teardown"
         if isinstance(task, MappedOperator):
             is_mapped["is_mapped"] = True
-        if isinstance(task, BaseSensorOperator):
-            node_type["type"] = "sensor"
         if isinstance(task, BaseOperator) or isinstance(task, MappedOperator):
             node_operator["operator"] = task.operator_name
 

Reply via email to