Bug 223686 - git-webkit find doesn't work well with unicode characters in author name
Summary: git-webkit find doesn't work well with unicode characters in author name
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jonathan Bedard
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-03-24 04:08 PDT by Aakash Jain
Modified: 2021-04-09 14:56 PDT (History)
6 users (show)

See Also:


Attachments
Patch (1.61 KB, patch)
2021-04-07 07:50 PDT, Aakash Jain
no flags Details | Formatted Diff | Diff
[fast-cq] Follow-up Patch (1.46 KB, patch)
2021-04-07 11:05 PDT, Aakash Jain
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Aakash Jain 2021-03-24 04:08:51 PDT
git-webkit find doesn't work well with unicode characters in author name

https://build.webkit.org/#/builders/28/builds/566
python Tools/Scripts/git-webkit find r274645

Title: Nullptr crash in RenderStyle::shapeOutside()

Traceback (most recent call last):
  File "Tools/Scripts/git-webkit", line 49, in <module>
    subversion='https://svn.webkit.org/repository/webkit',
  File "/Volumes/Data/worker/ios-simulator-14-release-tests-wk2/build/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py", line 84, in main
    subversion=subversion,
  File "/Volumes/Data/worker/ios-simulator-14-release-tests-wk2/build/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/find.py", line 118, in main
    return Info.main(args, repository=repository, reference=args.argument[0], **kwargs)
  File "/Volumes/Data/worker/ios-simulator-14-release-tests-wk2/build/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/find.py", line 87, in main
    print(u'Author: {}'.format(commit.author))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 10: ordinal not in range(128)
Comment 1 Aakash Jain 2021-03-24 04:09:18 PDT
Author name which git-webkit couldn't handle properly was: Frédéric Wang
Comment 2 Aakash Jain 2021-03-24 04:11:42 PDT
Steps to reproduce (on python 2):

>>> u'Author: {}'.format('Fréd')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 2: ordinal not in range(128)
Comment 3 Jonathan Bedard 2021-03-25 14:26:37 PDT
I can't reproduce this problem on trunk:

python Tools/Scripts/git-webkit find r274645
Title: Nullptr crash in RenderStyle::shapeOutside()
Author: Frédéric Wang <fred.wang@free.fr>
Date: Thu Mar 18 07:44:01 2021
Revision: 274645
Identifier: 235470@trunk

The issue is that there aren't any commits in the last week that could have fixed this problem
Comment 4 Radar WebKit Bug Importer 2021-03-31 04:09:12 PDT
<rdar://problem/76047116>
Comment 6 Aakash Jain 2021-04-07 07:50:46 PDT
Created attachment 425391 [details]
Patch
Comment 7 Jonathan Bedard 2021-04-07 07:52:27 PDT
Confused by my inability to reproduce, but a ? Seems better than blowing up.
Comment 8 Alexey Proskuryakov 2021-04-07 09:39:34 PDT
Is there a plan for how to fix it for good, so that names are visible?
Comment 9 Aakash Jain 2021-04-07 10:13:55 PDT
(In reply to Jonathan Bedard from comment #7)
> Confused by my inability to reproduce, but a ? Seems better than blowing up.
I am also unable to reproduce this. This works fine with the problematic commit on my local machine. I even tried on an ews machine which indicated this failure, and I wasn't able to reproduce.
Comment 10 Aakash Jain 2021-04-07 10:17:41 PDT
(In reply to Alexey Proskuryakov from comment #8)
> Is there a plan for how to fix it for good, so that names are visible?
This issue doesn't happen on Python 3. Also, we are not able to reproduce, so seems like some corner case which fails only in buildbot (and in buildbot we anyways hide this build-step, and only show the commit-identifier). 

So, people aren't likely to hit this problem on their machines. Automation doesn't show the author name anyways. We can prioritize the real fix if we notice this problem anywhere else, where it has any visible impact.
Comment 11 EWS 2021-04-07 10:26:09 PDT
Committed r275612 (236257@main): <https://commits.webkit.org/236257@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 425391 [details].
Comment 12 Alexey Proskuryakov 2021-04-07 10:48:47 PDT
If no one is going to see this, it's better to say something like "cannot print the name, please file a bug if seeing this locally", not just "?".
Comment 13 Aakash Jain 2021-04-07 11:03:29 PDT
Reopening to attach another patch.
Comment 14 Aakash Jain 2021-04-07 11:05:48 PDT
Created attachment 425420 [details]
[fast-cq] Follow-up Patch
Comment 15 EWS 2021-04-09 14:56:14 PDT
Committed r275778 (236351@main): <https://commits.webkit.org/236351@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 425420 [details].