Re: Working with branches related to issue - Simplyfying work

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Working with branches related to issue - Simplyfying work

Enrico Olivelli
Hi Karl,
Awesome work

Maybe I am saying something already known, but I think this recap can be
useful.

I see a lot of Apache projects working with this workflow which is very
efficient, even for self service work:
- have a Jira/github issue
- create a github pull request, github will help reviews just by squashing
all commits in an unified view
- have automatic QA tests run against the PR with Jenkins/Travis/...
- once all lights are green (reviews, CI/QA...)..
- use a magic script which:
* checks out the branch
* do a squash commit
* create a meaningful comment
* preserve original author
* add list of reviewers
* verifies that QA is okay
* push to main repo
* optionally cherry pick the commit to other branches
* close the related jira/github issue

There are a few Apache projects which use this kind of magic script, I know
Kafka, Flink, Bookkeeper...

I have backported Bookkeeper (which started as a copy from Flink if I
remember correctly) one to a bunch of other projects and it works as a
charm.

https://github.com/apache/bookkeeper/blob/master/dev/bk-merge-pr.py

My 2 cents
Cheers
Enrico


Il dom 22 lug 2018, 12:30 Karl Heinz Marbaise <[hidden email]> ha
scritto:

> Hi,
>
> I have wrote up a conclusion about my currently working scripts to make
> my life easier...
>
> If someone is interested in take a look at:
>
> https://blog.soebes.de/blog/2018/07/21/automate-it-part-i/
>
> suggestiongs / ideas are always welcome...
>
> Kind regards
> Karl Heinz Marbaise
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
> --


-- Enrico Olivelli
Reply | Threaded
Open this post in threaded view
|

Re: Working with branches related to issue - Simplyfying work

Karl Heinz Marbaise-3
Hi Enrico,

On 22/07/18 13:30, Enrico Olivelli wrote:
> Hi Karl,
> Awesome work

Thanks ...


>
> Maybe I am saying something already known, but I think this recap can be
> useful.
>
> I see a lot of Apache projects working with this workflow which is very
> efficient, even for self service work:
> - have a Jira/github issue
> - create a github pull request, github will help reviews just by
> squashing all commits in an unified view
> - have automatic QA tests run against the PR with Jenkins/Travis/...
> - once all lights are green (reviews, CI/QA...)..
> - use a magic script which:
> * checks out the branch
> * do a squash commit
> * create a meaningful comment
> * preserve original author
> * add list of reviewers
> * verifies that QA is okay
> * push to main repo
> * optionally cherry pick the commit to other branches
> * close the related jira/github issue

As a committer I don't want to go via a PR via GitHub cause we have a
ASF infrastructure....apart from that if I commit a change on a branch a
mail will be send via

[hidden email] [1]

and if I correctly informed all of the committers are subscribed..

So in the end this is a kind of review...and be sure that If I commit
something stupid/not good at least on of the committers will pay
attention to it and tell me about it...

That's why it is so important to work on branches first ...

Nevertheless I'm thinking about the above to get that easier for real
PR's against maven project...Other projects already have activated
automatic builds triggered by GitHub request...I need to talk to INFRA
team about that....cause we are a little bit larger...

Kind regards
Karl Heinz Marbaise



[1]: https://mail-archives.apache.org/mod_mbox/maven-commits/
>
> There are a few Apache projects which use this kind of magic script, I
> know Kafka, Flink, Bookkeeper...
>
> I have backported Bookkeeper (which started as a copy from Flink if I
> remember correctly) one to a bunch of other projects and it works as a
> charm.
>
> https://github.com/apache/bookkeeper/blob/master/dev/bk-merge-pr.py

I will take a look at this...

>
> My 2 cents
> Cheers
> Enrico
>
>
> Il dom 22 lug 2018, 12:30 Karl Heinz Marbaise <[hidden email]
> <mailto:[hidden email]>> ha scritto:
>
>     Hi,
>
>     I have wrote up a conclusion about my currently working scripts to make
>     my life easier...
>
>     If someone is interested in take a look at:
>
>     https://blog.soebes.de/blog/2018/07/21/automate-it-part-i/
>
>     suggestiongs / ideas are always welcome...
>
>     Kind regards
>     Karl Heinz Marbaise
>
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: [hidden email]
>     <mailto:[hidden email]>
>     For additional commands, e-mail: [hidden email]
>     <mailto:[hidden email]>
>
> --
>
>
> -- Enrico Olivelli
>


Mit freundlichem Gruß
Karl-Heinz Marbaise
--
SoftwareEntwicklung Beratung Schulung    Tel.: +49 (0) 2405 / 415 893
Dipl.Ing.(FH) Karl-Heinz Marbaise        USt.IdNr: DE191347579
Hauptstrasse 177
52146 Würselen                           http://www.soebes.de

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: Working with branches related to issue - Simplyfying work

stephenconnolly
In reply to this post by Enrico Olivelli
On Sun 22 Jul 2018 at 12:31, Enrico Olivelli <[hidden email]> wrote:

> Hi Karl,
> Awesome work
>
> Maybe I am saying something already known, but I think this recap can be
> useful.
>
> I see a lot of Apache projects working with this workflow which is very
> efficient, even for self service work:
> - have a Jira/github issue
> - create a github pull request, github will help reviews just by squashing
> all commits in an unified view
> - have automatic QA tests run against the PR with Jenkins/Travis/...


So the one issue here is that the ASF build infrastructure will not pick up
the pull requests for building... various reasons:

* in part because I was lazy when I wrote the Jenkins extension that ASF
uses
* in part because GitBox was still in its infancy, we can probably get the
PR request events federated now, or if not I could probably twist humdebug
to add it
* in part because of the security issue and the risk of attempted
hacking-by-drive-by-pull-requests... wouldn’t be an issue if we used an
isolated Jenkins with CPU limits (bitcoin mining seems the most common)

Thus if you are a Maven committer and you want ASF Jenkins to verify, you
need an origin branch... but having said that, I can still create the PR
from the origin branch to give the squash merge¥

¥ squash merges are evil IMHO

>
> - once all lights are green (reviews, CI/QA...)..
> - use a magic script which:
> * checks out the branch
> * do a squash commit
> * create a meaningful comment
> * preserve original author
> * add list of reviewers
> * verifies that QA is okay
> * push to main repo
> * optionally cherry pick the commit to other branches
> * close the related jira/github issue
>
> There are a few Apache projects which use this kind of magic script, I know
> Kafka, Flink, Bookkeeper...
>
> I have backported Bookkeeper (which started as a copy from Flink if I
> remember correctly) one to a bunch of other projects and it works as a
> charm.
>
> https://github.com/apache/bookkeeper/blob/master/dev/bk-merge-pr.py
>
> My 2 cents
> Cheers
> Enrico
>
>
> Il dom 22 lug 2018, 12:30 Karl Heinz Marbaise <[hidden email]> ha
> scritto:
>
> > Hi,
> >
> > I have wrote up a conclusion about my currently working scripts to make
> > my life easier...
> >
> > If someone is interested in take a look at:
> >
> > https://blog.soebes.de/blog/2018/07/21/automate-it-part-i/
> >
> > suggestiongs / ideas are always welcome...
> >
> > Kind regards
> > Karl Heinz Marbaise
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
> > --
>
>
> -- Enrico Olivelli
>
--
Sent from my phone