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

Python tests failing on CI #16222

Closed
jtpio opened this issue Apr 22, 2024 · 11 comments
Closed

Python tests failing on CI #16222

jtpio opened this issue Apr 22, 2024 · 11 comments
Labels
maintenance status:Needs Triage Applied to new issues that need triage

Comments

@jtpio
Copy link
Member

jtpio commented Apr 22, 2024

Looks like the Python tests started to fail on CI.

This was originally noticed after rebasing #16005.

But reproducible on the latest commit on the main branch: 8819549

Example run: https://github.com/jupyterlab/jupyterlab/actions/runs/8773764108/job/24110994049

image

=================================== FAILURES ===================================
_____________________ TestExtension.test_disable_extension _____________________
self = <jupyterlab.tests.test_jupyterlab.TestExtension testMethod=test_disable_extension>
    def test_disable_extension(self):
        options = AppOptions(app_dir=self.tempdir())
        assert install_extension(self.mock_extension, app_options=options) is True
        assert disable_extension(self.pkg_names["extension"], app_options=options) is True
        info = get_app_info(app_options=options)
        name = self.pkg_names["extension"]
>       assert info["disabled"].get(name) is True
E       AssertionError: assert None is True
E        +  where None = <built-in method get of dict object at 0x7fd4d91824c0>('@jupyterlab/mock-extension')
E        +    where <built-in method get of dict object at 0x7fd4d91824c0> = {}.get
jupyterlab/tests/test_jupyterlab.py:559: AssertionError
----------------------------- Captured stdout call -----------------------------
-�\�|�/�
_____________________ TestExtension.test_enable_extension ______________________
self = <jupyterlab.tests.test_jupyterlab.TestExtension testMethod=test_enable_extension>
    def test_enable_extension(self):
        options = AppOptions(app_dir=self.tempdir())
        assert install_extension(self.mock_extension, app_options=options) is True
>       assert disable_extension(self.pkg_names["extension"], app_options=options) is True
E       AssertionError: assert False is True
E        +  where False = disable_extension('@jupyterlab/mock-extension', app_options=<jupyterlab.commands.AppOptions object at 0x7fd4d8ba2360>)
jupyterlab/tests/test_jupyterlab.py:576: AssertionError
----------------------------- Captured stdout call -----------------------------
-�\�|�/�
=============================== warnings summary ===============================
../../../../../opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/pytest_jupyter/jupyter_server.py:17
  /opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/pytest_jupyter/jupyter_server.py:17: DeprecationWarning: Jupyter is migrating its paths to use standard platformdirs
  given by the platformdirs library.  To remove this warning and
  see the appropriate new directories, set the environment variable
  `JUPYTER_PLATFORM_DIRS=1` and then run `jupyter --paths`.
  The use of platformdirs will be the default in `jupyter_core` v6
    import jupyter_core.paths
../../../../../opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/_pytest/config/__init__.py:1439
  /opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/site-packages/_pytest/config/__init__.py:1439: PytestConfigWarning: Unknown config option: ignore
  
    self._warn_or_fail_if_strict(f"Unknown config option: {key}\n")
jupyterlab/tests/test_jupyterlab.py::TestExtension::test_install_and_uninstall_pinned_folder
jupyterlab/tests/test_jupyterlab.py::TestExtension::test_install_and_uninstall_pinned_folder
  /opt/hostedtoolcache/Python/3.12.3/x64/lib/python3.12/tarfile.py:2221: DeprecationWarning: Python 3.14 will, by default, filter extracted tar archives and reject files or modify their metadata. Use the filter argument to control this behavior.
    warnings.warn(
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
---- generated xml file: /home/runner/work/jupyterlab/jupyterlab/junit.xml -----
=========================== short test summary info ============================
FAILED jupyterlab/tests/test_jupyterlab.py::TestExtension::test_disable_extension - AssertionError: assert None is True
 +  where None = <built-in method get of dict object at 0x7fd4d91824c0>('@jupyterlab/mock-extension')
 +    where <built-in method get of dict object at 0x7fd4d91824c0> = {}.get
FAILED jupyterlab/tests/test_jupyterlab.py::TestExtension::test_enable_extension - AssertionError: assert False is True
 +  where False = disable_extension('@jupyterlab/mock-extension', app_options=<jupyterlab.commands.AppOptions object at 0x7fd4d8ba2360>)
============= 2 failed, 78 passed, 4 warnings in 538.88s (0:08:58) =============
@jupyterlab-probot jupyterlab-probot bot added the status:Needs Triage Applied to new issues that need triage label Apr 22, 2024
@jtpio
Copy link
Member Author

jtpio commented Apr 22, 2024

This is likely related to a new release of an upstream dependency, although not sure which one yet.

@krassowski
Copy link
Member

@krassowski
Copy link
Member

Can you confirm this by pinning?

@jtpio
Copy link
Member Author

jtpio commented Apr 22, 2024

Gonna try that in a draft PR.

Edit: #16223

@jtpio
Copy link
Member Author

jtpio commented Apr 22, 2024

That would likely be https://github.com/jupyterlab/jupyterlab_server/releases/tag/v2.27.0

Yes, pinning jupyterlab_server makes the CI checks pass on #16223 :

image

@krassowski
Copy link
Member

@divyansshhh what do you think?

@jtpio
Copy link
Member Author

jtpio commented Apr 22, 2024

According to the changelog this is the only PR released in 2.27.0: jupyterlab/jupyterlab_server#448

cc @divyansshhh as the author of the PR, who may also have an idea of what may be causing the issue.

@divyansshhh
Copy link
Contributor

Taking a look

@divyansshhh
Copy link
Contributor

The issue was due to moving the ENV_CONFIG_PATH import to the top of the file.

I'm raising another PR in jupyterlab_server to fix this.

@divyansshhh
Copy link
Contributor

Raised jupyterlab/jupyterlab_server#450

@jtpio
Copy link
Member Author

jtpio commented Apr 23, 2024

@jtpio jtpio closed this as completed Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance status:Needs Triage Applied to new issues that need triage
Projects
None yet
Development

No branches or pull requests

3 participants