threads / rfc / 20769

[RFC] teamGIT bonjour support

Subject: [RFC] teamGIT bonjour support

## tl;dr

10 messages between Aug 28, 2009 and Nov 20, 2009.

replies: 9people: 6as markdown or json

Abhijit Bhopatkar· Aug 28, 2009, 07:02 UTC · lore
Hi,
After a long pause in the development, i am back to drawing boards for teamGit.

Ever since i adopted git as my preferred version control system for my teams, I had this tough time keeping up with every one. Of course this is a GoodThing(TM) since this means pace of development is rather good. But it has its usual problems of forcing everyone to religiously publish _AND_ keep rebasing on main branch every so often. Also my major problem is that we discover conflicts only _after_ a developer tries to rebase his work, typically (by design) after he has fully coded and tested a feature.

The current way to get around this is shouting aloud before you start
working on a new feature/file/section.
However    a. this is not scalable
                b. pron to human errors
               c. pron to inhumane erros and after fights ;).
So in this regards, I have on my drawing boards a rough design to
1. Publish the current selected topic trees info on local lan.
2. Keep track of interesting topic branches and add alerts when
conflicts bet. selected trees reach alarming levels.
3. Possibly later add authentication mechanism to restrict access.

I plan to do this on LAN using bonjour service discovery, and rest completely being handled inside teamGIT running as a daemon(may be in widely abused systray?). (Git will handle actual fetch/conflict checking etc.) On a side note i also plan to generate daily reports and configurable notifications.

So I ask you people, is there a solution already cooking someplace? may be something i can integrate with teamGIT? (e.g. bonjour plugin for git dameon) Any thoughts or comment? Am i just too stupid to not manage it with documented company wide policies?

BAIN
John Tapsell· Aug 28, 2009, 08:05 UTC · re: Abhijit Bhopatkar · lore

Re: [RFC] teamGIT bonjour support

2009/8/28 Abhijit Bhopatkar <bain@devslashzero.com>:
Show 12 quoted lines
> Hi,
>
> After a long pause in the development, i am back to drawing boards for teamGit.
>
> Ever since i adopted git as my preferred version control system for my
> teams, I had this tough time keeping up with every one. Of course this
> is a GoodThing(TM) since this means pace of development is rather
> good. But it has its usual problems of forcing everyone to religiously
> publish _AND_ keep rebasing on main branch every so often. Also my
> major problem is that we discover conflicts only _after_ a developer
> tries to rebase his work, typically (by design) after he has fully
> coded and tested a feature.

What sort of time frame are you talking about? How long are your sprints, or however you partition your work.

I can't help but feel the problem should be solved elsewhere. Do you have daily scrums? Everyone should know, roughly, what everyone is doing. If you are using 2-3 week sprints (or however you partition the time) and everyone is roughly aware of what everyone else around them is doing, there shouldn't really be so much of a problem.

> The current way to get around this is shouting aloud before you start
> working on a new feature/file/section.

How do you allocate the features in the first place? At the start of a sprint? If so, it should be the person in charge of that that should see if there are going to be conflicts. If you don't have sprints, then how do you divide up tasks?

John
Abhijit Bhopatkar· Aug 28, 2009, 08:39 UTC · re: John Tapsell · lore

Re: [RFC] teamGIT bonjour support

Show 14 quoted lines
>> good. But it has its usual problems of forcing everyone to religiously
>> publish _AND_ keep rebasing on main branch every so often. Also my
>> major problem is that we discover conflicts only _after_ a developer
>> tries to rebase his work, typically (by design) after he has fully
>> coded and tested a feature.
>
> What sort of time frame are you talking about?  How long are your
> sprints, or however you partition your work.
>
> I can't help but feel the problem should be solved elsewhere.  Do you
> have daily scrums?  Everyone should know, roughly, what everyone is
> doing.  If you are using 2-3 week sprints (or however you partition
> the time) and everyone is roughly aware of what everyone else around
> them is doing, there shouldn't really be so much of a problem.

Well as i said in informal way we do shout out loud (managers: read as 'daily meetings') when we want to make changes that might conflict with some one else and i have been blessed with a rather good dev team who can spot this right, and it works well for now for these short sprints. However see below for my itch.

Show 7 quoted lines
>> The current way to get around this is shouting aloud before you start
>> working on a new feature/file/section.
>
> How do you allocate the features in the first place?  At the start of
> a sprint?  If so, it should be the person in charge of that that
> should see if there are going to be conflicts.  If you don't have
> sprints, then how do you divide up tasks?

Yes as i said this generally works. But and this is a big BUT, this essentially makes the developer the point of failure (in reporting the conflict). And in my view (exactly contrary to yours) the problem should be solved else where.

Also we are working on many porting projects which need changes to the same file but not essentially logically conflicting, which if, everyone is aware of at the moment the change is made (commited?) is trivial to resolve. However when you have 100 such changes at the end of a sprint thats a problem. Yes git makes it extremely easy to merge i can't even begin to think about the current style of development in svn deployment. And we can resolve those conflicts fairly easy. Its just that I have to depend then on individual's ability to persist through what seems like million merge conflicts. And no its not avoidable, we _have_ to do those conflicting changes in order to keep the pace of development. Its just about reporting them sanely and quickly which is ok to be done manually, but it pains me that the info can be available with some tool as well with obvious benifits of automation.

So the idea is sort of local linux-next style automation for small teams.
BAIN
> John
Ben Hoskings· Aug 28, 2009, 10:06 UTC · re: Abhijit Bhopatkar · lore

Re: [RFC] teamGIT bonjour support

On 28/08/2009, at 5:02 PM, Abhijit Bhopatkar wrote:
Show 10 quoted lines
> I plan to do this on LAN using bonjour service discovery, and rest
> completely being handled inside teamGIT running as a daemon(may be in
> widely abused systray?). (Git will handle actual fetch/conflict
> checking etc.)
> On a side note i also plan to generate daily reports and configurable
> notifications.
>
> So I ask you people, is there a solution already cooking someplace?
> may be something i can integrate with teamGIT? (e.g. bonjour plugin
> for git dameon)

You should check out bananajour, it sounds like it might fight the bill quite nicely:

http://github.com/toolmantim/bananajour

Written by Tim Lucas, and hacked on by a bunch of us at the Gold Coast, Australia Railscamp in May: http://railscamps.com/

The idea is that for each repo you want to publish, bananajour creates and looks after a locally stored remote, that you push to ("git push banana master") to publish your work over bonjour.

There's also a web interface at your-machine.local:9331 which shows the other bananas that were found (via bonjour) on the network. ['9331' is for 'peel' :) ]

I'm not sure what the state of Linux support is, since most of us run OS X, but I'm pretty sure someone was working on Linux/zeroconf support.

Cheers Ben Hoskings

Ben Hoskings· Aug 28, 2009, 10:17 UTC · re: Ben Hoskings · lore

Re: [RFC] teamGIT bonjour support

On 28/08/2009, at 8:06 PM, Ben Hoskings wrote:
> You should check out bananajour, it sounds like it might fight the  
> bill quite nicely:

I mean, _fit_ the bill. My fingers got stuck in the '*ight' rhythm, I guess. :)

Ben
Jakub Narebski· Aug 28, 2009, 10:22 UTC · re: Abhijit Bhopatkar · lore

Re: [RFC] teamGIT bonjour support

Abhijit Bhopatkar <bain@devslashzero.com> writes:
> So I ask you people, is there a solution already cooking someplace?
> may be something i can integrate with teamGIT? (e.g. bonjour plugin
> for git dameon)
There is gitjour:
  http://rubyforge.org/projects/gitjour
  http://github.com/chad/gitjour
-- 
Jakub Narebski
Poland
ShadeHawk on #git
Abhijit Bhopatkar· Aug 28, 2009, 13:07 UTC · re: Jakub Narebski · lore

Re: [RFC] teamGIT bonjour support

2009/8/28 Jakub Narebski <jnareb@gmail.com>:
Show 9 quoted lines
> Abhijit Bhopatkar <bain@devslashzero.com> writes:
>
>> So I ask you people, is there a solution already cooking someplace?
>> may be something i can integrate with teamGIT? (e.g. bonjour plugin
>> for git dameon)
>
> There is gitjour:
>  http://rubyforge.org/projects/gitjour
>  http://github.com/chad/gitjour

Hmm... almost perfect, except i don't want to depend on ruby to be installed on the target machine. Sigh!

BAIN
Petr Baudis· Nov 20, 2009, 09:05 UTC · re: Abhijit Bhopatkar · lore

Re: [RFC] teamGIT bonjour support

  Hi!
On Fri, Aug 28, 2009 at 12:32:39PM +0530, Abhijit Bhopatkar wrote:
> I plan to do this on LAN using bonjour service discovery

I wonder why so much emphasis for this? It seems like a nifty convenience bit, but I don't think making this idea too central is any good. What if you get a second office at the other end of the world? What if part of your team is working on a deployment at customer site? What if part of your team works from home over a VPN? What if your team is collaborating over the internet on an open project? What if...?

That said, it sounds like a great idea to have let's say a post-commit hook that will start an upload job:

	extbranch="$(whoami)/$(git symbolic-ref HEAD | sed 's#refs/heads/##')"
	pushurl="$(melting_pot)"
	git push --force "$pushurl" "HEAD:$extbranch" >/dev/null &

(untested, +corner cases). On the server side, cronjob or post-update hook can do the integration testing. The complete setup should be a matter of few-minutes hack.

Now, it seems totally irrelevant if melting_pot is
	melting_pot() { git config teamgit.meltingpot }
or extra code that tries/caches some local discovery first.

P.S.: It's not clear if you want the information sharing with commit granularity or less - in that case, things might get rather tricky e.g. if you add new files and don't git add them until right before you commit, and the work tree state might be total mess anyway.

P.P.S.: It's not clear if you strive after complete de-centralization of the service, with no central melting pot. That would seem fancy, but I think rather useless and hard in practice to arrange your reports that you want, etc. It's not clear again then if the integration testing should happen on single machine they all vote on (samba-like), or if all machines should do integration-testing, and whether of all branches or only some of them, and how to recognize the interesting branches, and things are getting very hairy already... Your requirements are too ambiguous.

-- 
				Petr "Pasky" Baudis
A lot of people have my books on their bookshelves.
That's the problem, they need to read them. -- Don Knuth
Petr Baudis· Nov 20, 2009, 09:12 UTC · re: Petr Baudis · lore

Re: [RFC] teamGIT bonjour support

On Fri, Nov 20, 2009 at 10:05:30AM +0100, Petr Baudis wrote:
Show 16 quoted lines
>   Hi!
> 
> On Fri, Aug 28, 2009 at 12:32:39PM +0530, Abhijit Bhopatkar wrote:
> > I plan to do this on LAN using bonjour service discovery
> 
> I wonder why so much emphasis for this? It seems like a nifty
> convenience bit, but I don't think making this idea too central is any
> good. What if you get a second office at the other end of the world?
> What if part of your team is working on a deployment at customer site?
> What if part of your team works from home over a VPN?  What if your
> team is collaborating over the internet on an open project?  What if...?
> 
> That said, it sounds like a great idea to have let's say a post-commit
> hook that will start an upload job:
> 
> 	extbranch="$(whoami)/$(git symbolic-ref HEAD | sed 's#refs/heads/##')"
Thanks to sitaram, now I know that probably the best way is:
  	extbranch="$(whoami)/$(git describe --contains --all HEAD)"
	
(But now you *really* need to check if HEAD is a heads ref first or you
will push out to something totally bogus.)

P.S.: Heh, I would never guess what that git describe command already does, talk about intuitiveness. ;-) (Of course, when you know exactly what the switches do, it totally makes sense.)

-- 
				Petr "Pasky" Baudis
A lot of people have my books on their bookshelves.
That's the problem, they need to read them. -- Don Knuth
Björn Steinbrink· Nov 20, 2009, 09:49 UTC · re: Petr Baudis · lore

Re: [RFC] teamGIT bonjour support

On 2009.11.20 10:12:09 +0100, Petr Baudis wrote:
Show 24 quoted lines
> On Fri, Nov 20, 2009 at 10:05:30AM +0100, Petr Baudis wrote:
> >   Hi!
> > 
> > On Fri, Aug 28, 2009 at 12:32:39PM +0530, Abhijit Bhopatkar wrote:
> > > I plan to do this on LAN using bonjour service discovery
> > 
> > I wonder why so much emphasis for this? It seems like a nifty
> > convenience bit, but I don't think making this idea too central is any
> > good. What if you get a second office at the other end of the world?
> > What if part of your team is working on a deployment at customer site?
> > What if part of your team works from home over a VPN?  What if your
> > team is collaborating over the internet on an open project?  What if...?
> > 
> > That said, it sounds like a great idea to have let's say a post-commit
> > hook that will start an upload job:
> > 
> > 	extbranch="$(whoami)/$(git symbolic-ref HEAD | sed 's#refs/heads/##')"
> 
> Thanks to sitaram, now I know that probably the best way is:
> 
>   	extbranch="$(whoami)/$(git describe --contains --all HEAD)"
> 	
> (But now you *really* need to check if HEAD is a heads ref first or you
> will push out to something totally bogus.)

Hm, I'd go for: $(whoami)/$(git rev-parse --symbolic-full-name HEAD | sed s,refs/heads/,,)

gives the shortname of the checked out branch head, or HEAD when you're on a detached HEAD.

Bjoern ;-)

← back to recent threads