Commit 888ff04
committed
Honor execute_tasks_new_python_interpreter in the task supervisor
The config currently stops one fork short: the executor honors it when
launching the supervisor, but the Task SDK supervisor then bare-forks the
task runner anyway. On a long-running multithreaded supervisor (OTel
exporter, google-auth refresh threads, OpenLineage listener) that fork
can inherit OpenSSL's global lock mid-held by a sibling thread, and every
SSLContext construction in the child then blocks forever (issue #71707).
Reuse the existing fork+exec machinery (already used on macOS) so Linux
deployments can opt into a fresh interpreter per task with the same
[core] execute_tasks_new_python_interpreter knob, matching what the Edge
worker did in #65943.1 parent 2811044 commit 888ff04
3 files changed
Lines changed: 82 additions & 2 deletions
File tree
- airflow-core/src/airflow/config_templates
- task-sdk
- src/airflow/sdk/execution_time
- tests/task_sdk/execution_time
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
226 | 231 | | |
227 | 232 | | |
228 | 233 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
517 | 517 | | |
518 | 518 | | |
519 | 519 | | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
520 | 532 | | |
521 | 533 | | |
522 | 534 | | |
| |||
1412 | 1424 | | |
1413 | 1425 | | |
1414 | 1426 | | |
1415 | | - | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
1416 | 1431 | | |
1417 | 1432 | | |
1418 | | - | |
| 1433 | + | |
1419 | 1434 | | |
1420 | 1435 | | |
1421 | 1436 | | |
| |||
Lines changed: 60 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4479 | 4479 | | |
4480 | 4480 | | |
4481 | 4481 | | |
| 4482 | + | |
| 4483 | + | |
| 4484 | + | |
| 4485 | + | |
| 4486 | + | |
| 4487 | + | |
| 4488 | + | |
| 4489 | + | |
| 4490 | + | |
| 4491 | + | |
| 4492 | + | |
| 4493 | + | |
| 4494 | + | |
| 4495 | + | |
| 4496 | + | |
| 4497 | + | |
| 4498 | + | |
| 4499 | + | |
| 4500 | + | |
| 4501 | + | |
| 4502 | + | |
| 4503 | + | |
| 4504 | + | |
| 4505 | + | |
| 4506 | + | |
| 4507 | + | |
| 4508 | + | |
| 4509 | + | |
| 4510 | + | |
| 4511 | + | |
| 4512 | + | |
| 4513 | + | |
| 4514 | + | |
| 4515 | + | |
| 4516 | + | |
| 4517 | + | |
| 4518 | + | |
| 4519 | + | |
| 4520 | + | |
| 4521 | + | |
| 4522 | + | |
| 4523 | + | |
| 4524 | + | |
| 4525 | + | |
| 4526 | + | |
| 4527 | + | |
| 4528 | + | |
| 4529 | + | |
| 4530 | + | |
| 4531 | + | |
| 4532 | + | |
| 4533 | + | |
| 4534 | + | |
| 4535 | + | |
| 4536 | + | |
| 4537 | + | |
| 4538 | + | |
| 4539 | + | |
| 4540 | + | |
| 4541 | + | |
4482 | 4542 | | |
4483 | 4543 | | |
4484 | 4544 | | |
| |||
0 commit comments