This is an automated email from the ASF dual-hosted git repository.
potiuk 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 83730d158ea Fix mypy static errors in main (#57755)
83730d158ea is described below
commit 83730d158ea6e0fed8831442a5412d94e4a22f4c
Author: Vincent <[email protected]>
AuthorDate: Mon Nov 3 11:47:06 2025 -0500
Fix mypy static errors in main (#57755)
---
providers/amazon/tests/system/amazon/aws/example_kinesis_analytics.py | 4 ++++
.../airflow/providers/cncf/kubernetes/kubernetes_helper_functions.py | 2 ++
.../fab/src/airflow/providers/fab/www/extensions/init_appbuilder.py | 2 ++
providers/fab/www-hash.txt | 2 +-
.../tests/system/microsoft/azure/example_powerbi_dataset_list.py | 2 ++
.../tests/system/microsoft/azure/example_powerbi_dataset_refresh.py | 2 ++
.../tests/system/microsoft/azure/example_powerbi_workspace_list.py | 2 ++
7 files changed, 15 insertions(+), 1 deletion(-)
diff --git
a/providers/amazon/tests/system/amazon/aws/example_kinesis_analytics.py
b/providers/amazon/tests/system/amazon/aws/example_kinesis_analytics.py
index fc05a11088b..8fcb7565e8c 100644
--- a/providers/amazon/tests/system/amazon/aws/example_kinesis_analytics.py
+++ b/providers/amazon/tests/system/amazon/aws/example_kinesis_analytics.py
@@ -178,12 +178,16 @@ def copy_jar_to_s3(bucket: str):
conn_type="http",
host="https://github.com/",
)
+ if settings.Session is None:
+ raise RuntimeError("Session not configured. Call configure_orm()
first.")
session = settings.Session()
session.add(conn)
session.commit()
@task(trigger_rule=TriggerRule.ALL_DONE)
def delete_connection(conn_id: str):
+ if settings.Session is None:
+ raise RuntimeError("Session not configured. Call configure_orm()
first.")
session = settings.Session()
conn_to_details = session.query(Connection).filter(Connection.conn_id
== conn_id).first()
session.delete(conn_to_details)
diff --git
a/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/kubernetes_helper_functions.py
b/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/kubernetes_helper_functions.py
index f0093d46710..19de125af3a 100644
---
a/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/kubernetes_helper_functions.py
+++
b/providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/kubernetes_helper_functions.py
@@ -111,6 +111,8 @@ def annotations_to_key(annotations: dict[str, str]) ->
TaskInstanceKey:
if not annotation_run_id and logical_date_key in annotations:
logical_date = pendulum.parse(annotations[logical_date_key])
# Do _not_ use create-session, we don't want to expunge
+ if Session is None:
+ raise RuntimeError("Session not configured. Call configure_orm()
first.")
session = Session()
task_instance_run_id = (
diff --git
a/providers/fab/src/airflow/providers/fab/www/extensions/init_appbuilder.py
b/providers/fab/src/airflow/providers/fab/www/extensions/init_appbuilder.py
index b474fb6d50a..3efe90a02d6 100644
--- a/providers/fab/src/airflow/providers/fab/www/extensions/init_appbuilder.py
+++ b/providers/fab/src/airflow/providers/fab/www/extensions/init_appbuilder.py
@@ -592,6 +592,8 @@ class AirflowAppBuilder:
def init_appbuilder(app: Flask, enable_plugins: bool) -> AirflowAppBuilder:
"""Init `Flask App Builder
<https://flask-appbuilder.readthedocs.io/en/latest/>`__."""
+ if settings.Session is None:
+ raise RuntimeError("Session not configured. Call configure_orm()
first.")
return AirflowAppBuilder(
app=app,
session=settings.Session(),
diff --git a/providers/fab/www-hash.txt b/providers/fab/www-hash.txt
index 4eec3bda07d..aa7744f8ab8 100644
--- a/providers/fab/www-hash.txt
+++ b/providers/fab/www-hash.txt
@@ -1 +1 @@
-337fac0d595edf73281ba03d11d6a6b88a41cc5010ce8e74ed8dd0c9ea84f5b8
+cebe3cef25a05608c332bf94f46f37596bd8f5a9309263f860a213daf79b3496
diff --git
a/providers/microsoft/azure/tests/system/microsoft/azure/example_powerbi_dataset_list.py
b/providers/microsoft/azure/tests/system/microsoft/azure/example_powerbi_dataset_list.py
index 65078ffadfb..9b292facf04 100644
---
a/providers/microsoft/azure/tests/system/microsoft/azure/example_powerbi_dataset_list.py
+++
b/providers/microsoft/azure/tests/system/microsoft/azure/example_powerbi_dataset_list.py
@@ -49,6 +49,8 @@ def create_connection(conn_id_name: str):
password=CLIENT_SECRET,
extra={"tenant_id": TENANT_ID},
)
+ if settings.Session is None:
+ raise RuntimeError("Session not configured. Call configure_orm()
first.")
session = settings.Session()
session.add(conn)
session.commit()
diff --git
a/providers/microsoft/azure/tests/system/microsoft/azure/example_powerbi_dataset_refresh.py
b/providers/microsoft/azure/tests/system/microsoft/azure/example_powerbi_dataset_refresh.py
index 65b9f101702..48ed8a8a16d 100644
---
a/providers/microsoft/azure/tests/system/microsoft/azure/example_powerbi_dataset_refresh.py
+++
b/providers/microsoft/azure/tests/system/microsoft/azure/example_powerbi_dataset_refresh.py
@@ -50,6 +50,8 @@ def create_connection(conn_id_name: str):
password=CLIENT_SECRET,
extra={"tenant_id": TENANT_ID},
)
+ if settings.Session is None:
+ raise RuntimeError("Session not configured. Call configure_orm()
first.")
session = settings.Session()
session.add(conn)
session.commit()
diff --git
a/providers/microsoft/azure/tests/system/microsoft/azure/example_powerbi_workspace_list.py
b/providers/microsoft/azure/tests/system/microsoft/azure/example_powerbi_workspace_list.py
index 04365cc6b9b..6f1ffc8ec59 100644
---
a/providers/microsoft/azure/tests/system/microsoft/azure/example_powerbi_workspace_list.py
+++
b/providers/microsoft/azure/tests/system/microsoft/azure/example_powerbi_workspace_list.py
@@ -48,6 +48,8 @@ def create_connection(conn_id_name: str):
password=CLIENT_SECRET,
extra={"tenant_id": TENANT_ID},
)
+ if settings.Session is None:
+ raise RuntimeError("Session not configured. Call configure_orm()
first.")
session = settings.Session()
session.add(conn)
session.commit()