Skip to content

[ci/cd] fix python tests with more strict scoping#494

Merged
luoyuxia merged 2 commits into
apache:mainfrom
fresh-borzoni:fix/python-ci-function-scope-loop
Apr 17, 2026
Merged

[ci/cd] fix python tests with more strict scoping#494
luoyuxia merged 2 commits into
apache:mainfrom
fresh-borzoni:fix/python-ci-function-scope-loop

Conversation

@fresh-borzoni

@fresh-borzoni fresh-borzoni commented Apr 17, 2026

Copy link
Copy Markdown
Member

resolves #492

Needs verification(probably a couple of CI/CD runs):

Python CI tests (especially on 3.11) intermittently hang and get killed by the 30s pytest-timeout. The hangs started after the async for loop support was added (#438), which introduced future_into_py-based polling tasks on the shared tokio runtime.

With session-scoped event loops, all tests within a worker share one event loop. Abandoned async generators from earlier tests (e.g., async for ... break) can leave in-flight future_into_py tasks that interact with subsequent tests via the shared event loop.
Per-function scope eliminates cross-test interference.

@fresh-borzoni

Copy link
Copy Markdown
Member Author

@luoyuxia @leekeiabstraction I might need some help with verification and running CI/CD a couple of times

@luoyuxia

Copy link
Copy Markdown
Contributor

@luoyuxia @leekeiabstraction I might need some help with verification and running CI/CD a couple of times

I'm always online in the next few hours.

@luoyuxia luoyuxia merged commit be4e2d1 into apache:main Apr 17, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[ci] Python CI run 3.11 runs into timeout

2 participants