Re: git: 6c93a2d0bc37 - main - [skip ci] improvements to cap_sysctl.3

From: Alan Somers <asomers_at_freebsd.org>
Date: Thu, 08 Dec 2022 23:50:39 UTC
On Thu, Dec 8, 2022 at 4:36 PM Cy Schubert <Cy.Schubert@cschubert.com> wrote:
>
> In message <CAOtMX2go6qsxxBr-WwRB0Vz-xpNt_pb0XPsWyQo36x23NFeOMg@mail.gmail.c
> om>
> , Alan Somers writes:
> > On Thu, Dec 8, 2022 at 4:08 PM Cy Schubert <Cy.Schubert@cschubert.com> wrote:
> > >
> > > In message <CAOtMX2j42-HOCzigiOLeo=ptM+XZwTgh-RSEL8oSj5tZ5N7nVg@mail.gmail.
> > c
> > > om>
> > > , Alan Somers writes:
> > > > On Thu, Dec 8, 2022 at 3:22 PM Cy Schubert <Cy.Schubert@cschubert.com> wr
> > ote:
> > > > >
> > > > > In message <CAOtMX2i0=cdjJ6ft2oe9s2EV1soiO=kO1dNofDrMdOh=SK-5Cg@mail.gm
> > ail.
> > > > c
> > > > > om>
> > > > > , Alan Somers writes:
> > > > > > On Thu, Dec 8, 2022 at 2:59 PM Emmanuel Vadot <manu@bidouilliste.com>
> >  wro
> > > > te:
> > > > > > >
> > > > > > > On Thu, 8 Dec 2022 14:28:34 -0700
> > > > > > > Alan Somers <asomers@freebsd.org> wrote:
> > > > > > >
> > > > > > > > On Thu, Dec 8, 2022 at 2:15 PM Emmanuel Vadot <manu@bidouilliste.
> > com>
> > > >  wro
> > > > > > te:
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >  Hi Alan,
> > > > > > > > >
> > > > > > > > > On Thu, 8 Dec 2022 19:46:01 GMT
> > > > > > > > > Alan Somers <asomers@FreeBSD.org> wrote:
> > > > > > > > >
> > > > > > > > > > The branch main has been updated by asomers:
> > > > > > > > > >
> > > > > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=6c93a2d0bc37f0c9
> > 12e4
> > > > 02f3
> > > > > > f94c3c01350dca26
> > > > > > > > > >
> > > > > > > > > > commit 6c93a2d0bc37f0c912e402f3f94c3c01350dca26
> > > > > > > > > > Author:     Alan Somers <asomers@FreeBSD.org>
> > > > > > > > > > AuthorDate: 2022-12-01 16:49:57 +0000
> > > > > > > > > > Commit:     Alan Somers <asomers@FreeBSD.org>
> > > > > > > > > > CommitDate: 2022-12-08 19:45:47 +0000
> > > > > > > > > >
> > > > > > > > > >     [skip ci] improvements to cap_sysctl.3
> > > > > > > > >
> > > > > > > > >  You keep doing commit with this [skip ci] prefix, what is it f
> > or ?
> > > > > > > > >  AFAIK the official FreeBSD CI doesn't support this and I find
> > that
> > > > > > > > > really ugly to have this in the commit subject.
> > > > > > > > >  Mind sharing more on why you add this ?
> > > > > > > > >
> > > > > > > > >  Cheers,
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > > Emmanuel Vadot <manu@bidouilliste.com> <manu@FreeBSD.org>
> > > > > > > >
> > > > > > > > It tells CI systems not to run any tests on this commit.  Both Ci
> > rrus
> > > > > > > > and Jenkins understand it, among others.  For example, if you bro
> > wse
> > > > > > > > to https://github.com/freebsd/freebsd-src/commits/main and hover
> > over
> > > > > > > > the green checkmark next to this commit, you'll see a bunch of
> > > > > > > > "skipped" symbols.  So I use it just to save resources.  I think
> > I
> > > > > > > > could put it on a separate line, though.
> > > > > > > > -Alan
> > > > > > >
> > > > > > >  Mhm ok, I find that very ugly, couldn't we add some git push optio
> > ns
> > > > > > > instead ? We use gitlab at current work and we use a lot of those p
> > ush
> > > > > > > options, this avoid having ugly commit subject.
> > > > > >
> > > > > >
> > > > > > How?  What is a "git push option"?
> > > > > >
> > > > >
> > > > >        -o <option>, --push-option=<option>
> > > > >            Transmit the given string to the server, which passes them t
> > o th
> > > > e
> > > > >            pre-receive as well as the post-receive hook. The given stri
> > ng
> > > > > must
> > > > >            not contain a NUL or LF character. When multiple
> > > > >            --push-option=<option> are given, they are all sent to the o
> > ther
> > > > >            side in the order listed on the command line. When no
> > > > >            --push-option=<option> is given from the command line, the v
> > alue
> > > > s
> > > > >            of configuration variable push.pushOption are used instead.
> > > >
> > > > Any idea how to make that work with Cirrus?  I don't see anything
> > > > about it in their documentation.
> > >
> > > I may be talking through my hat here but I think this is something that
> > > needs to be implemented as a commit hook to affect our jenkins CI in some
> > > way.
> > >
> > > I also don't see how Github workflows has anything to do with our cgit +
> > > jenkins.
> >
> > Because in addition to Jenkins, we're also running Cirrus CI,
> > triggered by Github.
>
> I would think we'd need a post-push hook to:
>
> a) Cause jenkins to skip testing the commit, AND
>
> b) Add two blank lines plus the skip-checks line as per the GH documentation
>    prior to sending the replicated pushes to GH.

This part seems like the worst of all.  Altering the commit messages
before we push to GH still clutters up the commit messages, and would
also result in the commit messages on GH not matching those on our
private server.  Wouldn't that be worse?

>
> We could even introduce two such push options each affecting jenkins or GH,
> though I don't think this should be necessary. The nice thing of this is
> that one can put this in their .git/config for a period of time.
>
> Agreed that cluttering commit log subject lines or even messages with GH
> "commands" will make it more difficult for people weeks, months, or years
> down the road searching through the logs bisecting something or another.
>
> I agree with manu that there needs to be better way.