Closed Bug 1821190 Opened 2 years ago Closed 2 years ago

wpt tasks often print out `KeyError...` messages, these are getting treated as errors from a task and shouldn't

Categories

(Testing :: web-platform-tests, task)

Default
task

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1821194

People

(Reporter: jmaher, Unassigned)

References

(Blocks 1 open bug)

Details

(Keywords: good-first-bug)

an example:

[task 2023-03-08T22:03:03.890Z] 22:03:03  WARNING - wptserve Exception loading https://web-platform.test:8443/permissions-policy/resources/permissions-policy-allowedfeatures.html?pipe=sub|header(Permissions-Policy,%20fullscreen=();): ';)'
[task 2023-03-08T22:03:03.890Z] 22:03:03     INFO - wptserve ';)'
[task 2023-03-08T22:03:03.890Z] 22:03:03     INFO - Traceback (most recent call last):
[task 2023-03-08T22:03:03.890Z] 22:03:03     INFO -   File "/builds/worker/workspace/build/tests/web-platform/tests/tools/wptserve/wptserve/server.py", line 289, in finish_handling
[task 2023-03-08T22:03:03.890Z] 22:03:03     INFO -     handler(request, response)
[task 2023-03-08T22:03:03.890Z] 22:03:03     INFO -   File "/builds/worker/workspace/build/tests/web-platform/tests/tools/wptserve/wptserve/handlers.py", line 228, in __call__
[task 2023-03-08T22:03:03.890Z] 22:03:03     INFO -     response = wrap_pipeline(path, request, response)
[task 2023-03-08T22:03:03.890Z] 22:03:03     INFO -   File "/builds/worker/workspace/build/tests/web-platform/tests/tools/wptserve/wptserve/handlers.py", line 164, in wrap_pipeline
[task 2023-03-08T22:03:03.890Z] 22:03:03     INFO -     response = Pipeline(pipe_string)(request, response)
[task 2023-03-08T22:03:03.890Z] 22:03:03     INFO -   File "/builds/worker/workspace/build/tests/web-platform/tests/tools/wptserve/wptserve/pipes.py", line 27, in __init__
[task 2023-03-08T22:03:03.890Z] 22:03:03     INFO -     self.pipe_functions = self.parse(pipe_string)
[task 2023-03-08T22:03:03.890Z] 22:03:03     INFO -   File "/builds/worker/workspace/build/tests/web-platform/tests/tools/wptserve/wptserve/pipes.py", line 35, in parse
[task 2023-03-08T22:03:03.890Z] 22:03:03     INFO -     functions.append((self.pipes[item[1]], []))
[task 2023-03-08T22:03:03.890Z] 22:03:03     INFO - KeyError: ';)'

the parser is picking up on text Error, this is output here:

            try:
                handler(request, response)
            except HTTPException as e:
                if 500 <= e.code < 600:
                    self.logger.warning("HTTPException in handler: %s" % e)
                    self.logger.warning(traceback.format_exc())
                response.set_error(e.code, str(e))
            except Exception as e:
                self.respond_with_error(response, e)

I would recommend adding:

          except KeyError as e:
              self.logger.warning("invalid key in handler: %s" % e)
              response.set_error(e.code, str(e))

to test this, run:
./mach try fuzzy -q 'test-linux web-platform' permissions-policy/resources

getting fixed in bug 1821194

Status: NEW → RESOLVED
Closed: 2 years ago
Duplicate of bug: 1821194
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.