Skip to content

Commit

Permalink
ExecutorConfigType should be cacheable (#26498)
Browse files Browse the repository at this point in the history
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.

(cherry picked from commit ba9edda)
  • Loading branch information
dstandish authored and jedcunningham committed Sep 23, 2022
1 parent aa4f1c4 commit 2297b6b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions airflow/utils/sqlalchemy.py
Expand Up @@ -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
Expand Down

0 comments on commit 2297b6b

Please sign in to comment.