Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test strategy for JupyterHub v3.1.1 #479

Merged
merged 5 commits into from
Feb 27, 2023

Conversation

Sheila-nk
Copy link
Contributor

  • removed matrix config for Python 3.6 since it reached end of life
  • added matrix config for Python 3.9 using JupyterHub 3.1.1
  • added matrix config for Python 3.11 using JupyterHub 3.1.1

Reference #476

@Sheila-nk
Copy link
Contributor Author

Ping @GeorgianaElena the tests are failing with these errors:

AttributeError: 'coroutine' object has no attribute 'run_sync' and
RuntimeWarning: coroutine 'io_loop' was never awaited

Seems like they are still referencing the old app fixture from JupyterHub.

@Sheila-nk
Copy link
Contributor Author

io_loop error

@Sheila-nk
Copy link
Contributor Author

@GeorgianaElena Could the problem be the cached workflow dependencies?

@GeorgianaElena
Copy link
Member

Seems like they are still referencing the old app fixture from JupyterHub.

Yes, this is because the removal of the io_loop from tests was not yet released. So, the latest jupyterhub version 3.1.1 doesn't have the changes in jupyterhub/jupyterhub#4332.

AttributeError: 'coroutine' object has no attribute 'run_sync' and
RuntimeWarning: coroutine 'io_loop' was never awaited

Hmm, I believe these errors come from somewhere else and I suspect the breaking change introduced in pytest-asyncio 0.19.0 https://pytest-asyncio.readthedocs.io/en/latest/reference/changelog.html#id10 which is defaulting the asyncio_mode to strict. This, together with unreliabily adding the asyncio marker to tests and fixture might have caused the use of multiple events loop.

So, my suggestion would be to explicitly add the asyncio_mode=auto and remove any explicit asyncio test mark and see if this fixes it.

@Sheila-nk
Copy link
Contributor Author

@GeorgianaElena the test strategies for JupyterHub v3.1.1 are passing as expected. There needs to be a fix for the SQLAlchemy compatibility issue for the other JupyterHub versions. I don't know whether I should focus on working on the compatibility issue: #478 or wait for this PR to be merged regardless so we can continue with testing the plugin.

@minrk
Copy link
Member

minrk commented Feb 24, 2023

@Sheila-nk for sqlalchemy, you should be able to add slqalchemy==1.* to your test environment requirements.

@Sheila-nk
Copy link
Contributor Author

@Sheila-nk for sqlalchemy, you should be able to add slqalchemy==1.* to your test environment requirements.

This worked. Thank you!

@Sheila-nk
Copy link
Contributor Author

@minrk with restricting sqlalchemy to v1 in dev-requirements.txt, is that a complete solution to the compatibility issue, or is there more to be done?

@GeorgianaElena
Copy link
Member

@Sheila-nk, I'd advocate not pinning sqlalchemy in dev-requirements in this PR.

I believe what @minrk suggested is to do experiment with thi pinning in #476 while integrating the pytest plugin to make sure it works. @minrk, can you please provide more details about this one?

@Sheila-nk, if you drop the commit pinning sqlalchemy, I'll be comfortable merging this PR. Additionally, I believe discussions about pinning or not pinning sqlalchemy to fix the tests, should happen in #478 for a more persistent context.

@GeorgianaElena GeorgianaElena merged commit 65e9a23 into jupyterhub:main Feb 27, 2023
@Sheila-nk Sheila-nk deleted the test-strategy branch February 28, 2023 09:53
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