Skip to content

Test that execute_tasks_new_python_interpreter only affects the task process - #73149

Merged
kaxil merged 1 commit into
apache:mainfrom
astronomer:exec-optin-task-only
Sep 16, 2026
Merged

kaxil merged 1 commit into
apache:mainfrom
astronomer:exec-optin-task-only

Conversation

@kaxil

@kaxil kaxil commented Sep 14, 2026

Copy link
Copy Markdown
Member

Follow-up to #72164, which scoped [core] execute_tasks_new_python_interpreter to the task process. The tests around that scope patch the platform gate, _should_use_exec(), and assert the value flows through to WatchedSubprocess.start; none of them set the option itself. A config read moved back into the shared gate, which is the shape the first revision of #72164 had, would pass the suite while switching the Dag processor and the triggerer to a fresh interpreter per fork.

These tests set the option to True and to False and assert that DagFileProcessorProcess.start, TriggerRunnerSupervisor.start and CallbackSubprocess.start still hand use_exec=False to the base start(). The Dag processor and triggerer tests run under the existing autouse fixtures that pin the platform gate to bare fork, so they hold on macOS as well as Linux. The callback test needs no pin: its closure target can only run under a bare fork, which is what the assertion protects.

…process

The existing fork+exec wiring tests patch the platform gate and check it flows
through to WatchedSubprocess.start; none set the option itself. These tests set
[core] execute_tasks_new_python_interpreter and assert the Dag processor, the
triggerer and the callback supervisor still start their child with a bare fork.
@kaxil kaxil changed the title Test that execute_tasks_new_python_interpreter only affects the task process Test that execute_tasks_new_python_interpreter only affects the task process Sep 14, 2026

@jason810496 jason810496 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for covering the test gap.

@amoghrajesh amoghrajesh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice thanks

@kaxil
kaxil merged commit ebd339f into apache:main Sep 16, 2026
107 checks passed
@kaxil
kaxil deleted the exec-optin-task-only branch September 16, 2026 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants