Notebook 6.5.x Python Tests CI Job Failing with Jupyter_Client >= 8.0.0
- Dominant language
- Jupyter Notebook
- Stars
- 13.3k
- Forks
- 5.8k
- Avg merge
- 6d 11h
- Merged PRs (30d)
- 7
Description
**Describe the bug**
Notebook 6.5.x Python Tests CI Job, `test_connections` of the `KernelAPITest` is failing. In recent CI environments for the Python Tests, the version of `jupyter_client` installed is `8.0.3` which which results in the error `tornado.simple_httpclient.HTTPTimeoutError: Timeout during request` when the `run_sync` method is called.
**To Reproduce**
This can be locally reproduced by running the tests in `notebook/services/kernels/tests/test_kernels_api.py`. Observe that with a version of `jupyter_client` >= 8.0.0, the `test_connections` fails. When we install `jupyter_client`==7.4.9, the test suite passes.
**Expected behavior**
Expected successful communication with the HTTP client and passing test suite.
**Links**
Link to one instance of this failure in Python Tests CI Job
https://github.com/jupyter/notebook/actions/runs/4225687193/jobs/7338276859
**Desktop**
- OS: Apple M1
**Additional context**
Going back to the changes in `jupyter_client` in PR https://github.com/jupyter/jupyter_client/pull/835, the first instance of a successfully running test suite where the test failure is present is at https://github.com/jupyter/jupyter_client/pull/835/commits/00ac661591070d704ceebe1a0bf91f669e16142b
Linking https://github.com/jupyter/notebook/issues/6721 as changes in PR https://github.com/jupyter/jupyter_client/pull/835 also showed the first instance of the error described in that issue. Specifically, the commit https://github.com/jupyter/jupyter_client/pull/835/commits/ab93126452b9aea86768188270b4b1df2b01b633 is the first instance where I encountered this error message.
As @zsailer suggested in the Notebook meeting: some of the improvements for asyncio support may be clashing with the classic notebook server so pinning a version of jupyter_client and pyzmq to quickly mitigate this issue may be the next step.
Contributor guide
Research direction
Start with notebook/services/kernels/tests/test_kernels_api.py and run the KernelAPITest tests with jupyter_client 8.0.3 and 7.4.9 to confirm the version-dependent failure. Review the linked CI run and dependency changes around jupyter_client PR 835, then verify that the Python Tests CI job and the affected test pass with the chosen dependency compatibility change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter, jupyter-notebook, python
- Domain
- ci-cd, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100