Bug 223525

Summary: EWS is not able to process patches containing non-utf characters
Product: WebKit Reporter: Aakash Jain <aakash_jain>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, cgambrell, ryanhaddad, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=223522
https://bugs.webkit.org/show_bug.cgi?id=222618
https://bugs.webkit.org/show_bug.cgi?id=225118
https://bugs.webkit.org/show_bug.cgi?id=229866

Description Aakash Jain 2021-03-19 10:44:44 PDT
EWS django app is not able to send attachment 423743 [details] (on Bug 223522) to buildbot.
Comment 1 Aakash Jain 2021-03-19 11:21:29 PDT
Relevant logs from ews-app.

using 'pb' connect method
Unhandled Error
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/twisted/internet/base.py", line 999, in runUntilCurrent
    call.func(*call.args, **call.kw)
  File "/usr/local/lib/python3.6/site-packages/buildbot/util/eventual.py", line 48, in _turn
    cb(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/twisted/internet/defer.py", line 477, in callback
    self._startRunCallbacks(result)
  File "/usr/local/lib/python3.6/site-packages/twisted/internet/defer.py", line 580, in _startRunCallbacks
    self._runCallbacks()
--- <exception caught here> ---
  File "/usr/local/lib/python3.6/site-packages/twisted/internet/defer.py", line 662, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File "/usr/local/lib/python3.6/site-packages/buildbot/clients/tryclient.py", line 937, in trapSystemExit
    why.trap(SystemExit)
  File "/usr/local/lib/python3.6/site-packages/twisted/python/failure.py", line 450, in trap
    self.raiseException()
  File "/usr/local/lib/python3.6/site-packages/twisted/python/failure.py", line 475, in raiseException
    raise self.value.with_traceback(self.tb)
  File "/usr/local/lib/python3.6/site-packages/twisted/internet/defer.py", line 662, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
  File "/usr/local/lib/python3.6/site-packages/buildbot/clients/tryclient.py", line 917, in <lambda>
    d.addCallback(lambda res: self.createJob())
  File "/usr/local/lib/python3.6/site-packages/buildbot/clients/tryclient.py", line 582, in createJob
    diff = f.read()
  File "/usr/lib64/python3.6/codecs.py", line 321, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
builtins.UnicodeDecodeError: 'utf-8' codec can't decode byte 0xcf in position 3764: invalid continuation byte
Comment 2 Aakash Jain 2021-03-19 14:32:51 PDT
That patch contains non utf-8 characters. That character is at https://github.com/WebKit/WebKit/blob/main/LayoutTests/http/tests/workers/text-encoding.html#L51

Seems like a Buildbot bug, filed: https://github.com/buildbot/buildbot/issues/5933
Comment 3 Radar WebKit Bug Importer 2021-03-26 10:45:14 PDT
<rdar://problem/75892243>
Comment 4 Aakash Jain 2021-05-01 07:39:44 PDT
Fix for https://github.com/buildbot/buildbot/issues/5933 has been posted in https://github.com/buildbot/buildbot/pull/6001. The fix is applied to ews-build.webkit.org and seems to be working fine.
Comment 5 Aakash Jain 2021-05-01 07:43:28 PDT
Verified on Patch 427184 on bug 225118, which was failing earlier. EWS is now able to process it.