Lee-W commented on code in PR #52053: URL: https://github.com/apache/airflow/pull/52053#discussion_r2192617411
########## providers/standard/src/airflow/providers/standard/operators/hitl.py: ########## @@ -0,0 +1,205 @@ +# 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 collections.abc import Sequence +from datetime import datetime, timezone +from typing import TYPE_CHECKING, Any + +from airflow.models import SkipMixin +from airflow.models.baseoperator import BaseOperator +from airflow.providers.standard.exceptions import HITLTriggerEventError +from airflow.providers.standard.execution_time.hitl import add_hitl_input_request +from airflow.providers.standard.triggers.hitl import HITLTrigger +from airflow.providers.standard.version_compat import AIRFLOW_V_3_1_PLUS +from airflow.sdk.definitions.param import ParamsDict + +if TYPE_CHECKING: + from airflow.sdk.definitions.context import Context + +log = logging.getLogger(__name__) +if not AIRFLOW_V_3_1_PLUS: + log.warning("Human in the loop functionality needs Airflow 3.1+..") + + +class HITLOperator(BaseOperator): Review Comment: I completely understand why we wanted to separate this from the core initially. I felt a bit uneasy about it as well. However, after seeing what Ash mentioned regarding other systems that had this functionality a long time ago, it does seem like something we should include in the core. It's just the first implementation is in the standard provider, but we may later leverage it in other providers as well. As the new PR https://github.com/apache/airflow/pull/52868 is ready. I'm going to close this one. Thanks! -- 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]
