| Summary: | Error on git push while generating commit email | ||
|---|---|---|---|
| Product: | Infrastructure | Reporter: | Rémi Verschelde <rverschelde> |
| Component: | Others | Assignee: | Sysadmin Team <sysadmin-bugs> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Normal | CC: | mageia, sysadmin-bugs, tmb |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| URL: | ssh://git@git.mageia.org/ | ||
| Whiteboard: | |||
| Source RPM: | CVE: | ||
| Status comment: | |||
|
Description
Rémi Verschelde
2014-01-21 09:06:41 CET
Still valid on Cauldron. I still get it on Cauldron: [akien@cauldron desktop-common-data (master)]$ git push X11 forwarding request failed on channel 0 Counting objects: 29, done. Delta compression using up to 4 threads. Compressing objects: 100% (18/18), done. Writing objects: 100% (18/18), 2.70 KiB | 0 bytes/s, done. Total 18 (delta 10), reused 0 (delta 0) remote: Sending notification emails to: soft-commits@ml.mageia.org remote: *** Error while generating commit email remote: *** - mail sending aborted. remote: Traceback (most recent call last): remote: File "hooks/post-receive", line 277, in <module> remote: push.send_emails(mailer, body_filter=environment.filter_body) remote: File "/var/lib/git/.gitolite/hooks/common/git_multimail.py", line 2278, in send_emails remote: mailer.send(rev.generate_email(self, body_filter), rev.recipients) remote: File "/var/lib/git/.gitolite/hooks/common/git_multimail.py", line 1375, in send remote: p.stdin.writelines(lines) remote: File "/var/lib/git/.gitolite/hooks/common/git_multimail.py", line 683, in generate_email remote: for line in self.generate_email_header(): remote: File "/var/lib/git/.gitolite/hooks/common/git_multimail.py", line 740, in generate_email_header remote: for line in self.expand_header_lines(REVISION_HEADER_TEMPLATE): remote: File "/var/lib/git/.gitolite/hooks/common/git_multimail.py", line 638, in expand_header_lines remote: value = addr_header_encode(value, name) remote: File "/var/lib/git/.gitolite/hooks/common/git_multimail.py", line 352, in addr_header_encode remote: header_name=header_name remote: File "/usr/lib64/python2.7/email/header.py", line 179, in __init__ remote: self.append(s, charset, errors) remote: File "/usr/lib64/python2.7/email/header.py", line 263, in append remote: ustr = unicode(s, incodec, errors) remote: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1: ordinal not in range(128) To ssh://git@git.mageia.org/software/desktop/common-data 8f825d3..c500b58 master -> master @Colin: Any clue? CC:
(none) =>
mageia Oh sorry Rémi, I didn't notice this one earlier :( (or if I did, it slipped of my radar) I'm going to guess it's the "é" that is to blame. I'll see if I can work it out! commit 33a1d3569c351ab54d3664a1e60e3cfdb060d96e
Author: Colin Guthrié <colin@...>
Date: Sat Apr 26 12:57:08 2014 +0100
Setting a daté
Testing mga#12374
---
Commit Link:
http://gitweb.mageia.org/software/test/commit/?id=33a1d3569c351ab54d3664a1e60e3cfdb060d96e
Hmm, perhaps not then.... OK, so I did a test commit above. If I clone the test repo and do a git format-patch and look at the header of the patch file generated, I get: From 33a1d3569c351ab54d3664a1e60e3cfdb060d96e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Colin=20Guthri=C3=A9?= <colin@...> Date: Sat, 26 Apr 2014 12:57:08 +0100 Subject: [PATCH] =?UTF-8?q?Setting=20a=20dat=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If I take the commit you're referring to above and do a format-patch on it, I get the following header: From 44c19e7f189a708f1c777fe64bc519ab0ab8b2c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= <remi@...> Date: Tue, 21 Jan 2014 08:48:21 +0100 Subject: [PATCH] Fix references to YaST2 and use DrakX instead (mga#1823) Note the lack of the MIME-Version, Content-Type and Content-Transfer-Encoding headers. Not sure this is really to blame, but it's the only difference I can see that is obvious. Is your system locale (the one where you commit your changes) UTF-8? [colin@jimmy test (master)]$ echo $LC_COLLATE en_GB.UTF-8 My system locale is also UTF-8: [akien@cauldron ~]$ echo $LC_COLLATE fr_FR.UTF-8 [akien@cauldron ~]$ locale LANG=fr_FR.UTF-8 LC_CTYPE=fr_FR.UTF-8 LC_NUMERIC=fr_FR.UTF-8 LC_TIME=fr_FR.UTF-8 LC_COLLATE=fr_FR.UTF-8 LC_MONETARY=fr_FR.UTF-8 LC_MESSAGES=fr_FR.UTF-8 LC_PAPER=fr_FR.UTF-8 LC_NAME=fr_FR.UTF-8 LC_ADDRESS=fr_FR.UTF-8 LC_TELEPHONE=fr_FR.UTF-8 LC_MEASUREMENT=fr_FR.UTF-8 LC_IDENTIFICATION=fr_FR.UTF-8 LC_ALL= Weird. It's definitely choking on the é (C3 A9), but it's odd that it currently *thinks* it's in ascii mode when it should be decoding utf8... Can you post a trivial change to the test repo please (like mine above) just to make sure it happens there too? Cheers! commit d484071d1cf3bafc9a3efcc2108621bd427ba4de
Author: Remi Verschelde <remi@...>
Date: Sat Apr 26 14:28:08 2014 +0200
Testing mga#12374 too
---
Commit Link:
http://gitweb.mageia.org/software/test/commit/?id=d484071d1cf3bafc9a3efcc2108621bd427ba4de
I just did a test commit locally on the test repo, and the format-patch still lacks the MIME-Version, Content-Type and Content-Transfer-Encoding, so that might be a clue (especially the "transfer encoding" thing). I did a test commit to the test repo and could confirm that the issue is linked to the "é" in my name. The format-patch header is then: From d484071d1cf3bafc9a3efcc2108621bd427ba4de Mon Sep 17 00:00:00 2001 From: Remi Verschelde <remi@verschelde.fr> Date: Sat, 26 Apr 2014 14:28:08 +0200 Subject: [PATCH] Testing mga#12374 too Sure, I'll try again with the "é". Yes, the issue still happens in the test repo. OK, the transfer encoding thing and those extra headers is due to me putting an accented character in the actual commit message... With a "normal" commit message i don't get those headers either in my format-patch, so that's a red herring I think. I just tried again with a simpler push and it worked, but when using *your* name, it failed... I guess the difference is that the é was in the middle, not the end... some more experiments needed I think! commit 6fa4636d19c6c1a0e566149f1435e2d5805c3539
Author: Remi Verscheldé <colin@...>
Date: Sat Apr 26 13:38:39 2014 +0100
Setting a date 4 mga#12374
---
Commit Link:
http://gitweb.mageia.org/software/test/commit/?id=6fa4636d19c6c1a0e566149f1435e2d5805c3539
commit e7fdd7bc03683756a90cc65d53784996a0f812b9
Author: Remi Verscheldéx <colin@...>
Date: Sat Apr 26 13:39:20 2014 +0100
Setting a date 5 mga#12374
---
Commit Link:
http://gitweb.mageia.org/software/test/commit/?id=e7fdd7bc03683756a90cc65d53784996a0f812b9
commit b220123ff4b04ffc8ac15d68b24c743fc1fb0646
Author: Remi Verscheldé Foo <colin@...>
Date: Sat Apr 26 13:39:44 2014 +0100
Setting a date 6 mga#12374
---
Commit Link:
http://gitweb.mageia.org/software/test/commit/?id=b220123ff4b04ffc8ac15d68b24c743fc1fb0646
It seems that it fails when it's in the first word of the name.... i.e. in a surname it's fine, but until it encounters a space, it doesn't work... very odd. Seems like a python bug to me.... Gotta run... will try and look more later! OK, so tested local (mga4) vs live (mga1) and this seems fixed in newer python. I'm not sure it's worth trying to backport python fixes to mga1... I did look at a diff between the email code from current to mga1 but nothing obvious jumped out... I suspect it's probably related to the change to unicode strings by default in newer pythons... Anyway, now I know what the problem is, I can probably work around it... OK, I *think* I've fixed it but a real world test would be nice! It'll take a while to deploy via puppet, so please wait a couple hours before testing :) Feel free to close the bug if all seems well. @colin if you want to speed up puppet changes deployment, you can force it on affected servers with: puppetd --test CC:
(none) =>
tmb commit 9ad628c85575b9a1270b8e31a7d80a5bbdcae763
Author: Verscheldé Foo <colin@...>
Date: Sun Apr 27 20:04:10 2014 +0100
Setting a date 8 mga#12374
---
Commit Link:
http://gitweb.mageia.org/software/test/commit/?id=9ad628c85575b9a1270b8e31a7d80a5bbdcae763
Yeah have done that a few times, but puppet takes so damn long to run, it's almost always quicker to just manually deploy the changes... (albeit it's not a proper test). I was running out the door anyway, so couldn't even do that this time. Anyway, seems to have worked according to the previous notification :) Please reopen if this resurfaces (or the whack-a-mole nature of bugs means I've broken something else instead :D) Status:
NEW =>
RESOLVED commit 73ca7216d66bfceb67b04d7dc766acca4375dbc4
Author: Rémi Verschelde <remi@...>
Date: Sun Apr 27 23:50:13 2014 +0200
Tésting if bùg mga#12374 is indèêd fixed - Thanks Ãolin!
---
Commit Link:
http://gitweb.mageia.org/software/test/commit/?id=73ca7216d66bfceb67b04d7dc766acca4375dbc4
It works, many thanks! |