Re: [COMMITTERS] pgsql: Branch refs/heads/REL9_1_STABLE was removed

Поиск
Список
Период
Сортировка
Искать

Re: [COMMITTERS] pgsql: Branch refs/heads/REL9_1_STABLE was removed

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Magnus Hagander  writes:
> We discussed earlier to potentially block the creation, and removal,
> of branches on the origin server, to prevent mistakes like this. It
> has only happened once in almost a year, so it's probably not
> necessary - but I wanted to raise the option anyway in case people
> forgot about it.

> The downside would be that in order to create or drop a branch *when
> intended* a committer would need someone from the infrastructure team
> to temporarily switch off the branch-blocking setting, and then back
> on..

I think it would be sensible to block branch removal, as there's
basically never a scenario where we'd do that during current usage.
I'm not excited about blocking branch addition, although I worry
sooner or later somebody will accidentally push a private development
branch :-(.  Is it possible to block only removal and not addition?
		regards, tom lane

Re: [COMMITTERS] pgsql: Branch refs/heads/REL9_1_STABLE was removed

От:
Magnus Hagander <magnus@hagander.net>
Дата:
On Tue, Jun 28, 2011 at 16:39, Tom Lane  wrote:
> Magnus Hagander  writes:
>> We discussed earlier to potentially block the creation, and removal,
>> of branches on the origin server, to prevent mistakes like this. It
>> has only happened once in almost a year, so it's probably not
>> necessary - but I wanted to raise the option anyway in case people
>> forgot about it.
>
>> The downside would be that in order to create or drop a branch *when
>> intended* a committer would need someone from the infrastructure team
>> to temporarily switch off the branch-blocking setting, and then back
>> on..
>
> I think it would be sensible to block branch removal, as there's
> basically never a scenario where we'd do that during current usage.
> I'm not excited about blocking branch addition, although I worry
> sooner or later somebody will accidentally push a private development
> branch :-(.  Is it possible to block only removal and not addition?

Yes, I think so. Either way it'll require a small addition to the
scripts we're using, so I'll try to just turn it into two different
settings. I don't see offhand any reason why this shouldn't work.


-- 
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

Re: [COMMITTERS] pgsql: Branch refs/heads/REL9_1_STABLE was removed

От:
Andrew Dunstan <andrew@dunslane.net>
Дата:


On 06/28/2011 10:39 AM, Tom Lane wrote:
> Magnus Hagander  writes:
>> We discussed earlier to potentially block the creation, and removal,
>> of branches on the origin server, to prevent mistakes like this. It
>> has only happened once in almost a year, so it's probably not
>> necessary - but I wanted to raise the option anyway in case people
>> forgot about it.
>> The downside would be that in order to create or drop a branch *when
>> intended* a committer would need someone from the infrastructure team
>> to temporarily switch off the branch-blocking setting, and then back
>> on..
> I think it would be sensible to block branch removal, as there's
> basically never a scenario where we'd do that during current usage.
> I'm not excited about blocking branch addition, although I worry
> sooner or later somebody will accidentally push a private development
> branch :-(.  Is it possible to block only removal and not addition?
>
> 			

+1. Spurious branch addition shouldn't cause us much pain - we'd just 
remove the new branch. Unwanted deletion is more disruptive.

cheers

andrew

Re: [COMMITTERS] pgsql: Branch refs/heads/REL9_1_STABLE was removed

От:
Robert Haas <robertmhaas@gmail.com>
Дата:
On Tue, Jun 28, 2011 at 11:05 AM, Andrew Dunstan  wrote:
> +1. Spurious branch addition shouldn't cause us much pain - we'd just remove
> the new branch. Unwanted deletion is more disruptive.

How about if we allow addition only of branches matching
/^REL_[0-9_]+_STABLE$/ and disallow deletion of all branches?  That
seems like it'd allow the one operation we will likely want to do with
any regularity (creating a new release branch once a year) without
going through hoops, while disallowing most of the problem cases.

The problem with allowing people to create branches and not remove
them is that someone might push a private branch and not be able to
get rid of it.  But if we only allow creation of branches that look
like the branches that are supposed to be there, then that shouldn't
be a danger.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

Re: [COMMITTERS] pgsql: Branch refs/heads/REL9_1_STABLE was removed

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Robert Haas  writes:
> How about if we allow addition only of branches matching
> /^REL_[0-9_]+_STABLE$/ and disallow deletion of all branches?

+1, if feasible.
		regards, tom lane

Re: [COMMITTERS] pgsql: Branch refs/heads/REL9_1_STABLE was removed

От:
Magnus Hagander <magnus@hagander.net>
Дата:


On Jun 28, 2011 6:29 PM, "Tom Lane" <tgl@sss.pgh.pa.us> wrote:
>
> Robert Haas <robertmhaas@gmail.com> writes:
> > How about if we allow addition only of branches matching
> > /^REL_[0-9_]+_STABLE$/ and disallow deletion of all branches?
>
> +1, if feasible.
>

Pretty sure that's just a Small Matter Of Programming. I'll give it a try.

/Magnus

Re: [COMMITTERS] pgsql: Branch refs/heads/REL9_1_STABLE was removed

От:
Alvaro Herrera <alvherre@commandprompt.com>
Дата:
Excerpts from Tom Lane's message of mar jun 28 10:39:22 -0400 2011:

> I think it would be sensible to block branch removal, as there's
> basically never a scenario where we'd do that during current usage.
> I'm not excited about blocking branch addition, although I worry
> sooner or later somebody will accidentally push a private development
> branch :-(.  Is it possible to block only removal and not addition?

If we can tweak the thing, how about we only allow creating branches
that match a certain pattern, say ^REL_\d+_\d+_STABLE$?

-- 
Álvaro Herrera 
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

Re: [COMMITTERS] pgsql: Branch refs/heads/REL9_1_STABLE was removed

От:
Magnus Hagander <magnus@hagander.net>
Дата:
On Tue, Jun 28, 2011 at 19:45, Alvaro Herrera
 wrote:
> Excerpts from Tom Lane's message of mar jun 28 10:39:22 -0400 2011:
>
>> I think it would be sensible to block branch removal, as there's
>> basically never a scenario where we'd do that during current usage.
>> I'm not excited about blocking branch addition, although I worry
>> sooner or later somebody will accidentally push a private development
>> branch :-(.  Is it possible to block only removal and not addition?
>
> If we can tweak the thing, how about we only allow creating branches
> that match a certain pattern, say ^REL_\d+_\d+_STABLE$?

I've put this in place - except I used ^REL\d+... and not what you
suggested, since that's how we name our branches :P

I'm going to push an actual valid branch, let's say 9.7, and then
remove it again, just to make sure things worked (with it installed I
cannot push an invalid branch, so i can't test the branch removal
block). So don't panic if you see that one :)

-- 
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

Re: [COMMITTERS] pgsql: Branch refs/heads/REL9_1_STABLE was removed

От:
Magnus Hagander <magnus@hagander.net>
Дата:
On Wed, Jun 29, 2011 at 16:30, Magnus Hagander  wrote:
> On Tue, Jun 28, 2011 at 19:45, Alvaro Herrera
>  wrote:
>> Excerpts from Tom Lane's message of mar jun 28 10:39:22 -0400 2011:
>>
>>> I think it would be sensible to block branch removal, as there's
>>> basically never a scenario where we'd do that during current usage.
>>> I'm not excited about blocking branch addition, although I worry
>>> sooner or later somebody will accidentally push a private development
>>> branch :-(.  Is it possible to block only removal and not addition?
>>
>> If we can tweak the thing, how about we only allow creating branches
>> that match a certain pattern, say ^REL_\d+_\d+_STABLE$?
>
> I've put this in place - except I used ^REL\d+... and not what you
> suggested, since that's how we name our branches :P
>
> I'm going to push an actual valid branch, let's say 9.7, and then
> remove it again, just to make sure things worked (with it installed I
> cannot push an invalid branch, so i can't test the branch removal
> block). So don't panic if you see that one :)

Ok, I'm done experimenting and this is now in production.

-- 
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

Re: [COMMITTERS] pgsql: Branch refs/heads/REL9_1_STABLE was removed

От:
Alvaro Herrera <alvherre@commandprompt.com>
Дата:
Excerpts from Magnus Hagander's message of mié jun 29 10:30:51 -0400 2011:
> On Tue, Jun 28, 2011 at 19:45, Alvaro Herrera
>  wrote:
> > Excerpts from Tom Lane's message of mar jun 28 10:39:22 -0400 2011:
> >
> >> I think it would be sensible to block branch removal, as there's
> >> basically never a scenario where we'd do that during current usage.
> >> I'm not excited about blocking branch addition, although I worry
> >> sooner or later somebody will accidentally push a private development
> >> branch :-(.  Is it possible to block only removal and not addition?
> >
> > If we can tweak the thing, how about we only allow creating branches
> > that match a certain pattern, say ^REL_\d+_\d+_STABLE$?
> 
> I've put this in place - except I used ^REL\d+... and not what you
> suggested, since that's how we name our branches :P

Hah!  It took me a while to notice the difference :-D

Thanks!  I know I feel safer with this in place :-P

-- 
Álvaro Herrera 
The PostgreSQL Company - Command Prompt, Inc.
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

Re: [COMMITTERS] pgsql: Branch refs/heads/REL9_1_STABLE was removed

От:
Michael Paquier <michael.paquier@gmail.com>
Дата:

On Thu, Jun 30, 2011 at 12:03 AM, Alvaro Herrera <alvherre@commandprompt.com> wrote:
Excerpts from Magnus Hagander's message of mié jun 29 10:30:51 -0400 2011:
> On Tue, Jun 28, 2011 at 19:45, Alvaro Herrera
> <alvherre@commandprompt.com> wrote:
> > Excerpts from Tom Lane's message of mar jun 28 10:39:22 -0400 2011:
> >
> >> I think it would be sensible to block branch removal, as there's
> >> basically never a scenario where we'd do that during current usage.
> >> I'm not excited about blocking branch addition, although I worry
> >> sooner or later somebody will accidentally push a private development
> >> branch :-(.  Is it possible to block only removal and not addition?
> >
> > If we can tweak the thing, how about we only allow creating branches
> > that match a certain pattern, say ^REL_\d+_\d+_STABLE$?
>
> I've put this in place - except I used ^REL\d+... and not what you
> suggested, since that's how we name our branches :P
Thanks, +10.
This is cool and will avoid for sure future problems.

--
Michael Paquier
http://michael.otacoo.com
FAQ