Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-3268

apply-review.sh crashes with non ASCII char

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • None
    • reviewbot

    Description

      There is an issue in the apply-review script when user name field has some non ascii char. E.g.:

      Bad patch!

      Reviews applied: [37468]

      Failed command: ./support/apply-review.sh -n -r 37468

      Error:
      2015-08-14 04:22:30 URL:https://reviews.apache.org/r/37468/diff/raw/ [23334/23334] -> "37468.patch" [1]
      Traceback (most recent call last):
      File "./support/jsonurl.py", line 25, in <module>
      print data
      UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 3: ordinal not in range(128)
      Successfully applied: Removed allocation types to mesos::master namespace

      The allocation-related types was moved to mesos::master namespace.

      MESOS-2516

      Review: https://reviews.apache.org/r/37468
      fatal: empty ident name (for <guilherme.sft@gmail.com>) not allowed
      Failed to commit patch

      In this example, the problem was caused because the full name of the user has the "é" char. For simulate the problem you can run the following shell script:

      `AUTHOR_NAME=$(./support/jsonurl.py https://reviews.apache.org/api/users/jvanz/ user fullname)`

      (This is my user, I removed the non ascii char to send more patches)

      The problem is when the result of the python script is kept in the variable. If you call the python script without store the result in a variable everything works fine.

      Attachments

        Activity

          People

            gkleiman Gastón Kleiman
            jvanz José Guilherme Vanz
            Michael Park Michael Park
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: