This is an automated email from the ASF dual-hosted git repository.
dstandish 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 ba9edda254 ExecutorConfigType should be cacheable (#26498)
ba9edda254 is described below
commit ba9edda254a52af6915bd20d569a9f8c8dfb4bf9
Author: Daniel Standish <[email protected]>
AuthorDate: Mon Sep 19 22:18:47 2022 -0700
ExecutorConfigType should be cacheable (#26498)
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 1132ded87a..ef0d29ebf8 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