ferruzzi commented on code in PR #54796:
URL: https://github.com/apache/airflow/pull/54796#discussion_r2392870715


##########
airflow-core/src/airflow/models/callback.py:
##########
@@ -0,0 +1,177 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+from __future__ import annotations
+
+import logging
+from enum import Enum
+from importlib import import_module
+from typing import TYPE_CHECKING
+
+import uuid6
+from sqlalchemy import Column, ForeignKey, Integer, String, Text
+from sqlalchemy.orm import relationship
+from sqlalchemy_utils import UUIDType
+
+from airflow._shared.timezones import timezone
+from airflow.models import Base
+from airflow.utils.sqlalchemy import ExtendedJSON, UtcDateTime
+
+if TYPE_CHECKING:
+    from sqlalchemy.orm import Session
+
+    from airflow.callbacks.callback_requests import CallbackRequest
+    from airflow.triggers.base import TriggerEvent
+
+log = logging.getLogger(__name__)
+
+
+class CallbackState(str, Enum):
+    """All possible states of callbacks."""
+
+    PENDING = "pending"
+    QUEUED = "queued"
+    RUNNING = "running"
+    SUCCESS = "success"
+    FAILED = "failed"
+
+
+class CallbackType(str, Enum):
+    """
+    Types of Callbacks.
+
+    Used for figuring out what class to instantiate while deserialization.
+    """
+
+    TRIGGERER = "triggerer"
+    EXECUTOR = "executor"
+    DAG_PROCESSOR = "dag_processor"
+
+
+class CallbackFetchMethod(str, Enum):
+    """Methods used to fetch callback at runtime."""
+
+    # For when Dag Processor callbacks 
(on_success_callback/on_failure_callback) once they get moved to executors

Review Comment:
   Is "once they get moved" intentional or a typo?  I'm note sure I understand 
the comment the way it is written.



##########
airflow-core/src/airflow/executors/workloads.py:
##########
@@ -97,6 +107,13 @@ class ExecuteTask(BaseWorkload):
     log_path: str | None
     """The rendered relative log filename template the task logs should be 
written to"""
 
+
+class ExecuteTask(BaseDagBundleWorkload):
+    """Execute the given Task."""
+
+    ti: TaskInstance
+    """The TaskInstance to execute"""

Review Comment:
   Feel free to just ignore this nit-pick:  Maybe don't need this comment, or 
make it a # comment and add it to the line above?  Seems odd here.  



-- 
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