Loosening the commit limit for work branches

Ben Cooksley bcooksley at kde.org
Thu Aug 25 10:39:13 BST 2022


On Thu, Aug 25, 2022 at 7:13 AM David Hurka <david.hurka at mailbox.org> wrote:

> On Wednesday, August 24, 2022 8:11:14 PM CEST Ben Cooksley wrote:
> > The limitation is aligned with the maximum number of new commits you are
> > allowed to introduce to a standard branch.
> > We have those limits because the commit hooks carry out processing on a
> per
> > commit basis for all new commits introduced to standard branches - and
> are
> > there to protect all the other systems downstream from Gitlab.
>
> Do I understand it correctly like this?
>
> Standard branches have a merge hook.
> The merge hook runs when commits are added to the branch.
> (It is assumed that standard branches are not force pushed.)
> The merge hook runs for every individual commit.
> There is a limit that only 100 commits can be added at once,
> to prevent system overloads caused by many merge hooks being ran at once.
>

It is a little simpler than that.

For any push to a repository hosted on invent.kde.org, a Git hook known as
"pre-receive" is invoked by Git on the server.
This hook is provided by Gitlab itself and first carries out a number of
checks needed for Gitlab itself to operate before it then invokes
our pre-receive hook.

Our pre-receive hook as part of it's setup determines whether it is on a
mainline or personal repository and what in the repository is being
modified (release branch, work branch, tag, etc).
It checks the content of the push (an operation which is very streamlined)
and then if necessary carries out the appropriate notification of our other
systems.

The systems themselves can handle the load fine, however the humans in the
spaces they communicate to cannot as:
a) Bugzilla receives an email for every single mention of BUG /
CCBUG within every new commit (which notifies every person CCed on those
bugs in turn)
b) An email is sent to kde-commits at kde.org for every new commit, which
floods the list with excessive traffic
c) A notification is sent to what used to be #kde-commits and #commits on
Libera for each new commit (as well as some other channels for certain
repositories) so those respective IRC/Matrix channels get flooded and
rendered unusable by our announce bots.

Further, as some email providers impose limits on the number of emails
people can receive in short succession this can block delivery of email to
people at certain providers (which affects all KDE.org mailing lists, as
well as their personal KDE.org/KDEMail.net alias traffic). This essentially
denies these people the ability to participate in the community for a
period of time.

Our hook can be found at
https://invent.kde.org/sysadmin/repo-management/-/blob/master/hooks/invent.pre-receive
for those curious as to what it does.

Regards,
Ben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-devel/attachments/20220825/c2f83014/attachment.htm>


More information about the kde-devel mailing list