Skip to content

Commit e35cf2f

Browse files
authored
Scheduler shouldn't crash when 'executor_config' is passed for executors using task SDK (apache#47548)
1 parent 58142bd commit e35cf2f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

airflow/executors/workloads.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class TaskInstance(BaseModel):
6161
pool_slots: int
6262
queue: str
6363
priority_weight: int
64-
executor_config: dict | None = None
64+
executor_config: dict | None = Field(default=None, exclude=True)
6565

6666
# TODO: Task-SDK: Can we replace TastInstanceKey with just the uuid across the codebase?
6767
@property

providers/celery/src/airflow/providers/celery/executors/celery_executor_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ def send_task_to_executor(
264264
if AIRFLOW_V_3_0_PLUS:
265265
if TYPE_CHECKING:
266266
assert isinstance(args, workloads.BaseWorkload)
267-
args = (args.model_dump_json(exclude={"ti": {"executor_config"}}),)
267+
args = (args.model_dump_json(),)
268268
try:
269269
with timeout(seconds=OPERATION_TIMEOUT):
270270
result = task_to_run.apply_async(args=args, queue=queue)

0 commit comments

Comments
 (0)