Fang-Yu Rao created IMPALA-11133:
------------------------------------

             Summary: compare_branches.py could fail if the author of a commit 
contains non-unicode characters
                 Key: IMPALA-11133
                 URL: https://issues.apache.org/jira/browse/IMPALA-11133
             Project: IMPALA
          Issue Type: Bug
          Components: Infrastructure
            Reporter: Fang-Yu Rao
            Assignee: Fang-Yu Rao
             Fix For: Impala 4.1.0


We found that compare_branches.py could fail if the author of a commit contains 
non-unicode characters.

For instance, if we try to compare a branch '{{{}apache-ref-master{}}}' 
consisting of a recently committed patch [https://gerrit.cloudera.org/c/18215/] 
(IMPALA-11113 and IMPALA-11114: fixed single_node_perf_run.py for TPCDS) to an 
older branch '{{{}cdw-master-staging{}}}' by 
"{{{}$IMPALA_HOME/bin/compare_branches.py --source_remote_name="" 
--source_branch apache-ref-master --target_remote_name="" --target_branch 
cdw-master-staging{}}}", we will get the following error message. Because the 
author field, i.e., "Gergely Fürnstáhl", contains no-unicode characters.
{code:java}
...
Traceback (most recent call last):
  File "./bin/compare_branches.py", line 287, in <module>
    main()
  File "./bin/compare_branches.py", line 270, in main
    print u'{0} {1} ({2}) - {3}'.format(commit_hash, msg, date, author)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 9: ordinal 
not in range(128)
{code}
One solution to resolving the issue is to surround '{{{}author{}}}' with 
'{{{}repr(){}}}'.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to