You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Luca Toscano <to...@gmail.com> on 2020/02/08 11:01:29 UTC
Use of [skip ci] in commit messages to avoid Travis builds
Hi everybody,
Travis is able to read commit messages and skip the CI workflow if the
"[skip ci]" magic sequence is added somewhere. I keep forgetting about
it too, but it would be nice if we could start using it to avoid using
CI resources/workers when not needed (like docs changes, entries in
STATUS, etc..). I didn't find a way to instruct Travis to avoid
triggering a build if only certain file types are committed, so the
only solution for the moment is to manually add the aforementioned
sequence :(
It is not a big deal to trigger builds even for docs etc.., but the
ASF resources/workers are limited (and shared among projects IIUC) so
I am only suggesting to be good neighbors :) If this is totally insane
or unacceptable I'll back off and stop vouching for it I promise!
Luca
Re: Use of [skip ci] in commit messages to avoid Travis builds
Posted by Yehuda Katz <ye...@ymkatz.net>.
On Sat, Feb 8, 2020 at 6:01 AM Luca Toscano <to...@gmail.com> wrote:
> I didn't find a way to instruct Travis to avoid triggering a build if only
> certain file types are committed, so the only solution for the moment is to
> manually add the aforementioned sequence :(
>
For the record, this has been a really long-standing open issue with Travis:
https://github.com/travis-ci/travis-ci/issues/6301
- Y
AW: Use of [skip ci] in commit messages to avoid Travis builds
Posted by "Pluem, Ruediger, Vodafone Group" <ru...@vodafone.com>.
> -----Ursprüngliche Nachricht-----
> Von: Joe Orton <jo...@redhat.com>
> Gesendet: Dienstag, 11. Februar 2020 11:18
> An: dev@httpd.apache.org
> Betreff: Re: Use of [skip ci] in commit messages to avoid Travis builds
>
> On Mon, Feb 10, 2020 at 07:22:45AM -0500, Eric Covener wrote:
> > Is there anything possible in SVN like a pre-commit hook that can see
> > what changed and append [skip ci] unless some other incantantation is
> > present?
>
> Seems like a neat idea, I think that could work *if* infra actually
> allows us to do that. I can imagine they might not want to since the
> pre-commit hooks are global to the asf repos.
>
> An alternative I found would be to check the diff in the travis jobs and
> pass if there are non-docs changes:
>
> https://reflectoring.io/skip-ci-build/
>
> con: we'd probably still hit the transient failures at apt install
> level, though I we could/should also move that to before_script level
> anyway
>
> con: we'd have lots of "false" passes in the travis history, and having
> a pass even if the tree is genuinely broken by prior non-docs commits is
> bad.
>
> (... ideally the travis jobs could report "skip" rather than pass/fail
> but I can't see a way to do that either.)
>
> pro: we can easily control what to skip w/o needing infra
>
> pro: doesn't need asf-wide repos changes & doesn't modify commits
> (possibly fragile)
>
> Not sure about this. Maybe status quo is best and everyone should learn
> to use [skip ci] until travis implement filtering.
>
Given the above, especially the "false" passes I would tend to let everything
as is and see if an increased awareness on [skip ci] already helps.
Regards
Rüdiger
Re: Use of [skip ci] in commit messages to avoid Travis builds
Posted by Joe Orton <jo...@redhat.com>.
On Mon, Feb 10, 2020 at 07:22:45AM -0500, Eric Covener wrote:
> Is there anything possible in SVN like a pre-commit hook that can see
> what changed and append [skip ci] unless some other incantantation is
> present?
Seems like a neat idea, I think that could work *if* infra actually
allows us to do that. I can imagine they might not want to since the
pre-commit hooks are global to the asf repos.
An alternative I found would be to check the diff in the travis jobs and
pass if there are non-docs changes:
https://reflectoring.io/skip-ci-build/
con: we'd probably still hit the transient failures at apt install
level, though I we could/should also move that to before_script level
anyway
con: we'd have lots of "false" passes in the travis history, and having
a pass even if the tree is genuinely broken by prior non-docs commits is
bad.
(... ideally the travis jobs could report "skip" rather than pass/fail
but I can't see a way to do that either.)
pro: we can easily control what to skip w/o needing infra
pro: doesn't need asf-wide repos changes & doesn't modify commits
(possibly fragile)
Not sure about this. Maybe status quo is best and everyone should learn
to use [skip ci] until travis implement filtering.
Regards, Joe
Re: Use of [skip ci] in commit messages to avoid Travis builds
Posted by Luca Toscano <to...@gmail.com>.
Hi Mike,
TIL, both are in fact accepted:
https://docs.travis-ci.com/user/customizing-the-build#skipping-a-build
Luca
Il giorno lun 10 feb 2020 alle ore 17:32 Mike Rumph
<mr...@gmail.com> ha scritto:
>
> This thread mentions [skip ci] but the Travis issue mentions [ci skip] and [ci-skip].
> Are all of these forms recognized?
>
> On Mon, Feb 10, 2020 at 4:23 AM Eric Covener <co...@gmail.com> wrote:
>>
>> On Mon, Feb 10, 2020 at 1:44 AM Ruediger Pluem <rp...@apache.org> wrote:
>> >
>> >
>> >
>> > On 02/08/2020 12:01 PM, Luca Toscano wrote:
>> > > Hi everybody,
>> > >
>> > > Travis is able to read commit messages and skip the CI workflow if the
>> > > "[skip ci]" magic sequence is added somewhere. I keep forgetting about
>> > > it too, but it would be nice if we could start using it to avoid using
>> > > CI resources/workers when not needed (like docs changes, entries in
>> > > STATUS, etc..). I didn't find a way to instruct Travis to avoid
>> > > triggering a build if only certain file types are committed, so the
>> > > only solution for the moment is to manually add the aforementioned
>> > > sequence :(
>> > >
>> > > It is not a big deal to trigger builds even for docs etc.., but the
>> > > ASF resources/workers are limited (and shared among projects IIUC) so
>> > > I am only suggesting to be good neighbors :) If this is totally insane
>> > > or unacceptable I'll back off and stop vouching for it I promise!
>> > >
>> >
>> > Thanks for pointing this out, but I forget this as well in many cases :-).
>> > The only one here who seems to remember this always is IMHO Joe. Maybe
>> > he has some tips how we can get better here.
>> >
>> > Regards
>> >
>> > Rüdiger
>>
>> Is there anything possible in SVN like a pre-commit hook that can see
>> what changed and append [skip ci] unless some other incantantation is
>> present?
>>
>>
>> --
>> Eric Covener
>> covener@gmail.com
Re: Use of [skip ci] in commit messages to avoid Travis builds
Posted by Mike Rumph <mr...@gmail.com>.
This thread mentions [skip ci] but the Travis issue mentions [ci skip] and
[ci-skip].
Are all of these forms recognized?
On Mon, Feb 10, 2020 at 4:23 AM Eric Covener <co...@gmail.com> wrote:
> On Mon, Feb 10, 2020 at 1:44 AM Ruediger Pluem <rp...@apache.org> wrote:
> >
> >
> >
> > On 02/08/2020 12:01 PM, Luca Toscano wrote:
> > > Hi everybody,
> > >
> > > Travis is able to read commit messages and skip the CI workflow if the
> > > "[skip ci]" magic sequence is added somewhere. I keep forgetting about
> > > it too, but it would be nice if we could start using it to avoid using
> > > CI resources/workers when not needed (like docs changes, entries in
> > > STATUS, etc..). I didn't find a way to instruct Travis to avoid
> > > triggering a build if only certain file types are committed, so the
> > > only solution for the moment is to manually add the aforementioned
> > > sequence :(
> > >
> > > It is not a big deal to trigger builds even for docs etc.., but the
> > > ASF resources/workers are limited (and shared among projects IIUC) so
> > > I am only suggesting to be good neighbors :) If this is totally insane
> > > or unacceptable I'll back off and stop vouching for it I promise!
> > >
> >
> > Thanks for pointing this out, but I forget this as well in many cases
> :-).
> > The only one here who seems to remember this always is IMHO Joe. Maybe
> > he has some tips how we can get better here.
> >
> > Regards
> >
> > Rüdiger
>
> Is there anything possible in SVN like a pre-commit hook that can see
> what changed and append [skip ci] unless some other incantantation is
> present?
>
>
> --
> Eric Covener
> covener@gmail.com
>
Re: Use of [skip ci] in commit messages to avoid Travis builds
Posted by Eric Covener <co...@gmail.com>.
On Mon, Feb 10, 2020 at 1:44 AM Ruediger Pluem <rp...@apache.org> wrote:
>
>
>
> On 02/08/2020 12:01 PM, Luca Toscano wrote:
> > Hi everybody,
> >
> > Travis is able to read commit messages and skip the CI workflow if the
> > "[skip ci]" magic sequence is added somewhere. I keep forgetting about
> > it too, but it would be nice if we could start using it to avoid using
> > CI resources/workers when not needed (like docs changes, entries in
> > STATUS, etc..). I didn't find a way to instruct Travis to avoid
> > triggering a build if only certain file types are committed, so the
> > only solution for the moment is to manually add the aforementioned
> > sequence :(
> >
> > It is not a big deal to trigger builds even for docs etc.., but the
> > ASF resources/workers are limited (and shared among projects IIUC) so
> > I am only suggesting to be good neighbors :) If this is totally insane
> > or unacceptable I'll back off and stop vouching for it I promise!
> >
>
> Thanks for pointing this out, but I forget this as well in many cases :-).
> The only one here who seems to remember this always is IMHO Joe. Maybe
> he has some tips how we can get better here.
>
> Regards
>
> Rüdiger
Is there anything possible in SVN like a pre-commit hook that can see
what changed and append [skip ci] unless some other incantantation is
present?
--
Eric Covener
covener@gmail.com
Re: Use of [skip ci] in commit messages to avoid Travis builds
Posted by Ruediger Pluem <rp...@apache.org>.
On 02/08/2020 12:01 PM, Luca Toscano wrote:
> Hi everybody,
>
> Travis is able to read commit messages and skip the CI workflow if the
> "[skip ci]" magic sequence is added somewhere. I keep forgetting about
> it too, but it would be nice if we could start using it to avoid using
> CI resources/workers when not needed (like docs changes, entries in
> STATUS, etc..). I didn't find a way to instruct Travis to avoid
> triggering a build if only certain file types are committed, so the
> only solution for the moment is to manually add the aforementioned
> sequence :(
>
> It is not a big deal to trigger builds even for docs etc.., but the
> ASF resources/workers are limited (and shared among projects IIUC) so
> I am only suggesting to be good neighbors :) If this is totally insane
> or unacceptable I'll back off and stop vouching for it I promise!
>
Thanks for pointing this out, but I forget this as well in many cases :-).
The only one here who seems to remember this always is IMHO Joe. Maybe
he has some tips how we can get better here.
Regards
Rüdiger
Re: Use of [skip ci] in commit messages to avoid Travis builds
Posted by Luca Toscano <to...@gmail.com>.
Speaking of being good neighbors: just committed a change to a xml
file without [skip ci], so easy to miss :( I'll do my best to find
something to automate this..
Luca
Il giorno sab 8 feb 2020 alle ore 12:01 Luca Toscano
<to...@gmail.com> ha scritto:
>
> Hi everybody,
>
> Travis is able to read commit messages and skip the CI workflow if the
> "[skip ci]" magic sequence is added somewhere. I keep forgetting about
> it too, but it would be nice if we could start using it to avoid using
> CI resources/workers when not needed (like docs changes, entries in
> STATUS, etc..). I didn't find a way to instruct Travis to avoid
> triggering a build if only certain file types are committed, so the
> only solution for the moment is to manually add the aforementioned
> sequence :(
>
> It is not a big deal to trigger builds even for docs etc.., but the
> ASF resources/workers are limited (and shared among projects IIUC) so
> I am only suggesting to be good neighbors :) If this is totally insane
> or unacceptable I'll back off and stop vouching for it I promise!
>
> Luca
Re: Use of [skip ci] in commit messages to avoid Travis builds
Posted by Rainer Jung <ra...@kippdata.de>.
Am 23.03.2020 um 20:12 schrieb Ruediger Pluem:
>
>
> On 3/23/20 6:22 PM, Rainer Jung wrote:
>> Am 23.03.2020 um 16:56 schrieb Joe Orton:
>>> On Sat, Feb 08, 2020 at 12:01:29PM +0100, Luca Toscano wrote:
>>>> Hi everybody,
>>>>
>>>> Travis is able to read commit messages and skip the CI workflow if the
>>>> "[skip ci]" magic sequence is added somewhere. I keep forgetting about
>>>> it too, but it would be nice if we could start using it to avoid using
>>>> CI resources/workers when not needed (like docs changes, entries in
>>>> STATUS, etc..). I didn't find a way to instruct Travis to avoid
>>>> triggering a build if only certain file types are committed, so the
>>>> only solution for the moment is to manually add the aforementioned
>>>> sequence :(
>>>>
>>>> It is not a big deal to trigger builds even for docs etc.., but the
>>>> ASF resources/workers are limited (and shared among projects IIUC) so
>>>> I am only suggesting to be good neighbors :) If this is totally insane
>>>> or unacceptable I'll back off and stop vouching for it I promise!
>>>
>>> I found a new option here while playing with conditionals, we can skip
>>> an entire build based on the commit message, it appears -
>>>
>>> https://github.com/apache/httpd/pull/87/commits/7dd995c555ac0aea6cb3d58634750e2e076eb0cc
>>>
>>> so this could catch a lot of the quite pointless Travis runs for STATUS
>>> changes by filtering by commit message, something like...
>>>
>>> if: (branch != "2.4.x" and commit_message !~ /^[Tt]ransforms$/) or
>>> (branch = "2.4.x" and commit_message !~ /^([Pp]ropose|[Vv]ote|[Tt]ransforms)$/)
>>>
>>> anything else??
>>
>> Since I forgot the [skip ci] today, I too a little time to inspect svn log for STATUS and arrived at the following, probably not
>> maintainable regexp (perl notation) for 2.4.x:
>>
>> /^i?(\* ?)?([0-9] *)?([sS]ome +|[mM]ore +|[aA]dd( a)? +|[eE]asy +|[qQ]uick +|[sS]mall +|[uU]pdate( after)? +)?([bB]ackport(ed)?
>> +)?([pP]ropos(e|als?),?( *((and)?|\/|\+) *([vV]ote)?)?|[vV]otes?,?( *((and)?|\/|\+)
>> *([pP]ropos(e|als?)|[pP]romot(e|ion)s?|[cC]omments?))?|[pP]romot(e|ion)s?|[cC]omment|[nN]ote|[dD]one|[mM]erged|[cC]ommitted|[bB]ackport(ed)?)[\.:!]?(
>> *\[skip ci\])?$/
>
> I think the backport stuff should not be in the list as it is often used in backport commits which I want to see run afterwards
> through the tests for that branch.
Not sure how a multi-line commit message will be handled, ie. if the
caret and dollar anchors are applied to every line and what happens if
one line our of many matches.
The above pattern was meant to be applied to one-line commit messages
only or phrased differently it should match the whole commit message,
not only individual lines. In that case I would expect the backport part
of the pattern to be no problem. A real backport commit message should
also contain info like the revision number or the original commit
message and would thus not match.
But I don't know whether the assumption about multi-line commit message
matching is correct.
Regards,
Rainer
Re: Use of [skip ci] in commit messages to avoid Travis builds
Posted by Ruediger Pluem <rp...@apache.org>.
On 3/23/20 6:22 PM, Rainer Jung wrote:
> Am 23.03.2020 um 16:56 schrieb Joe Orton:
>> On Sat, Feb 08, 2020 at 12:01:29PM +0100, Luca Toscano wrote:
>>> Hi everybody,
>>>
>>> Travis is able to read commit messages and skip the CI workflow if the
>>> "[skip ci]" magic sequence is added somewhere. I keep forgetting about
>>> it too, but it would be nice if we could start using it to avoid using
>>> CI resources/workers when not needed (like docs changes, entries in
>>> STATUS, etc..). I didn't find a way to instruct Travis to avoid
>>> triggering a build if only certain file types are committed, so the
>>> only solution for the moment is to manually add the aforementioned
>>> sequence :(
>>>
>>> It is not a big deal to trigger builds even for docs etc.., but the
>>> ASF resources/workers are limited (and shared among projects IIUC) so
>>> I am only suggesting to be good neighbors :) If this is totally insane
>>> or unacceptable I'll back off and stop vouching for it I promise!
>>
>> I found a new option here while playing with conditionals, we can skip
>> an entire build based on the commit message, it appears -
>>
>> https://github.com/apache/httpd/pull/87/commits/7dd995c555ac0aea6cb3d58634750e2e076eb0cc
>>
>> so this could catch a lot of the quite pointless Travis runs for STATUS
>> changes by filtering by commit message, something like...
>>
>> if: (branch != "2.4.x" and commit_message !~ /^[Tt]ransforms$/) or
>> (branch = "2.4.x" and commit_message !~ /^([Pp]ropose|[Vv]ote|[Tt]ransforms)$/)
>>
>> anything else??
>
> Since I forgot the [skip ci] today, I too a little time to inspect svn log for STATUS and arrived at the following, probably not
> maintainable regexp (perl notation) for 2.4.x:
>
> /^i?(\* ?)?([0-9] *)?([sS]ome +|[mM]ore +|[aA]dd( a)? +|[eE]asy +|[qQ]uick +|[sS]mall +|[uU]pdate( after)? +)?([bB]ackport(ed)?
> +)?([pP]ropos(e|als?),?( *((and)?|\/|\+) *([vV]ote)?)?|[vV]otes?,?( *((and)?|\/|\+)
> *([pP]ropos(e|als?)|[pP]romot(e|ion)s?|[cC]omments?))?|[pP]romot(e|ion)s?|[cC]omment|[nN]ote|[dD]one|[mM]erged|[cC]ommitted|[bB]ackport(ed)?)[\.:!]?(
> *\[skip ci\])?$/
I think the backport stuff should not be in the list as it is often used in backport commits which I want to see run afterwards
through the tests for that branch.
Regards
Rüdiger
Re: Use of [skip ci] in commit messages to avoid Travis builds
Posted by Rainer Jung <ra...@kippdata.de>.
Am 23.03.2020 um 16:56 schrieb Joe Orton:
> On Sat, Feb 08, 2020 at 12:01:29PM +0100, Luca Toscano wrote:
>> Hi everybody,
>>
>> Travis is able to read commit messages and skip the CI workflow if the
>> "[skip ci]" magic sequence is added somewhere. I keep forgetting about
>> it too, but it would be nice if we could start using it to avoid using
>> CI resources/workers when not needed (like docs changes, entries in
>> STATUS, etc..). I didn't find a way to instruct Travis to avoid
>> triggering a build if only certain file types are committed, so the
>> only solution for the moment is to manually add the aforementioned
>> sequence :(
>>
>> It is not a big deal to trigger builds even for docs etc.., but the
>> ASF resources/workers are limited (and shared among projects IIUC) so
>> I am only suggesting to be good neighbors :) If this is totally insane
>> or unacceptable I'll back off and stop vouching for it I promise!
>
> I found a new option here while playing with conditionals, we can skip
> an entire build based on the commit message, it appears -
>
> https://github.com/apache/httpd/pull/87/commits/7dd995c555ac0aea6cb3d58634750e2e076eb0cc
>
> so this could catch a lot of the quite pointless Travis runs for STATUS
> changes by filtering by commit message, something like...
>
> if: (branch != "2.4.x" and commit_message !~ /^[Tt]ransforms$/) or
> (branch = "2.4.x" and commit_message !~ /^([Pp]ropose|[Vv]ote|[Tt]ransforms)$/)
>
> anything else??
Since I forgot the [skip ci] today, I too a little time to inspect svn
log for STATUS and arrived at the following, probably not maintainable
regexp (perl notation) for 2.4.x:
/^i?(\* ?)?([0-9] *)?([sS]ome +|[mM]ore +|[aA]dd( a)? +|[eE]asy
+|[qQ]uick +|[sS]mall +|[uU]pdate( after)? +)?([bB]ackport(ed)?
+)?([pP]ropos(e|als?),?( *((and)?|\/|\+) *([vV]ote)?)?|[vV]otes?,?(
*((and)?|\/|\+)
*([pP]ropos(e|als?)|[pP]romot(e|ion)s?|[cC]omments?))?|[pP]romot(e|ion)s?|[cC]omment|[nN]ote|[dD]one|[mM]erged|[cC]ommitted|[bB]ackport(ed)?)[\.:!]?(
*\[skip ci\])?$/
It is roughly like yours, but allows a few prefixes and suffixes around
the magic words plus a few more of them and some frequent combinations.
Regards,
Rainer
Re: Use of [skip ci] in commit messages to avoid Travis builds
Posted by Joe Orton <jo...@redhat.com>.
On Sat, Feb 08, 2020 at 12:01:29PM +0100, Luca Toscano wrote:
> Hi everybody,
>
> Travis is able to read commit messages and skip the CI workflow if the
> "[skip ci]" magic sequence is added somewhere. I keep forgetting about
> it too, but it would be nice if we could start using it to avoid using
> CI resources/workers when not needed (like docs changes, entries in
> STATUS, etc..). I didn't find a way to instruct Travis to avoid
> triggering a build if only certain file types are committed, so the
> only solution for the moment is to manually add the aforementioned
> sequence :(
>
> It is not a big deal to trigger builds even for docs etc.., but the
> ASF resources/workers are limited (and shared among projects IIUC) so
> I am only suggesting to be good neighbors :) If this is totally insane
> or unacceptable I'll back off and stop vouching for it I promise!
I found a new option here while playing with conditionals, we can skip
an entire build based on the commit message, it appears -
https://github.com/apache/httpd/pull/87/commits/7dd995c555ac0aea6cb3d58634750e2e076eb0cc
so this could catch a lot of the quite pointless Travis runs for STATUS
changes by filtering by commit message, something like...
if: (branch != "2.4.x" and commit_message !~ /^[Tt]ransforms$/) or
(branch = "2.4.x" and commit_message !~ /^([Pp]ropose|[Vv]ote|[Tt]ransforms)$/)
anything else??