wpt icon indicating copy to clipboard operation
wpt copied to clipboard

Taskcluster fails `wpt-decision-task` for some commits/PRs with markup in description or title

Open jonathan-j-lee opened this issue 5 months ago • 3 comments

For example:

  • https://github.com/web-platform-tests/wpt/commit/1d91c36a40b59a975a869f4d5749ff3004839dab (contains <script type=speculationrules>)
  • https://github.com/web-platform-tests/wpt/commit/978340f5361ac897deb74a619980fea749313f28 (also contains <script type=speculationrules>)
  • https://github.com/web-platform-tests/wpt/pull/53904 (contains <link>)

Log from sample failure:

INFO:root:SCHEDULED TASKS:
  lint
  sink-task
  wpt-chrome-dev-results
  wpt-chrome-dev-results-without-changes
  wpt-firefox-nightly-results
  wpt-firefox-nightly-results-without-changes
  wpt-firefox-nightly-stability
INFO:root:Scheduling sink-task
Traceback (most recent call last):
  File "/home/test/web-platform-tests/_venv3/lib/python3.10/site-packages/taskcluster/client.py", line 503, in _makeHttpRequest
    response.raise_for_status()
  File "/home/test/web-platform-tests/_venv3/lib/python3.10/site-packages/requests/models.py", line 1024, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 406 Client Error: Not Acceptable for url: http://taskcluster/api/queue/v1/task/NZ8PVJWdRw6DLp68WYxD7A

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/test/web-platform-tests/./wpt", line 10, in <module>
    wpt.main()
  File "/home/test/web-platform-tests/tools/wpt/wpt.py", line 233, in main
    rv = script(*args, **kwargs)
  File "/home/test/web-platform-tests/tools/ci/tc/decision.py", line 408, in run
    create_tasks(queue, task_id_map)
  File "/home/test/web-platform-tests/tools/ci/tc/decision.py", line 349, in create_tasks
    queue.createTask(task_id, task_data)
  File "/home/test/web-platform-tests/_venv3/lib/python3.10/site-packages/taskcluster/generated/queue.py", line 296, in createTask
    return self._makeApiCall(self.funcinfo["createTask"], *args, **kwargs)
  File "/home/test/web-platform-tests/_venv3/lib/python3.10/site-packages/taskcluster/client.py", line 269, in _makeApiCall
    response = self._makeHttpRequest(entry['method'], _route, payload)
  File "/home/test/web-platform-tests/_venv3/lib/python3.10/site-packages/taskcluster/client.py", line 538, in _makeHttpRequest
    raise exceptions.TaskclusterRestFailure(
taskcluster.exceptions.TaskclusterRestFailure: None
[taskcluster 2025-07-22 18:32:15.418Z] === Task Finished ===
[taskcluster 2025-07-22 18:32:15.892Z] Unsuccessful task run with exit code: 1 completed in 211.936 seconds
  • We were able to work around this in #53905 by scrubbing <script type=speculationrules> from the PR description (but not the commit message).
  • https://github.com/web-platform-tests/wpt/pull/53861 is a recently merged PR that includes <template patchfor> in its description, so it seems the issue only affects some (better-known?) tags.

Currently, my best guess of the root cause is that Taskcluster rejects PRs with descriptions containing potentially dangerous tags.

cc @jgraham for forwarding this issue to a Taskcluster PoC

jonathan-j-lee avatar Jul 23 '25 17:07 jonathan-j-lee

This happened again in https://github.com/web-platform-tests/wpt/pull/55121

jdm avatar Sep 30 '25 10:09 jdm

@jonathan-j-lee I see there have been some commits since you created this. Is this still relevant?

jcscottiii avatar Dec 09 '25 22:12 jcscottiii

AFAIK, this still occurs (as demonstrated by the linked PRs---they're not fixes).

jonathan-j-lee avatar Dec 09 '25 22:12 jonathan-j-lee