On November 6, 2020 8:45:55 PM GMT+01:00, Jakub Jelinek via Gcc
<[email protected]> wrote:
>On Tue, Nov 03, 2020 at 06:26:58PM +0000, Joseph Myers wrote:
>> On Mon, 2 Nov 2020, Jakub Jelinek via Gcc wrote:
>>
>> > It isn't that easy (because update_version_git checks the gcc trunk
>and
>> > so I had to insert a sh invocation in which I've tweaked it), but
>it worked,
>> > thanks. But something is really wrong with the hooks, as the
>gcc-cvs mail
>> > for the trunk daily bump wasn't sent again (r10, r9 and r8 changes
>did).
>>
>> I think any issue with an email not sent to gcc-cvs should be raised
>with
>> overseers or postmaster; they'll need to check logs at the exact time
>to
>> see if the email was ever submitted by the hooks to the MTA (and at
>least
>> part of the mail sending from the hooks is I think asynchronous so
>any
>> issues might not be reported back to the git commit command). If it
>was
>> submitted to the MTA, the problem is with the MTA or mailman. If it
>was
>> not submitted to the MTA, Joel might be able to advise on how to
>> instrument the process of email sending from the hooks to see where
>it
>> went wrong.
>
>As I didn't hear from overseers yet and we've seen again multiple
>missing
>mails, after discussion with Martin Liska we've applied following hack
>to log the mail addresses and mail subjects that are being passed to
>sendmail.postfix, and a short while ago we got another case of missing
>mail.
>And it didn't show up in the log file either:
>[email protected] [gcc r11-4793] core: Rename DECL_IS_BUILTIN ->
>DECL_IS_UNDECLARED_BUILTIN
>[email protected] [gcc r11-4794] Add PC as control register
>[email protected] [gcc r11-4795] Combine new calculated ranges with
>existing range.
>[email protected] [gcc r11-4796] rework PRE PHI translation cache
>[email protected] [gcc r11-4798] c++: Propagate attributes to clones
>in duplicate_decls [PR67453]
>As you can see, the r11-4797 commit is missing from that list and
>didn't
>make gcc-cvs either.
>But git log certainly shows that commit in between:
>commit 556ab5125912fa2233986eb19d6cd995cf7de1d2
>Author: Iain Sandoe <[email protected]>
>Date: Fri Jul 31 21:05:28 2020 +0100
>
> Darwin: Darwin 20 is to be macOS 11 (Big Sur).
>So, I'm afraid it must fail or bypass this code path somewhere earlier
>in the hooks.
Is that maybe already known to the repo when it is on some rebased user branch?
Richard.
>diff --git a/hooks/post_receive.py b/hooks/post_receive.py
>index 3761c00..f368559 100644
>--- a/hooks/post_receive.py
>+++ b/hooks/post_receive.py
>@@ -16,7 +16,7 @@ from init import init_all_globals
> from updates.emails import EmailQueue
> from updates.factory import new_update
> from utils import debug, warn
>-
>+import traceback
>
>def post_receive_one(ref_name, old_rev, new_rev, refs,
>submitter_email):
> """post-receive treatment for one reference.
>@@ -44,8 +44,12 @@ def post_receive_one(ref_name, old_rev, new_rev,
>refs, submitter_email):
> " old_rev = %s" % old_rev,
> " new_rev = %s" % new_rev)
> return
>- update.send_email_notifications()
>-
>+ try:
>+ update.send_email_notifications()
>+ except Exception as e:
>+ with open("/tmp/gcc-git-mail.log", "a") as f:
>+ f.write(str(e) + '\n')
>+ f.write(traceback.format_exc() + '\n')
>
> def post_receive(updated_refs, submitter_email):
> """Implement the post-receive hook for all given updated_refs.
>diff --git a/hooks/updates/emails.py b/hooks/updates/emails.py
>index 706124c..81f4beb 100644
>--- a/hooks/updates/emails.py
>+++ b/hooks/updates/emails.py
>@@ -272,6 +272,9 @@ class Email(object):
> else: # pragma: no cover (do not want real emails during testing)
> sendmail(self.email_info.email_from, email_recipients,
> e_msg.as_string(), 'localhost')
>+ with open("/tmp/gcc-git-mail.log", "a") as f:
>+ f.write(e_msg['To'] + ' ' + e_msg['Subject'] + '\n')
>+ f.close()
>
> if self.filer_cmd is not None:
> self.__call_filer_cmd()
>
> Jakub