jason810496 commented on code in PR #65587:
URL: https://github.com/apache/airflow/pull/65587#discussion_r3198719542


##########
airflow-core/src/airflow/models/variable.py:
##########
@@ -135,6 +135,11 @@ def val(cls):
         """Get Airflow Variable from Metadata DB and decode it using the 
Fernet Key."""
         return synonym("_val", descriptor=property(cls.get_val, cls.set_val))
 
+    @staticmethod
+    def _should_use_task_sdk_api_path() -> bool:

Review Comment:
   How about invoking the function we imported directly instead of adding a new 
static method?



##########
airflow-core/src/airflow/models/process_context.py:
##########
@@ -0,0 +1,53 @@
+# 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 os
+import sys
+from collections.abc import Generator
+from contextlib import contextmanager
+from contextvars import ContextVar
+from typing import Literal
+
+_PROCESS_CONTEXT_OVERRIDE: ContextVar[str | None] = ContextVar(
+    "_AIRFLOW_PROCESS_CONTEXT_OVERRIDE",
+    default=None,
+)
+

Review Comment:
   It doesn't seem like a good place for these utilities. Shouldn't `models/*` 
be something related to "Data Model" (or a Table in Metadata DB more specific).



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