From a2e03efb315896cb77d22408270135d9cc9e3f64 Mon Sep 17 00:00:00 2001 From: Daniel Standish <15932138+dstandish@users.noreply.github.com> Date: Mon, 19 Sep 2022 11:30:11 -0700 Subject: [PATCH] ExecutorConfigType should be cacheable Apparently the cache_ok attribute must be applied to all subclasses too. So we must apply it here. This allows sqlalchemy to use the caching behavior introduced with version 1.4. See https://docs.sqlalchemy.org/en/14/core/type_api.html#sqlalchemy.types.ExternalType.cache_ok for more info. --- airflow/utils/sqlalchemy.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/airflow/utils/sqlalchemy.py b/airflow/utils/sqlalchemy.py index 1132ded87a915..ef0d29ebf8a72 100644 --- a/airflow/utils/sqlalchemy.py +++ b/airflow/utils/sqlalchemy.py @@ -161,6 +161,8 @@ class ExecutorConfigType(PickleType): Airflow's serializer before pickling. """ + cache_ok = True + def bind_processor(self, dialect): from airflow.serialization.serialized_objects import BaseSerialization