nbgrader icon indicating copy to clipboard operation
nbgrader copied to clipboard

Fix the confusing server errors during UI tests

Open brichet opened this issue 1 year ago • 3 comments

This PR addresses https://github.com/jupyter/nbgrader/issues/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.

brichet avatar Mar 26 '24 09:03 brichet

Binder :point_left: Launch a Binder on branch brichet/nbgrader/clean_ui-tests

github-actions[bot] avatar Mar 26 '24 09:03 github-actions[bot]

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

trevorcampbell avatar Mar 27 '24 16:03 trevorcampbell

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

brichet avatar Mar 27 '24 16:03 brichet