#7054 dist-git post-receive-alternativearch push hook tracebacks on non-utf-8
Closed: Fixed 5 years ago Opened 5 years ago by msimacek.

  • Describe what you need us to do:
    Fix utf-8 handling in post-receive-alternativearch. I don't know what it does, but it fails to do whatever it was supposed to do.
Counting objects: 10, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (10/10), done.
Writing objects: 100% (10/10), 4.48 KiB | 1.12 MiB/s, done.
Total 10 (delta 5), reused 0 (delta 0)
remote: Emitting a message to the fedmsg bus.
remote: * Publishing information for 2 commits
remote: Traceback (most recent call last):
remote:   File "/usr/share/git-core/post-receive-alternativearch", line 215, in <module>
remote:     run_as_post_receive_hook()
remote:   File "/usr/share/git-core/post-receive-alternativearch", line 182, in run_as_post_receive_hook
remote:     for line in read_git_lines(['show', commit], abspath):
remote:   File "/usr/share/git-core/post-receive-alternativearch", line 85, in read_git_lines
remote:     args, abspath, keepends=keepends, **kw
remote:   File "/usr/share/git-core/post-receive-alternativearch", line 76, in read_git_output
remote:     ['git'] + args, abspath, input=input, keepends=keepends, **kw)
remote:   File "/usr/share/git-core/post-receive-alternativearch", line 69, in read_output
remote:     return out.decode('utf-8')
remote:   File "/usr/lib64/python2.7/encodings/utf_8.py", line 16, in decode
remote:     return codecs.utf_8_decode(input, errors, True)
remote: UnicodeDecodeError: 'utf8' codec can't decode byte 0x84 in position 9586: invalid start byte
remote: Sending to redis to send commit notification emails
remote: * Publishing information for 2 commits
remote: 
remote: Create a pull-request for f28
remote:    https://src.fedoraproject.org/rpms/ant/diff/master..f28
remote: 
To ssh://pkgs.fedoraproject.org/rpms/ant
   2bf5978..04df4b7  f28 -> f28
  • When do you need this? (YYYY/MM/DD)
    I don't need it. Just reporting an error I saw.

  • When is this no longer needed or useful? (YYYY/MM/DD)
    Don't know

  • If we cannot complete your request, what is the impact?
    Don't know. Probably neglible impact.


Metadata Update from @mizdebsk:
- Issue tagged with: src.fp.o

5 years ago

@puiterwijk said he could fix this one up.

Metadata Update from @kevin:
- Issue assigned to puiterwijk
- Issue priority set to: Waiting on Assignee (was: Needs Review)

5 years ago

Fixed. We just ignore invalid bytes now, since this script is only used to detect some very specific lines in the patch, none of which should be parsed if it's unicode anyway.

Metadata Update from @puiterwijk:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

5 years ago

Login to comment on this ticket.

Metadata