Skip to content

Conversation

@github-actions
Copy link

This is a follow up to #57212, which worked fine "at run time" but did not
work in many of our own unit tests, which rely on dag.test or ti.run.

The way this is implemented is that when we use the InProcessTestSupervisor we
pre-emptively create a socket pair. We have to create it even it its not being
used, as we can't know.

And since this is all in one process we create a thread to handle the socket
comms. Since this is only ever for tests performance or hitting the GIL
doesn't matter.
(cherry picked from commit 5cc2c8c)

Co-authored-by: Ash Berlin-Taylor ash@apache.org

…cess when `dag.test()` is used (#58147)

This is a follow up to #57212, which worked fine "at run time" but did not
work in many of our own unit tests, which rely on `dag.test` or `ti.run`.

The way this is implemented is that when we use the InProcessTestSupervisor we
pre-emptively create a socket pair. We have to create it even it its not being
used, as we can't know.

And since this is all in one process we create a thread to handle the socket
comms. Since this is only ever for tests performance or hitting the GIL
doesn't matter.
(cherry picked from commit 5cc2c8c)

Co-authored-by: Ash Berlin-Taylor <ash@apache.org>
@ashb ashb marked this pull request as ready for review November 13, 2025 13:08
@ashb ashb merged commit 90a65be into v3-1-test Nov 13, 2025
58 checks passed
@ashb ashb deleted the backport-5cc2c8c-v3-1-test branch November 13, 2025 14:38
ephraimbuddy pushed a commit that referenced this pull request Nov 18, 2025
…cess when `dag.test()` is used (#58147) (#58266)

This is a follow up to #57212, which worked fine "at run time" but did not
work in many of our own unit tests, which rely on `dag.test` or `ti.run`.

The way this is implemented is that when we use the InProcessTestSupervisor we
pre-emptively create a socket pair. We have to create it even it its not being
used, as we can't know.

And since this is all in one process we create a thread to handle the socket
comms. Since this is only ever for tests performance or hitting the GIL
doesn't matter.
(cherry picked from commit 5cc2c8c)

Co-authored-by: Ash Berlin-Taylor <ash@apache.org>
ephraimbuddy pushed a commit that referenced this pull request Nov 19, 2025
…cess when `dag.test()` is used (#58147) (#58266)

This is a follow up to #57212, which worked fine "at run time" but did not
work in many of our own unit tests, which rely on `dag.test` or `ti.run`.

The way this is implemented is that when we use the InProcessTestSupervisor we
pre-emptively create a socket pair. We have to create it even it its not being
used, as we can't know.

And since this is all in one process we create a thread to handle the socket
comms. Since this is only ever for tests performance or hitting the GIL
doesn't matter.
(cherry picked from commit 5cc2c8c)

Co-authored-by: Ash Berlin-Taylor <ash@apache.org>
ephraimbuddy pushed a commit that referenced this pull request Nov 19, 2025
…cess when `dag.test()` is used (#58147) (#58266)

This is a follow up to #57212, which worked fine "at run time" but did not
work in many of our own unit tests, which rely on `dag.test` or `ti.run`.

The way this is implemented is that when we use the InProcessTestSupervisor we
pre-emptively create a socket pair. We have to create it even it its not being
used, as we can't know.

And since this is all in one process we create a thread to handle the socket
comms. Since this is only ever for tests performance or hitting the GIL
doesn't matter.
(cherry picked from commit 5cc2c8c)

Co-authored-by: Ash Berlin-Taylor <ash@apache.org>
ephraimbuddy pushed a commit that referenced this pull request Nov 20, 2025
…cess when `dag.test()` is used (#58147) (#58266)

This is a follow up to #57212, which worked fine "at run time" but did not
work in many of our own unit tests, which rely on `dag.test` or `ti.run`.

The way this is implemented is that when we use the InProcessTestSupervisor we
pre-emptively create a socket pair. We have to create it even it its not being
used, as we can't know.

And since this is all in one process we create a thread to handle the socket
comms. Since this is only ever for tests performance or hitting the GIL
doesn't matter.
(cherry picked from commit 5cc2c8c)

Co-authored-by: Ash Berlin-Taylor <ash@apache.org>
@ephraimbuddy ephraimbuddy added the type:bug-fix Changelog: Bug Fixes label Dec 1, 2025
@ephraimbuddy ephraimbuddy added this to the Airflow 3.1.4 milestone Dec 1, 2025
ephraimbuddy pushed a commit that referenced this pull request Dec 3, 2025
…cess when `dag.test()` is used (#58147) (#58266)

This is a follow up to #57212, which worked fine "at run time" but did not
work in many of our own unit tests, which rely on `dag.test` or `ti.run`.

The way this is implemented is that when we use the InProcessTestSupervisor we
pre-emptively create a socket pair. We have to create it even it its not being
used, as we can't know.

And since this is all in one process we create a thread to handle the socket
comms. Since this is only ever for tests performance or hitting the GIL
doesn't matter.
(cherry picked from commit 5cc2c8c)

Co-authored-by: Ash Berlin-Taylor <ash@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:task-sdk type:bug-fix Changelog: Bug Fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants