Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-11133

compare_branches.py could fail if the author of a commit contains non-ascii characters

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • Impala 4.1.0
    • Infrastructure
    • None
    • ghx-label-1

    Description

      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 non-ascii characters.

      ...
      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)
      

      One solution to resolving the issue is to surround 'author' with 'repr()'.

      Attachments

        Issue Links

          Activity

            People

              fangyurao Fang-Yu Rao
              fangyurao Fang-Yu Rao
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: