Discussion:
[Twisted-Python] github, again
Glyph
2013-06-03 20:59:42 UTC
Permalink
Hi Twisted developers,

This weekend I had a discussion with many Twisted developers, both local to and visiting San Francisco. The topic came up of how to get more long-term contributors to participate more regularly in the project - particularly, doing code reviews, but also, developing and contributing to complex fixes and features that new contributors might not be able to tackle.

One suggestion that almost everybody made immediately was: we should use Github for code reviews.

In the past, I've heard this suggestion given mainly as a way to contribute more code, which does not appeal to me, since we are already swamped reviewing all the code that is currently being contributed.

This time, however, it's been pitched as a way to get people to do more reviews, which I'm keenly interested in. Why would people do more reviews on Github? In a nutshell, it's a lot less work. Here are some reasons why:

Instead of having to run 'force-builds' on the command line, or load a buildbot status page, Github has a way for a build system to report build success automatically, so you can see immediately within a pull request if the changes that it proposes are "good to merge". You can see this at work with Travis here: <https://github.com/twisted/klein/pull/11>. Originally I thought that this was a Travis-CI feature, but have since learned that this is apparently easy - trivial even - to hook up to Buildbot, since it's a simple HTTP API to invoke when a build completes, and there is even some existing buildbot infrastructure (deployed by Django, among others) to automate it.
Instead of having to describe each patch location so that you can comment on it in a single message, if you want to put a comment on a particular part of a diff in a Github pull request, you can just click on it and start typing.
In addition to the diff, it's reasonably easy to see the code in context on the web, which is faster than getting it into one's local development environment.
If a review is successful, instead of having to have a local development environment, a committer can just hit the "approve" button and it's landed immediately.
Instead of having to read through all history ever to see what's still relevant, a pull request will hide comments that address outdated diffs, allowing the change author to easily see what remains.

These advantages are not comprehensive, but they're the more significant ones I remember from this discussion.

A prerequisite for using Github for code reviews would be using Git rather than Subversion. Luckily there's not much work to do in this area, thanks to Tom's excellent work on the Git import and automatic Github mirror. As a bonus, by using Git instead of Subversion, we can start properly recording merge metadata.

In this discussion, Alex Gaynor pointed out that Django has a hybrid workflow where they still use Trac for bug tracking, and Github for code review. We would therefore not need to come up with a way to migrate all of our tickets to Github issues (which seems, oddly, to be fairly unpopular even among those who like github a lot).

What would need to happen in order for this to take place?

We'd need some consensus (hence this message).
We'd need to update the release process <http://twistedmatrix.com/trac/wiki/ReleaseProcess> and our development documentation <http://twistedmatrix.com/trac/wiki/BasicGuideToContributingCode> to refer to the relevant Git commands rather than Subversion commands.
We'd need a redirect from <http://twistedmatrix.com/trac/browser/> and <http://twistedmatrix.com/trac/changeset/> that would point at <https://github.com/twisted/twisted> and <https://github.com/twisted/twisted/commits/> respectively.
We'd need a Github web hook that could poke Buildbot to kick off commits.
We'd need Buildbot integration to update Github pull requests with build results when builds complete.
We'd need someone to install git rather than bzr on all the buildbots, and update the configuration of the builders to get the code from a git rather than Subversion URL.
Someone will need to convert every open ticket in review to a pull request.

I do anticipate some objections.

One objection is that each of the above tasks is going to take some work.

I am fairly confident that some of the people who have educated me here will step forward to volunteer to do it. Please reply to this message if you'd like to volunteer, saying what you'd like to volunteer to do. If not, then I guess that objection stands :-).

Another is that this might not be worth that investment of effort. This is why it was nice to have Alex contributing to the discussion: Django did basically this very change (right down to the "Trac for tickets / Github for pull requests" distinction), at a much higher scale than we have, and as he described it the change was *well* worth it.

Another objection is that Github is proprietary software, and an externally-maintained service that we'd be depending upon.

One solution to the "proprietary software" thing is the availability of the MIT-licensed <http://gitlab.org>. It's a largely feature-complete clone of Github; if, for some reason, we need to migrate away from Github in a hurry, it will be relatively painless to set up Gitlab instead, and the fact that Git is a DVCS means every contributor will serve as a backup. The main reason I would not suggest just deploying it is that it creates another sticky infrastructure-management problem, and while Braid is great, I'd prefer to avoid creating more work in that area. Github also has APIs for literally all of their features, so we can create a backup script.

(Also worth noting: Gitlab is an open-source competitor to Github, but they still trust Github enough to <https://github.com/gitlabhq/> host their own development there.)

Finally, my own minor concern: Github has no notion of a "code review" as a unit of work. A pull request is just "open" until it is "closed". Closing pull requests to request changes would be jarring to the cultural norms associated with Github's UI. All the github users I've spoken with, even those who follow processes which are effectively identical to Twisted's, have assured me that this is not really an issue. A code review is "accepted" when you merge it; it's "rejected" if the pull request is still open but has some comments on it. This will make porting over <http://twistedmatrix.com/highscores/> a bit challenging, but I think it would be worth letting that break for the time being.

-glyph
Jonathan Stoppani
2013-06-03 21:32:12 UTC
Permalink
Hi Glyph,

That is great news. I already helped with Braid and would be interested in contributing some work in this area.

Cheers,
Jonathan
Post by Glyph
Hi Twisted developers,
This weekend I had a discussion with many Twisted developers, both local to and visiting San Francisco. The topic came up of how to get more long-term contributors to participate more regularly in the project - particularly, doing code reviews, but also, developing and contributing to complex fixes and features that new contributors might not be able to tackle.
One suggestion that almost everybody made immediately was: we should use Github for code reviews.
In the past, I've heard this suggestion given mainly as a way to contribute more code, which does not appeal to me, since we are already swamped reviewing all the code that is currently being contributed.
• Instead of having to run 'force-builds' on the command line, or load a buildbot status page, Github has a way for a build system to report build success automatically, so you can see immediately within a pull request if the changes that it proposes are "good to merge". You can see this at work with Travis here: <https://github.com/twisted/klein/pull/11>. Originally I thought that this was a Travis-CI feature, but have since learned that this is apparently easy - trivial even - to hook up to Buildbot, since it's a simple HTTP API to invoke when a build completes, and there is even some existing buildbot infrastructure (deployed by Django, among others) to automate it.
• Instead of having to describe each patch location so that you can comment on it in a single message, if you want to put a comment on a particular part of a diff in a Github pull request, you can just click on it and start typing.
• In addition to the diff, it's reasonably easy to see the code in context on the web, which is faster than getting it into one's local development environment.
• If a review is successful, instead of having to have a local development environment, a committer can just hit the "approve" button and it's landed immediately.
• Instead of having to read through all history ever to see what's still relevant, a pull request will hide comments that address outdated diffs, allowing the change author to easily see what remains.
These advantages are not comprehensive, but they're the more significant ones I remember from this discussion.
A prerequisite for using Github for code reviews would be using Git rather than Subversion. Luckily there's not much work to do in this area, thanks to Tom's excellent work on the Git import and automatic Github mirror. As a bonus, by using Git instead of Subversion, we can start properly recording merge metadata.
In this discussion, Alex Gaynor pointed out that Django has a hybrid workflow where they still use Trac for bug tracking, and Github for code review. We would therefore not need to come up with a way to migrate all of our tickets to Github issues (which seems, oddly, to be fairly unpopular even among those who like github a lot).
What would need to happen in order for this to take place?
• We'd need some consensus (hence this message).
• We'd need to update the release process <http://twistedmatrix.com/trac/wiki/ReleaseProcess> and our development documentation <http://twistedmatrix.com/trac/wiki/BasicGuideToContributingCode> to refer to the relevant Git commands rather than Subversion commands.
• We'd need a redirect from <http://twistedmatrix.com/trac/browser/> and <http://twistedmatrix.com/trac/changeset/> that would point at <https://github.com/twisted/twisted> and <https://github.com/twisted/twisted/commits/> respectively.
• We'd need a Github web hook that could poke Buildbot to kick off commits.
• We'd need Buildbot integration to update Github pull requests with build results when builds complete.
• We'd need someone to install git rather than bzr on all the buildbots, and update the configuration of the builders to get the code from a git rather than Subversion URL.
• Someone will need to convert every open ticket in review to a pull request.
I do anticipate some objections.
One objection is that each of the above tasks is going to take some work.
I am fairly confident that some of the people who have educated me here will step forward to volunteer to do it. Please reply to this message if you'd like to volunteer, saying what you'd like to volunteer to do. If not, then I guess that objection stands :-).
Another is that this might not be worth that investment of effort. This is why it was nice to have Alex contributing to the discussion: Django did basically this very change (right down to the "Trac for tickets / Github for pull requests" distinction), at a much higher scale than we have, and as he described it the change was *well* worth it.
Another objection is that Github is proprietary software, and an externally-maintained service that we'd be depending upon.
One solution to the "proprietary software" thing is the availability of the MIT-licensed <http://gitlab.org>. It's a largely feature-complete clone of Github; if, for some reason, we need to migrate away from Github in a hurry, it will be relatively painless to set up Gitlab instead, and the fact that Git is a DVCS means every contributor will serve as a backup. The main reason I would not suggest just deploying it is that it creates another sticky infrastructure-management problem, and while Braid is great, I'd prefer to avoid creating more work in that area. Github also has APIs for literally all of their features, so we can create a backup script.
(Also worth noting: Gitlab is an open-source competitor to Github, but they still trust Github enough to <https://github.com/gitlabhq/> host their own development there.)
Finally, my own minor concern: Github has no notion of a "code review" as a unit of work. A pull request is just "open" until it is "closed". Closing pull requests to request changes would be jarring to the cultural norms associated with Github's UI. All the github users I've spoken with, even those who follow processes which are effectively identical to Twisted's, have assured me that this is not really an issue. A code review is "accepted" when you merge it; it's "rejected" if the pull request is still open but has some comments on it. This will make porting over <http://twistedmatrix.com/highscores/> a bit challenging, but I think it would be worth letting that break for the time being.
-glyph
_______________________________________________
Twisted-Python mailing list
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
Ralph Meijer
2013-06-03 21:40:33 UTC
Permalink
Post by Glyph
Hi Twisted developers,
[..]
One suggestion that almost everybody made immediately was: we should use
Github for code reviews.
As mentioned on IRC, the only comment I have is about the lack of proper
e-mail addresses associated with commits. Tom is investigating if this
can be done with .mailmap, instead of having to make a proper mirror again.

Otherwise: do it.
--
ralphm
Christian Kampka
2013-06-03 21:51:19 UTC
Permalink
Post by Glyph
Another objection is that Github is proprietary software, and an
externally-maintained service that we'd be depending upon.
One solution to the "proprietary software" thing is the availability of
the MIT-licensed <http://gitlab.org>. It's a largely feature-complete
clone of Github; if, for some reason, we need to migrate away from
Github in a hurry, it will be relatively painless to set up Gitlab
instead, and the fact that Git is a DVCS means every contributor will
serve as a backup. The main reason I would not suggest just deploying
it is that it creates another sticky infrastructure-management problem,
and while Braid is great, I'd prefer to avoid creating /more/ work in
that area. Github also has APIs for literally all of their features, so
we can create a backup script.
(Also worth noting: Gitlab is an open-source competitor to Github, but
they still trust Github enough to <https://github.com/gitlabhq/> host
their own development there.)
It may be worth noting that the reason for gitlab being hosted on github
is probably due to the fact that up until very recently, gitlab had no
way for a non-registered user to access gitlab at all. Even though they
have introduced a "public area" for projects this does only include
anonymously cloning of a repository, you still cannot browse code or
look at issues, pull/merge request or wikis without a user account.

Although gitlab is great for internal projects, this lack of a proper
support for public features makes it imo not that suitable for open
projects.

Cheers,
Chris
meejah
2013-06-04 01:48:42 UTC
Permalink
Post by Christian Kampka
Although gitlab is great for internal projects, this lack of a proper
support for public features makes it imo not that suitable for open
projects.
Sorry to butt in, but to add to this Gitlab doesn't support the "fork
and pull request" model of GitHub -- instead they use branches (in one
repo) and "merge requests". This might work fine for you guys, of
course, but if you're expecting a "drop in" replacement for github,
that's not what you'll get ;)

It sounds like aspects of this are currently in the latest stuff,
however, so it might work like github in this respect "soon":

https://github.com/gitlabhq/gitlabhq/pull/3597

Cheers,
meejah
Christopher Armstrong
2013-06-04 03:15:49 UTC
Permalink
Post by meejah
It sounds like aspects of this are currently in the latest stuff,
https://github.com/gitlabhq/gitlabhq/pull/3597
Whoah. Did anyone else notice that "coveralls" bot? that is pretty sweet.
--
Christopher Armstrong
http://radix.twistedmatrix.com/
http://planet-if.com/
Christopher Armstrong
2013-06-03 23:48:51 UTC
Permalink
Post by Glyph
One suggestion that almost everybody made immediately was: we should use
Github for code reviews.
I'm +1 on the whole proposition as described.

Finally, my own minor concern: Github has no notion of a "code review" as a
Post by Glyph
unit of work. A pull request is just "open" until it is "closed". Closing
pull requests to request changes would be jarring to the cultural norms
associated with Github's UI. All the github users I've spoken with, even
those who follow processes which are effectively identical to Twisted's,
have assured me that this is not really an issue. A code review is
"accepted" when you merge it; it's "rejected" if the pull request is still
open but has some comments on it. This will make porting over <
http://twistedmatrix.com/highscores/> a bit challenging, but I think it
would be worth letting that break for the time being.
I don't really like the idea of maintaining review state in Trac,
especially since one of the points of this discussion is to make the life
of the reviewer easier. My feeling is that the slight difference in review
workflow on PRs -- the fact that there is no "responsibility transfer"
mechanism -- will not be a serious problem in practice, and that we should
have a culture of closing abandoned PRs.
--
Christopher Armstrong
http://radix.twistedmatrix.com/
http://planet-if.com/
Jamu Kakar
2013-06-04 00:35:54 UTC
Permalink
Hi,

On Mon, Jun 3, 2013 at 4:48 PM, Christopher Armstrong
Post by Christopher Armstrong
Post by Glyph
One suggestion that almost everybody made immediately was: we should use
Github for code reviews.
I'm +1 on the whole proposition as described.
Me too.
Post by Christopher Armstrong
Post by Glyph
Finally, my own minor concern: Github has no notion of a "code review" as
a unit of work. A pull request is just "open" until it is "closed".
Closing pull requests to request changes would be jarring to the cultural
norms associated with Github's UI. All the github users I've spoken with,
even those who follow processes which are effectively identical to
Twisted's, have assured me that this is not really an issue. A code review
is "accepted" when you merge it; it's "rejected" if the pull request is
still open but has some comments on it. This will make porting over
<http://twistedmatrix.com/highscores/> a bit challenging, but I think it
would be worth letting that break for the time being.
I don't really like the idea of maintaining review state in Trac, especially
since one of the points of this discussion is to make the life of the
reviewer easier. My feeling is that the slight difference in review workflow
on PRs -- the fact that there is no "responsibility transfer" mechanism --
will not be a serious problem in practice, and that we should have a culture
of closing abandoned PRs.
Something that has worked well for me on other projects is to use
simple conventions. When you finally approve a branch you leave a
comment like 'jkakar:approve'. If you expect changes you leave a
comment like 'jkakar:needs-fixing'. In other words, you don't really
need an app-enforced mechanism if you have a simple convention. I
propose starting with the simplest convention: the reviewing must add
an 'author:approve' comment when they're finally happy.

Thanks,
J.
Glyph
2013-06-04 01:00:42 UTC
Permalink
Post by Jamu Kakar
Hi,
On Mon, Jun 3, 2013 at 4:48 PM, Christopher Armstrong
Post by Christopher Armstrong
Post by Glyph
One suggestion that almost everybody made immediately was: we should use
Github for code reviews.
I'm +1 on the whole proposition as described.
Me too.
Post by Christopher Armstrong
Post by Glyph
Finally, my own minor concern: Github has no notion of a "code review" as
a unit of work. A pull request is just "open" until it is "closed".
Closing pull requests to request changes would be jarring to the cultural
norms associated with Github's UI. All the github users I've spoken with,
even those who follow processes which are effectively identical to
Twisted's, have assured me that this is not really an issue. A code review
is "accepted" when you merge it; it's "rejected" if the pull request is
still open but has some comments on it. This will make porting over
<http://twistedmatrix.com/highscores/> a bit challenging, but I think it
would be worth letting that break for the time being.
I don't really like the idea of maintaining review state in Trac, especially
since one of the points of this discussion is to make the life of the
reviewer easier. My feeling is that the slight difference in review workflow
on PRs -- the fact that there is no "responsibility transfer" mechanism --
will not be a serious problem in practice, and that we should have a culture
of closing abandoned PRs.
Something that has worked well for me on other projects is to use
simple conventions. When you finally approve a branch you leave a
comment like 'jkakar:approve'. If you expect changes you leave a
comment like 'jkakar:needs-fixing'. In other words, you don't really
need an app-enforced mechanism if you have a simple convention. I
propose starting with the simplest convention: the reviewing must add
an 'author:approve' comment when they're finally happy.
Honestly, we don't have much of an enforcement mechanism as it is. We just manually add the 'review' keyword when something goes into review, by typing 'review' into the keywords box; you also have to manually un-assign the ticket, and people often forget that part.

The two things that notice this are our IRC bot and our High Scores page.

The lack of a 'keyword' mechanism somewhat distracted me from the main issue though; if we just had high scores and the announcement bot scan the comments for the strings "Please fix." for out-of-review and "Please review." for back-into-review, we could both maintain the exact same workflow and reward politeness ;-).

Thanks for the suggestion, Jamu!

-glyph
Terry Jones
2013-06-04 01:55:20 UTC
Permalink
I sent most of the below off-list to Glyph earlier, as my comments were a
bit half-assed and I'm not really (or not at all) a Twisted contributor.
Glyph suggested I mail them to the list anyway, and to try adding some more
concrete reasons for being +1 on the suggested change.

--- [ Original mail ]

I'm +1 bigtime on moving towards git/github. I really dislike git, but it
gets the job done, and github is awesome. Github changed the way we work,
it removed a ton of friction and overhead in reviewing (you're right, the
click to comment on a diff is really convenient). I don't have too many
complaints about the ticket system, but sure it could be better. The really
impressive thing about Github is how incredibly quickly they move. It gets
better and better and better all the time. We migrated away from svn +
trac to bzr + launchpad and finally to git + github. The latter blows the
former away massively, IMO. I'm not trying to give formal quantitative
feedback, just my subjective opinion. I've also felt for ages that there's
too much overhead in trying to contribute to Twisted. I'm a lazy/selfish
kind of member of the Twisted community, and when I'm faced with the
thought of having to set up all that old-fashioned (from my POV) machinery
like svn and combinator and what-not to think about really contributing or
running tests or whatever, some part of me just thinks "no, no, no, I'm not
going back to that world". (see above re lazy, if that wasn't clear).

OK, sorry for a bit of a rambling subjective mail. I'm sure you've heard
all this before. The funny thing about these changes is that before you
make them you always think things are pretty much fine. After you make them
you wonder how you ever lived with the old system. That may not be the
case here for you or for you & the Twisted community, but it certainly was
for me with the move to github.

---

Glyph> Maybe you could be a bit more specific as to the steps that Github
eliminates, and _concrete_ ways in which it is more efficient.

I'd say there are probably dozens of ways in which Gthub improved things
for us. Many of them are minor, of course, but they all add up and the
usability difference between Github and Trac or Launchpad is extreme.

Ease of use and the anticipated amount of effort something is going to take
are very important aspects of tools, in my opinion. If you know some action
- like starting a review or branching or merging or commenting etc. - is
going to take a certain amount of effort, that correlates (unless you're
being paid or doing this out of some extreme reason, like being a core dev
on a project) with how likely you are to do it. (E.g., making branches - it
was possible in sccs, in rcs, in cvs, in svn, but.... oh, the pain! When
making branches *and merging them* became so extraordinarily simple and
pain free, it changed the way people worked.) As I said above, I'm a
lazy/selfish Twisted onlooker. Many has been the time when I'd have been
happy to chip in on something (e.g., last week someone was asking for some
reviewing help) but the thought of getting the required machinery in place,
and using it, even if it's just svn (ugh, ugh, ugh) stops me. That's a
feeling I've had about Twisted many times over the last years. It's the
feeling I have when someone asks me to go back to helping them on some old
perl code - you just don't wanna go there :-) It's ugly and not fun. Sorry
if these are wimpy reasons, but to me usability friction (real or
perceived) is very important.

A very nice thing about Github is that you can have conversations about the
diff right on the page, inline, where the diff is shown. You don't need to
download the branch, to use the command-line (and i LOVE the command line
BTW), or to do anything like that. Github is smart enough to hide the
discussion once a subsequent commit comes in that addresses the line being
discussed (sure, that could go wrong but in practice it doesn't seem to).
One click to merge branches is great - in fact we made a rule that merging
is always done via Github. Adding of milestones and labels to issues is
smooth, as is viewing various simple subsets of issues. The project
activity graphs in Github are very interesting. GFM (Github flavored
markdown) is really easy to use and the results are attractive. Gists are
great. It's nice being able to have a wiki that's also just a repo. I very
much like the "pull requests are a place where discussion takes place"
approach - as opposed to holding that pull requests are just where branches
go when they're "finished" and ready to be merged. BTW, it's very
interesting to read about how the folks at Github use Github themselves [1,
2]. The workflow we developed is very similar, only slightly more complex.
If people want more examples, I can try to go more systematically through
my usage of Github & say more.

As mentioned above, Github moves (improves) incredibly quickly. They put
pretty much every other project I know to shame (including all of mine) in
terms of how fast they get stuff done and improve the product and how
attractively it's done. In comparison, Trac and Launchpad felt static,
butt-ugly, and like they virtually never improved. Github gets better
underneath you all the time. E.g., you happen to be sitting on a page
looking at a pull request, and it updates dynamically without you needing
to reload. The pull request is merged maybe, or the author pushes into the
branch again, or conflicts with master get resolved by someone and the page
updates. Little things, but they work damned well and make using the site a
pleasure.

I can't resist adding: a friend in IRC just said re this thread: "2003
called and asked for their shitty tools back."

Terry

[1] http://scottchacon.com/2011/08/31/github-flow.html
[2] https://github.com/blog/1124-how-we-use-pull-requests-to-build-github
Post by Glyph
Hi Twisted developers,
This weekend I had a discussion with many Twisted developers, both local
to and visiting San Francisco. The topic came up of how to get more
long-term contributors to participate more regularly in the project -
particularly, doing code reviews, but also, developing and contributing to
complex fixes and features that new contributors might not be able to
tackle.
One suggestion that almost everybody made immediately was: we should use
Github for code reviews.
In the past, I've heard this suggestion given mainly as a way to *contribute
more code*, which does not appeal to me, since we are already swamped
reviewing all the code that is currently being contributed.
This time, however, it's been pitched as a way to get people to *do more
reviews*, which I'm keenly interested in. Why would people do more
reviews on Github? In a nutshell, it's a lot less work. Here are some
- Instead of having to run 'force-builds' on the command line, or load
a buildbot status page, Github has a way for a build system to report build
success automatically, so you can see immediately within a pull request if
the changes that it proposes are "good to merge". You can see this at work
with Travis here: <https://github.com/twisted/klein/pull/11>.
Originally I thought that this was a Travis-CI feature, but have since
learned that this is apparently easy - trivial even - to hook up to
Buildbot, since it's a simple HTTP API to invoke when a build completes,
and there is even some existing buildbot infrastructure (deployed by
Django, among others) to automate it.
- Instead of having to describe each patch location so that you can
comment on it in a single message, if you want to put a comment on a
particular part of a diff in a Github pull request, you can just click on
it and start typing.
- In addition to the diff, it's reasonably easy to see the code in
context on the web, which is faster than getting it into one's local
development environment.
- If a review is successful, instead of having to have a local
development environment, a committer can just hit the "approve" button and
it's landed immediately.
- Instead of having to read through all history ever to see what's
still relevant, a pull request will hide comments that address outdated
diffs, allowing the change author to easily see what remains.
These advantages are not comprehensive, but they're the more significant
ones I remember from this discussion.
A prerequisite for using Github for code reviews would be using Git rather
than Subversion. Luckily there's not much work to do in this area, thanks
to Tom's excellent work on the Git import and automatic Github mirror. As
a bonus, by using Git instead of Subversion, we can start properly
recording merge metadata.
In this discussion, Alex Gaynor pointed out that Django has a hybrid
workflow where they still use Trac for bug tracking, and Github for code
review. We would therefore *not* need to come up with a way to migrate
all of our tickets to Github issues (which seems, oddly, to be fairly
unpopular even among those who like github a lot).
What would need to happen in order for this to take place?
1. We'd need some consensus (hence this message).
2. We'd need to update the release process <
http://twistedmatrix.com/trac/wiki/ReleaseProcess> and our development
documentation <
http://twistedmatrix.com/trac/wiki/BasicGuideToContributingCode> to
refer to the relevant Git commands rather than Subversion commands.
3. We'd need a redirect from <http://twistedmatrix.com/trac/browser/>
and <http://twistedmatrix.com/trac/changeset/> that would point at <
https://github.com/twisted/twisted> and <
https://github.com/twisted/twisted/commits/> respectively.
4. We'd need a Github web hook that could poke Buildbot to kick off
commits.
5. We'd need Buildbot integration to update Github pull requests with
build results when builds complete.
6. We'd need someone to install git rather than bzr on all the
buildbots, and update the configuration of the builders to get the code
from a git rather than Subversion URL.
7. Someone will need to convert every open ticket in review to a pull
request.
I do anticipate some objections.
One objection is that each of the above tasks is going to take some work.
I am fairly confident that some of the people who have educated me here
will step forward to volunteer to do it. Please reply to this message if
you'd like to volunteer, saying what you'd like to volunteer to do. If
not, then I guess that objection stands :-).
Another is that this might not be worth that investment of effort. This
is why it was nice to have Alex contributing to the discussion: Django did
basically this very change (right down to the "Trac for tickets / Github
for pull requests" distinction), at a much higher scale than we have, and
as he described it the change was *well* worth it.
Another objection is that Github is proprietary software, and an
externally-maintained service that we'd be depending upon.
One solution to the "proprietary software" thing is the availability of
the MIT-licensed <http://gitlab.org>. It's a largely feature-complete
clone of Github; if, for some reason, we need to migrate away from Github
in a hurry, it will be relatively painless to set up Gitlab instead, and
the fact that Git is a DVCS means every contributor will serve as a backup.
The main reason I would not suggest just deploying it is that it creates
another sticky infrastructure-management problem, and while Braid is great,
I'd prefer to avoid creating *more* work in that area. Github also has
APIs for literally all of their features, so we can create a backup script.
(Also worth noting: Gitlab is an open-source competitor to Github, but
they still trust Github enough to <https://github.com/gitlabhq/> host
their own development there.)
Finally, my own minor concern: Github has no notion of a "code review" as
a unit of work. A pull request is just "open" until it is "closed".
Closing pull requests to request changes would be jarring to the cultural
norms associated with Github's UI. All the github users I've spoken with,
even those who follow processes which are effectively identical to
Twisted's, have assured me that this is not really an issue. A code review
is "accepted" when you merge it; it's "rejected" if the pull request is
still open but has some comments on it. This will make porting over <
http://twistedmatrix.com/highscores/> a bit challenging, but I think it
would be worth letting that break for the time being.
-glyph
_______________________________________________
Twisted-Python mailing list
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
t***@gmail.com
2013-06-04 06:49:24 UTC
Permalink
Hi,

what about Bitbucket (www.bitbucket.org) and mercurial ?

Don't they provide the same features ?

I'm asking because we are in Python land. ;-)




Regards,

Wolfgang
Adi Roiban
2013-06-04 07:20:36 UTC
Permalink
Thanks for working on this!

Here are the points where I can help:


1. We'd need some consensus (hence this message).

I am still new to Twisted and only sent a few patched, but I am
looking forward for sending reviews in GitHub or BitButcket, any or
them is better than the current read-only SVN branch and attaching
diff files to the slow Trac.


4. We'd need a Github web hook that could poke Buildbot to kick off commits.

GitHub can send webhook for many events, and as a weekend hack I have
implemented a simple server to feed all GitHub activity, back to Trac.

https://github.com/chevah/txghserf

If there is interest in syncing GitHub Pull request with Trac ticket,
I am happy to discuss more details in a separate thread. I am already
doing this for my prorject.

I have also implemented a bit of a workflow on top of GitHub Pull
request. For example leaving a comment in pull request with
needs-review, will set the review state in Trac. Leaving a comment
with needs-changes will remove the review state.


5. We'd need Buildbot integration to update Github pull requests with
build results when builds complete.

The Builbot integration with GitHub status was recently merged. I can
volunteer with support. I am also using this GitHub feature on my own
Buildbot instance.

https://github.com/buildbot/buildbot/pull/635


7. Someone will need to convert every open ticket in review to a pull request.

I can volunteer for that.


Thanks!
--
Adi Roiban
Jonathan Vanasco
2013-06-06 16:08:59 UTC
Permalink
Post by t***@gmail.com
Hi,
what about Bitbucket (www.bitbucket.org) and mercurial ?
Don't they provide the same features ?
I'm asking because we are in Python land. ;-)
BitBucket isn't as slick as GitHub.

Mercurial isn't as well known, and the storage isn't as optimal.

SqlAlchemy recently migrated from hg to git -- here is Mike Bayer's rationale:

http://www.sqlalchemy.org/blog/#sqlalchemy-migrated-to-git

It's trivial to clone a repo with git. Also, I believe that if you configure a working repository to follow all the upstream changes, you essentially have a full clone. So if the primary ever went down, one of the package maintainers could instantly become the new upstream.

I use git+github for all my open source work, and subversion for private stuff -- only because i'm too lazy to set up a remote hg repo. Git was hard to get used to, and can be difficult at times, but it's a significantly better experience. The biggest win with git for me, is that you have offline commits. I've found myself forced to be online for a svn commit too many times ( while restructuring projects ). git is more flexible -- you can do everything locally and never have to push to the server until you're ready ( no more "part 1 of 3" repo commits ). then you can squash all the commits into a single server push.

The code review process on git and github is great; and the fork + merge model is much easier than working with SVN.

someone mentioned `rebase` and `squash`.

these articles do a much better job at describing it than i can:
http://git-scm.com/book/en/Git-Branching-Rebasing
http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html

in a nutshell, rebase allows you to start replaying commits onto a working copy. you can then pick and choose which are kept, tossed, or merged. it's basically a way to rewrite or replay history.

the only downside to git, is that once something goes onto the server... it's there for good. it's possible to rebase a repo back to a specific commit , then replay without specific commits, and "push -f" to overwrite the history... but if anyone updated against the server, those commits will come back and haunt you. over and over and over again.

there's also a great plugin called "git flow" http://nvie.com/posts/a-successful-git-branching-model/ https://github.com/nvie/gitflow

it's just some shell scripts that help automate how you organize your branches for fixing issues.
Phil Mayers
2013-06-06 16:52:11 UTC
Permalink
Post by Jonathan Vanasco
the only downside to git, is that once something goes onto the
server... it's there for good. it's possible to rebase a repo back
to a specific commit , then replay without specific commits, and
"push -f" to overwrite the history... but if anyone updated against
the server, those commits will come back and haunt you. over and
over and over again.
Yes. Never do this. It's hateful to fix, and rude to contributors!

(Obviously not an issue if your git repo will just be a read-only copy
of SVN used to drive git-based code review tools)
Jonathan Vanasco
2013-06-07 00:42:15 UTC
Permalink
Post by Phil Mayers
Post by Jonathan Vanasco
the only downside to git, is that once something goes onto the
server... it's there for good. it's possible to rebase a repo back
to a specific commit , then replay without specific commits, and
"push -f" to overwrite the history... but if anyone updated against
the server, those commits will come back and haunt you. over and
over and over again.
Yes. Never do this. It's hateful to fix, and rude to contributors!
(Obviously not an issue if your git repo will just be a read-only copy of SVN used to drive git-based code review tools)
It shouldn't ever happen in an Open Source project, or on "master" but in a corporate setting... you'd be surprised.

a - Someone accidentally commits and pushes a config file with credentials in it
b - You have commits A,B,C,D,E. D needs to be rebased out in order for a merge to successfully work. You can't get rebase to work well, so you have to roll back to C, push -f, apply a diff from C-E ( which doesn't have D in it, all done by hand ), and then committed.

Thankfully when someone brings this to you , you can say to your team "Ok. everyone nuke your git repos and go to lunch. i'll fix it for you".

That being said, i'm a HUGE fan of having an "upstream" repo that is only used for merging in changes, and everyone has their own fork to work on. I'm not a fan of people working in branches on the 'source' at all.
Tobias Oberstein
2013-06-04 16:42:39 UTC
Permalink
in general: +1 for this
Finally, my own minor concern: Github has no notion of a "code review" as a unit of work.  A pull request is just "open" until it is "closed".
<snip>
I _think_ the following is true (if so, I find that strange) - pls correct me if I'm wrong:

A pull request is not tied to a specific rev, but only to a source repo/branch.
While the pull isn't merged (and hence closed), more commits on the source repo/branch can be added.

So a pull request is kind of moving target ..

GitHub seems to view that as a feature, not bug:
"""
Pull requests can be sent from any branch or commit but it's recommended that a topic branch be used so that follow-up commits can be pushed to update the pull request if necessary.
"""
https://help.github.com/articles/using-pull-requests

"""
It's important to use a new branch for pull requests for several reasons:

It allows you to submit multiple pull requests without confusion. The classical Github gotcha is to continue committing to a pull request branch after making the initial request. When these commits are pushed to the remote, they will become part of the original pull request which often ends up conflating unrelated functionality.
"""
http://codeinthehole.com/writing/pull-requests-and-other-good-practices-for-teams-using-github/

However: https://github.com/blog/712-pull-requests-2-0
I'm not sure how to interpret that ..

/Tobias
Terry Jones
2013-06-04 18:10:19 UTC
Permalink
The general workflow that's being described is:

- You open an issue for all bugs, enhancements, etc.
- When someone starts working on one of these, they create a branch (we
use descriptive branch names and put -NNNN at the end, with the issue
number).
- When the branch reaches the point where the author feels it could be
merged or wants to open it up for easy discussion, they send a pull request.

The pull request is a signal to the people working on the base code (that
the pull request is against/for, let's just call it "master") that the
author of the branch has it in mind to merge their branch into master. That
may be a way off, it may never happen, or it could be done almost
immediately. Github doesn't have any formal mechanism for having a branch
approved, or even a mechanism for saying "I'm interested in this pull
request and I intend to review / comment on it before it's merged, so
please don't merge it until I've +1'd". That's a weakness and a strength.
We adopted the convention (as @jkakar mentioned) of having interested
parties just edit the pull request description, to put in a string like
"terrycojones: **pending**" to indicate that you're planning to comment.

The pull requests are discussions about the code, and the code changes
while the pul request is outstanding. That's normal. Other people, who have
the right permission, might want to push changes into the branch that's
being worked on. E.g., there could be a jkakar/fix-race-condition-4772
branch. I switch onto that branch (git remote update --prune jkakar; git
co jkakar/fix-race-condition-4772) and run the tests, take a look, etc. I
decided to help out by making a few changes, so I make my own branch: git
co -b fix-race-condition-4772. That creates
terrycojones/fix-race-condition-4772 which I can work on, commit to, and
push back to github. I could then send a pull request to merge that branch
into jkakar/fix-race-condition-4772 or if I have the right perms, just push
it directly into that branch.

The diff in the pull request always reflects the latest changes, as you'd
expect. So over time as there is discussion & code change around the pull
request, the diff will change. As I mentioned, parts that are fixed will
have the conversation disappear (this sounds alarming, perhaps, but it
works).

At some point everyone who's interested will have contributed to the
discussion, to the code, and signed off. Then you merge it, using the web
UI. Sometimes a pull request doesn't reach the point where there's
agreement that it should be merged. When that happens, we usually close the
pull request so it's not cluttering up the pull requests page. The branch
doesn't go away, of course, and can be re-proposed for merging via a later
pull request.

I hope that helps. I think most of this is open-ended and teams can choose
the conventions that suit them. The above is just what we've done, but it
does seem to match up pretty closely with some of the links people have
been posting.

One point of difference that I don't know the best answer to: We tend to
each have our own fork of a repo, and to send pull requests into the repo
"owned" by the organization. Others (including Github themselves) just have
one repo and anyone can make a branch in that repo and propose it for
merging into the master of the same repo. I think I prefer the former,
though it has a little more overhead and it requires people to do a git
remote add ***@github.com:name/project.git for the other people whose
changes you want to track and pull in etc (via git remote update --prune).

Terry




On Tue, Jun 4, 2013 at 5:42 PM, Tobias Oberstein <
Post by Tobias Oberstein
in general: +1 for this
Post by Glyph
Finally, my own minor concern: Github has no notion of a "code review"
as a unit of work. A pull request is just "open" until it is "closed".
Post by Glyph
<snip>
A pull request is not tied to a specific rev, but only to a source repo/branch.
While the pull isn't merged (and hence closed), more commits on the source
repo/branch can be added.
So a pull request is kind of moving target ..
"""
Pull requests can be sent from any branch or commit but it's recommended
that a topic branch be used so that follow-up commits can be pushed to
update the pull request if necessary.
"""
https://help.github.com/articles/using-pull-requests
"""
It allows you to submit multiple pull requests without confusion. The
classical Github gotcha is to continue committing to a pull request branch
after making the initial request. When these commits are pushed to the
remote, they will become part of the original pull request which often ends
up conflating unrelated functionality.
"""
http://codeinthehole.com/writing/pull-requests-and-other-good-practices-for-teams-using-github/
However: https://github.com/blog/712-pull-requests-2-0
I'm not sure how to interpret that ..
/Tobias
_______________________________________________
Twisted-Python mailing list
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
Tobias Oberstein
2013-06-04 20:43:40 UTC
Permalink
Terry,

thanks alot for your detailed explanation of a workflow. For me, that sounds reasonable and workable.
At some point everyone who's interested will have contributed to the discussion, to the code, and signed off.  Then you merge it, using the web UI
So when the code is ready, the feature branch including any accumulated commits (history) will get merged - and not a clean diff against the main repo?

Just asking .. guess there are arguments for both approaches.
+1 for the former (each has it's own repo). p2p scm.

/Tobi
Terry Jones
2013-06-04 20:55:19 UTC
Permalink
Post by Tobias Oberstein
So when the code is ready, the feature branch including any accumulated
commits (history) will
Post by Tobias Oberstein
get merged - and not a clean diff against the main repo?
I'm very far from being a git expert. In fact, I'm kind of the opposite -
git and I have a stormy relationship and everyone has to tell me what to do.

But, I believe this is what git rebase is mainly used for. You can rebase
your branch against an updated master and (I'm guessing) make your changes
look like a single diff. Some people don't like that as it changes history,
others do like it and say yes, that's the point - clean up the history so
the commit log isn't full of tiny changes that were all made in order to
effect some change (i.e., address a given ticket/issue).

I'm REALLY far from being a git pro, so someone else should confirm/correct
this.

Terry



On Tue, Jun 4, 2013 at 9:43 PM, Tobias Oberstein <
Post by Tobias Oberstein
Terry,
thanks alot for your detailed explanation of a workflow. For me, that
sounds reasonable and workable.
Post by Terry Jones
At some point everyone who's interested will have contributed to the
discussion, to the code, and signed off. Then you merge it, using the web
UI
So when the code is ready, the feature branch including any accumulated
commits (history) will get merged - and not a clean diff against the main
repo?
Just asking .. guess there are arguments for both approaches.
Post by Terry Jones
One point of difference that I don't know the best answer to: We tend to
each have our own fork of a repo, and to send pull requests into the repo
"owned" by the organization. Others (including Github >themselves) just
have one repo and anyone can make a branch in that repo and propose it for
merging into the master of the same repo. I think I prefer the former,
though it has a little more overhead and it >requires people to do a git
changes you want to track and pull in etc (via git remote update --prune).
+1 for the former (each has it's own repo). p2p scm.
/Tobias
_______________________________________________
Twisted-Python mailing list
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
Jonathan Ballet
2013-06-05 07:56:09 UTC
Permalink
Hi, just shiming in,
Post by Tobias Oberstein
Post by Tobias Oberstein
So when the code is ready, the feature branch including any accumulated
commits (history) will
Post by Tobias Oberstein
get merged - and not a clean diff against the main repo?
I'm very far from being a git expert. In fact, I'm kind of the opposite -
git and I have a stormy relationship and everyone has to tell me what to do.
But, I believe this is what git rebase is mainly used for. You can rebase
your branch against an updated master and (I'm guessing) make your changes
look like a single diff. Some people don't like that as it changes history,
others do like it and say yes, that's the point - clean up the history so
the commit log isn't full of tiny changes that were all made in order to
effect some change (i.e., address a given ticket/issue).
This is actually called a "squash" in Git terminology - Git has an
option called "--squash" for the "merge" command which precisely do
that. This is, FYI, part of the merge policy used by projects like
PostgreSQL for example [1]

I'm not sure we can exactly say it changes the history: a brand new
commit is actually created, which is the sum of all the commits from the
branch which is merged, but as I see it, it's as if someone else
commited this new feature, and branches become completely throwable in
the end.

I let the Git manual explain the squash feature (extract from "git help
merge"; the second sentence is probably the most useful):

--squash, --no-squash
Produce the working tree and index state as if a real merge
happened (except for the merge information), but do not actually
make a commit or move the HEAD, nor record $GIT_DIR/MERGE_HEAD
to cause the next git commit command to create a merge commit.
This allows you to create a single commit on top of the current
branch whose effect is the same as merging another branch (or
more in case of an octopus).

With --no-squash perform the merge and commit the result. This
option can be used to override --squash.


Jonathan


[1]: http://wiki.postgresql.org/wiki/Committing_with_Git
Post by Tobias Oberstein
I'm REALLY far from being a git pro, so someone else should confirm/correct
this.
Terry
meejah
2013-06-09 05:23:57 UTC
Permalink
Post by Jonathan Ballet
Post by Terry Jones
But, I believe this is what git rebase is mainly used for. You can
rebase your branch against an updated master and (I'm guessing)
make your changes look like a single diff. Some people don't like
that as it changes history, others do like it and say yes, that's
the point - clean up the history so the commit log isn't full of
tiny changes that were all made in order to effect some change
(i.e., address a given ticket/issue).
This is actually called a "squash" in Git terminology - Git has an
option called "--squash" for the "merge" command which precisely do
that.
You *can* use "git rebase" to re-write a branch to look like all the
commits were in one (or be more selective, like take one out and
squash three together) -- or you can use the --squash option Jonathan
mentions during an actual merge. Basically, you're rebasing a branch
onto itself -- instead of using rebase to change the branch
point. This latter is a much nicer replacement for what people using
Subversion would call "mering trunk back into my branch" and IMO
more-closely matches what you usually mean: please pretend I branched
off trunk more recently, as I'd really like all those changes now so I
can fix the conflicts...

The rebase way of squashing does re-write the commits. For fun times,
look into "git rebase --interactive" (or as this guy calls it, ``a bit
like git commit --amend hopped up on acid and holding a chainsaw''):

http://tomayko.com/writings/the-thing-about-git

- --
meejah

Craig Rodrigues
2013-06-04 19:09:28 UTC
Permalink
Hi,

I think moving to github will be a huge win for the Twisted project,
and all the migration/integration issues are manageable.

I would recommend you keep two things in mind:

(1) I am a member of the FreeBSD project, and am mentoring a Google Summer
of Code student.
I pushed the student to use the github mirror of the FreeBSD
repository: https://github.com/freebsd/freebsd
(unsupported officially by the FreeBSD project, but used by a lot of
people).
github worked great, but the only problem my GSoC student had was a
lot of RPC timeout errors
when doing "git clone" of the FreeBSD code, which is quite a bit.
The student is in New Delhi, India, so I don't know what the networking
connectivity to github from around the world is.
It was not a complete showstopper, because github allows you to click
a link to download a single zip file of the repository, and that
worked for him.
So keep this in mind if you have a lot of Twisted developers around
the world.


(2) Make sure you always have a "Plan B"/"Disaster Recovery" plan to get
the repo out of github.
It's not that critical, but something worth keeping in your back
pocket.
In the past, project hosting sites like Sourceforge were very
popular,
and then the fell out of favor for various reasons. Today, github
is very popular, but who knows what will happen in future.
If github works out in the long term, great, but if in future
something bad happens, Twisted should outlive github.

--
Craig
Tom Prince
2013-06-08 16:07:03 UTC
Permalink
When I first saw this, I was excited at the possibility of moving to git
(although this doesn't affect me, as I've been using git exclusively for months
already). On the other hand, I'm cautious about moving our workflow to github.

Although being able to comment on the diff inline is very convenient, my
experience is that this encourages looking at changes in a line-by-line fashion,
rather than looking at the overall design. find that having to compose the
entire review at once leads to a more thoughtful review. So, while it is
convenient, there is a cost to it as well.

Being able to see what comments have been addressed is handy, I usually find
myself opening all the hidden comments, either to see if the change made address
the comment or to provide more context on the current state of the change
(particularly if I wasn't the original reviewer).

While I understand the appeal of being able to merge with a single click (and
wouldn't be opposed to a tool that does this), I'm not sure that github's
implementation is desirable. I think there is value in composing meaningful
commit messages, for commits to trunk. While github supports this, it doesn't
encourage it. (I've been looking through buildbot's logs recently, and most
commits to master have the message "Merge branch '<branch-name>' of
git://github.com/<user>/buildbot"." Certainly some of this is social, I don't
think github provides any tools to help enforce this.

I'm not entirely sure how the hybrid workflow would make things easier. It seems
like one would need to look at two places for comments rather than just one;
even if all the comments on the code itself are on github, one will still need
to look at the history of the ticket to see any discussion of the design or
other consideration. Potentially more, if more than one person has worked on a
branch; unless everybody involved can push to the same repo, only a single
person can add commits to a specific pull request. For core developers, this
could just be the main repo, but for non-core developers (or when a core
developer takes over from an outside contributor), there will necessarily be
multiple pull requests for a single change.

I wonder how much of the issue that github solves could be addressed by other
means? Forcing a build is now two clicks from the ticket page, and diffs one. I
just discovered https://github.com/Automattic/trac-code-comments-plugin which
allows inline commenting. We could implement a tool to merge to trunk with a
properly formated commit message from the web. There is, of course, the question
of whether it worth the effort to implement this ourselves, when github exists.
That consideration has to be tempered with the fact that github imposes
restrictions on our workflow that seem to run counter to the philosophy of
twisted development.

Tom
Terry Jones
2013-06-08 23:41:40 UTC
Permalink
Hi Tom

Here are some comments on your thoughts (again, I'm no expert or authority).
Post by Tom Prince
Although being able to comment on the diff inline is very convenient, my
experience is that this encourages looking at changes in a line-by-line fashion,
rather than looking at the overall design. find that having to compose the
entire review at once leads to a more thoughtful review. So, while it is
convenient, there is a cost to it as well.
I agree with almost all of this, but not so much with the "cost" part. I
know there are many different kinds of tickets, but the majority (that I
see) fall into just a few categories that I have fairly well established
ways of working on (as a reviewer). 1. trivial fixes, which I tend to
review entirely in github. They usually have small/simple changes to
existing code and a small number of entirely new tests. 2. Addition of new
functionality that's not tirivial. These tend to involve mainly new code
and new tests, and again I'll usually do the whole review in github. 3.
More complicated changes that have required thought about the existing
code, its internal interactions, and its tests. I do superficial work on
these using github (commenting on style, suggesting alternate approaches to
local pieces of code, etc). Github makes this process hugely simpler and
faster. But in this case I also pull down the branch and git diff it
manually as well as going into files in the editor to consider changes more
carefully or to search for residual methods that may no longer be used or
method uses which are now no longer defined, etc. I put the result of this
reviewing into the Discussion tab in github. In all cases I make sure to
pull the branch locally and run the tests (except when I'm SURE I don't
need to, which is when there is ALWAYS a test failure :-)).

I.e., (summarizing/repeating myself) most of the time I do reviewing in
github and it's a clear win (simple / in context / no need to refer to the
code line or cut & paste, etc). But as you say some reviewing needs much
more care and thought, done with an editor, with grep, etc. The result of
that can go into the github discussion.
Post by Tom Prince
While I understand the appeal of being able to merge with a single click (and
wouldn't be opposed to a tool that does this), I'm not sure that github's
implementation is desirable. I think there is value in composing meaningful
commit messages, for commits to trunk. While github supports this, it doesn't
encourage it. (I've been looking through buildbot's logs recently, and most
commits to master have the message "Merge branch '<branch-name>' of
git://github.com/<user>/buildbot"." Certainly some of this is social, I don't
think github provides any tools to help enforce this.
Right, this has to be done by convention. I find it's helpful to write the
issue description with an eye towards the future merging and then to cut &
paste the issue description into the merge message and edit it before
merging. If you're conscious of that workflow you can write an issue
description whose first paragraph can easily become the merge description.
We also put the names (you can use @name) of the reviewers into the merge
(on a separate line, like "R: @name1 @name2") as well as the Fixes #NNNN
line. Often the merge descriptions would be just one line, as it's easy to
be (or become) lazy.
Post by Tom Prince
I'm not entirely sure how the hybrid workflow would make things easier. It seems
like one would need to look at two places for comments rather than just one;
even if all the comments on the code itself are on github, one will still need
to look at the history of the ticket to see any discussion of the design or
other consideration.
Do you mean 2 places within the one pull request? I.e., the Files Changed
and the Discussion tabs? If so, then I understand. I got used to that
pretty quickly. You can find more substantive discussion in one place
(including reviewers giving +1 or saying they need more time or asking if a
pull request should be withdrawn etc) and code-specific comments in the
Files Changed section. I find it very useful in the latter if the
original author makes sure they follow up on each suggestion in the Files
Changed section to say "Done" or "Wont do this...." etc. This helps a
returning reviewer to see that requested changes have been made without
needing to look at the code again.
Post by Tom Prince
Potentially more, if more than one person has worked on a
branch; unless everybody involved can push to the same repo, only a single
person can add commits to a specific pull request.
But anyone can comment / review. And if you happen to have code you want
to add to the branch but you don't have the right to push into that branch
(which we do only rarely), you can just make your own branch, submit a pull
request into the branch you're reviewing, and mention that in the review.
(Unless the Twisted process has changed, I think adding code to a branch
would then rule you out as an ongoing reviewer.)
Post by Tom Prince
For core developers, this
could just be the main repo, but for non-core developers (or when a core
developer takes over from an outside contributor), there will necessarily be
multiple pull requests for a single change.
I don't think this is the right way to do things. It makes more sense that
there is one pull request. Those who can/want/dare can push into its
branch. Those who cant but want to suggest other code can suggest their
code is pulled into the branch in question. Others can just put code into
their reviews - I do that often, just copy a chunk of Python, wrap it in
```python .... ``` and make a few suggested edits.
Post by Tom Prince
I wonder how much of the issue that github solves could be addressed by other
means? Forcing a build is now two clicks from the ticket page, and diffs one. I
just discovered https://github.com/Automattic/trac-code-comments-pluginwhich
allows inline commenting. We could implement a tool to merge to trunk with a
properly formated commit message from the web. There is, of course, the question
of whether it worth the effort to implement this ourselves, when github exists.
I don't think it makes sense to try writing these things. Github is great
and it moves so quickly. It's not perfect and it does leave a lot of things
to coding team convention, but it's very good. In my (painful) experience,
it's rarely worth writing your own stuff in a situation like this and
missing out on all the other goodness that is rapidly making its way into
the mainstream heavily used and very actively developed tools.
Post by Tom Prince
That consideration has to be tempered with the fact that github imposes
restrictions on our workflow that seem to run counter to the philosophy of
twisted development.
I'm not sure what these are. But, I'm barely involved in Twisted
development, so it's likely just ignorance.

Thanks for the comments, mine are just my own small sample experiences and
are probably sub-optimal and/or under-informed etc.

Terry
Loading...