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

Fix the confusing server errors during UI tests #1871

Merged
merged 12 commits into from
Jun 20, 2024

Conversation

brichet
Copy link
Contributor

@brichet brichet commented Mar 26, 2024

This PR addresses #1816.

It suppresses server error messages during user interface tests, which suggest that the test is not passing, and make the stdout output difficult to analyze.

Copy link
Contributor

Binder 👈 Launch a Binder on branch brichet/nbgrader/clean_ui-tests

@brichet brichet changed the title Fix the server errors when renaming directory or removing config file Fix the confusing server errors during UI tests Mar 26, 2024
@brichet brichet marked this pull request as ready for review March 27, 2024 12:33
@trevorcampbell
Copy link
Contributor

Amazing -- thanks @brichet ! This is already a major improvement.

Just looking quickly at the uitest ubuntu 22.04 python 3.10 nbextensions under Run Playwright Tests, I still see quite a few 404s that clutter the logs, as well as still one or two remaining tracebacks (e.g. below). Not sure if it's worth hunting those down too?

[WebServer] [C 2024-03-27 11:26:04.988 ServerApp] Assignment ps.01 not submitted. There are missing notebooks for the submission:
    Expected:
    	problem 1.ipynb: MISSING
    Submitted:
    	my problem 1.ipynb: EXTRA
[WebServer] [E 2024-03-27 11:26:04.989 ServerApp] Traceback (most recent call last):
      File "/home/runner/work/nbgrader/nbgrader/nbgrader/server_extensions/assignment_list/handlers.py", line 269, in submit_assignment
        submit.start()
      File "/home/runner/work/nbgrader/nbgrader/nbgrader/exchange/default/exchange.py", line 135, in start
        return super(Exchange, self).start()
      File "/home/runner/work/nbgrader/nbgrader/nbgrader/exchange/abc/exchange.py", line 84, in start
        self.copy_files()
      File "/home/runner/work/nbgrader/nbgrader/nbgrader/exchange/default/submit.py", line 135, in copy_files
        self.check_filename_diff()
      File "/home/runner/work/nbgrader/nbgrader/nbgrader/exchange/default/submit.py", line 110, in check_filename_diff
        self.fail(
      File "/home/runner/work/nbgrader/nbgrader/nbgrader/exchange/abc/exchange.py", line 58, in fail
        raise ExchangeError(msg)
    nbgrader.exchange.abc.exchange.ExchangeError: Assignment ps.01 not submitted. There are missing notebooks for the submission:
    Expected:
    	problem 1.ipynb: MISSING
    Submitted:
    	my problem 1.ipynb: EXTRA
    
[WebServer] [W 2024-03-27 11:26:05.150 ServerApp] delete /nbgrader-assignment-list-test/ps.01/my problem 1.ipynb

@brichet
Copy link
Contributor Author

brichet commented Mar 27, 2024

Yes, some traceback are expected (test with missing file or directory).

@brichet brichet force-pushed the clean_ui-tests branch 2 times, most recently from d2b9299 to 5cb7ebc Compare June 19, 2024 12:22
@brichet brichet merged commit 6bfd5a4 into jupyter:main Jun 20, 2024
24 checks passed
@brichet brichet deleted the clean_ui-tests branch June 20, 2024 13:51
AlirezaT99 pushed a commit to AaltoSciComp/nbgrader that referenced this pull request Aug 6, 2024
* Fix the server errors when renaming directory or removing config file

* Clean unexpected error in assignment_list test

* Should remove file exists error in create assignment and validate assignments

* Try to fix windows test

* Remove kernel errors in create assignment ui test, and use galata helpers

* Remove kernel errors in validate assignment ui test, and use galata helpers

* Fix save notebook when testing  notebook application

* Set the env variable in package.json instead of task.py, to simplify local tests

* Fix notebook tests

* Increase the doc test timeout

* (1)move config creation in beforeEach, (2)fix closing notebook in jupyterlab tests and (3) remove useless notebook saving

* Should remove some more traceback by (1) waiting for a notebook to be ready and (2) killing the kernels on teardown
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.

2 participants