public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: "Frank Ch. Eigler" <fche@redhat.com>
Cc: brobecker@adacore.com, gdb@sourceware.org, gcc@gcc.gnu.org
Subject: Re: adacore git-hooks - daemon-mode email vs. systemd-logind linger
Date: Fri, 19 Apr 2024 12:11:26 -0700	[thread overview]
Message-ID: <ZiLB3vdvmh9/nJmd@adacore.com> (raw)
In-Reply-To: <20240416105622.GD1423@redhat.com>

Hi Frank,

> - just send the emails immediately, without the daemon stuff; if the
>   delays are there to try to sequentialize them, consider instead
>   getting the hooks to emit Message-Id:/In-Reply-To:/Date: headers to
>   let MUA's sort properly at reception

We can certainly add a non-daemon mode to the hooks. I don't know
when I'd have time to work on this enhancement, unfortunately.

> - invoke the email sending wrapped in a "systemd-run --user"
>   deferred execution gadget, including a "sleep XXX" if you must
>   keep time-hope-based sequencing
> 
> - move email stuff entirely out of the hooks; these repos are "public
>   property" anyhow, and we can put cron jobs in place elsewhere to
>   trigger email notifications about commits; heck, they could run the
>   hook code itself later, just feed it retrospective git-hook lines

You can configure the hooks to turn emailing off completely. From
memory, this triggers a warning message on the user end when they do
the push, just to let them know to not expect emails.

The downside of going this way, other than the minor annoyance above,
is that you lose track of who did the push. Right now, the emails
allows you to derive the information from the emails' from field.

Thinking more long term, I think there are talks about using a more
comprehensive system for source and contribution management, similar
to products such as GitLab or GitHub. Those will likely come with
they own set of tooling for things such as alerting, pre-commit
checks, keeping track of who submitted, who reviewed and approved,
and who pushed. That's why I tend to think that, for the moment,
I'd go the simplest route overall: In this case, I think the simplest
is to just have a way to disable the daemon mode, and just have
the users wait. In the vast majority of cases, the wait will be
a few seconds. Even with a patch-series of a 100 patches, it would
mean a 1min40s wait. Very bearable.

If you agree, we can create an issue for it on the git-hooks repoisitory
on GitHub.

-- 
Joel

  reply	other threads:[~2024-04-19 19:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-16 10:56 Frank Ch. Eigler
2024-04-19 19:11 ` Joel Brobecker [this message]
2024-04-19 19:28   ` Frank Ch. Eigler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZiLB3vdvmh9/nJmd@adacore.com \
    --to=brobecker@adacore.com \
    --cc=fche@redhat.com \
    --cc=gcc@gcc.gnu.org \
    --cc=gdb@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).