Thread: [pgsql-www] Failed to make v10 branch: gitmaster push hook needs adjustment

So I just tried to make the v10 branch, and was given the raspberry:

$ git push origin master:refs/heads/REL_10_STABLE
Total 0 (delta 0), reused 0 (delta 0)
remote: Branch refs/heads/REL_10_STABLE violates the policy: Branch name does not match allowed regexp
remote: error: hook declined to update refs/heads/REL_10_STABLE
To ssh://git@gitmaster.postgresql.org/postgresql.git! [remote rejected] master -> REL_10_STABLE (hook declined)
error: failed to push some refs to 'ssh://git@gitmaster.postgresql.org/postgresql.git'

Presumably, there's some bit of logic there that's expecting two numeric
portions and no underscore just after REL.  Somebody please update it to
expect the format REL_\d+_STABLE for future branch names.
        regards, tom lane



Re: [pgsql-www] Failed to make v10 branch: gitmaster push hook needs adjustment

From
Magnus Hagander
Date:


On Mon, Aug 14, 2017 at 11:37 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
So I just tried to make the v10 branch, and was given the raspberry:

$ git push origin master:refs/heads/REL_10_STABLE
Total 0 (delta 0), reused 0 (delta 0)
remote: Branch refs/heads/REL_10_STABLE violates the policy: Branch name does not match allowed regexp
remote: error: hook declined to update refs/heads/REL_10_STABLE
To ssh://git@gitmaster.postgresql.org/postgresql.git
 ! [remote rejected] master -> REL_10_STABLE (hook declined)
error: failed to push some refs to 'ssh://git@gitmaster.postgresql.org/postgresql.git'

Presumably, there's some bit of logic there that's expecting two numeric
portions and no underscore just after REL.  Somebody please update it to
expect the format REL_\d+_STABLE for future branch names.

That's indeed an oops. Forgot about that one.

Hook config updated, please try again.
 
--
Magnus Hagander <magnus@hagander.net> writes:
> On Mon, Aug 14, 2017 at 11:37 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Presumably, there's some bit of logic there that's expecting two numeric
>> portions and no underscore just after REL.  Somebody please update it to
>> expect the format REL_\d+_STABLE for future branch names.

> That's indeed an oops. Forgot about that one.
> Hook config updated, please try again.

Worked this time, thanks!
        regards, tom lane



Re: [pgsql-www] Failed to make v10 branch: gitmaster push hook needsadjustment

From
Andres Freund
Date:
On 2017-08-14 17:37:32 -0400, Tom Lane wrote:
> So I just tried to make the v10 branch, and was given the raspberry:
> 
> $ git push origin master:refs/heads/REL_10_STABLE
> Total 0 (delta 0), reused 0 (delta 0)
> remote: Branch refs/heads/REL_10_STABLE violates the policy: Branch name does not match allowed regexp
> remote: error: hook declined to update refs/heads/REL_10_STABLE
> To ssh://git@gitmaster.postgresql.org/postgresql.git
>  ! [remote rejected] master -> REL_10_STABLE (hook declined)
> error: failed to push some refs to 'ssh://git@gitmaster.postgresql.org/postgresql.git'
> 
> Presumably, there's some bit of logic there that's expecting two numeric
> portions and no underscore just after REL.  Somebody please update it to
> expect the format REL_\d+_STABLE for future branch names.

Same problem also seems to exist in the buildfarm server...

Query for: stage=OK&animal=calliphoridae&ts=1502750274
Target: http://www.pgbuildfarm.org/cgi-bin/pgstatus.pl/$hash
Status Line: 492 Unknown code
Content: 
bad branch parameter REL_10_STABLE

Greetings,

Andres Freund



Re: [pgsql-www] Failed to make v10 branch: gitmaster push hook needs adjustment

From
Andrew Dunstan
Date:
I am unfortunately away for about a week. Perhaps Stephen Frost can help with any emergency patches to the server

Sent from my iPhone

> On Aug 14, 2017, at 6:59 PM, Andres Freund <andres@anarazel.de> wrote:
>
>> On 2017-08-14 17:37:32 -0400, Tom Lane wrote:
>> So I just tried to make the v10 branch, and was given the raspberry:
>>
>> $ git push origin master:refs/heads/REL_10_STABLE
>> Total 0 (delta 0), reused 0 (delta 0)
>> remote: Branch refs/heads/REL_10_STABLE violates the policy: Branch name does not match allowed regexp
>> remote: error: hook declined to update refs/heads/REL_10_STABLE
>> To ssh://git@gitmaster.postgresql.org/postgresql.git
>> ! [remote rejected] master -> REL_10_STABLE (hook declined)
>> error: failed to push some refs to 'ssh://git@gitmaster.postgresql.org/postgresql.git'
>>
>> Presumably, there's some bit of logic there that's expecting two numeric
>> portions and no underscore just after REL.  Somebody please update it to
>> expect the format REL_\d+_STABLE for future branch names.
>
> Same problem also seems to exist in the buildfarm server...
>
> Query for: stage=OK&animal=calliphoridae&ts=1502750274
> Target: http://www.pgbuildfarm.org/cgi-bin/pgstatus.pl/$hash
> Status Line: 492 Unknown code
> Content:
> bad branch parameter REL_10_STABLE
>
> Greetings,
>
> Andres Freund



Re: [pgsql-www] Failed to make v10 branch: gitmaster push hook needsadjustment

From
Andres Freund
Date:
Hi,

On 2017-08-14 19:09:23 -0400, Andrew Dunstan wrote:
> > On Aug 14, 2017, at 6:59 PM, Andres Freund <andres@anarazel.de> wrote:
> > 
> >> On 2017-08-14 17:37:32 -0400, Tom Lane wrote:
> >> So I just tried to make the v10 branch, and was given the raspberry:
> >> 
> >> $ git push origin master:refs/heads/REL_10_STABLE
> >> Total 0 (delta 0), reused 0 (delta 0)
> >> remote: Branch refs/heads/REL_10_STABLE violates the policy: Branch name does not match allowed regexp
> >> remote: error: hook declined to update refs/heads/REL_10_STABLE
> >> To ssh://git@gitmaster.postgresql.org/postgresql.git
> >> ! [remote rejected] master -> REL_10_STABLE (hook declined)
> >> error: failed to push some refs to 'ssh://git@gitmaster.postgresql.org/postgresql.git'
> >> 
> >> Presumably, there's some bit of logic there that's expecting two numeric
> >> portions and no underscore just after REL.  Somebody please update it to
> >> expect the format REL_\d+_STABLE for future branch names.
> > 
> > Same problem also seems to exist in the buildfarm server...
> > 
> > Query for: stage=OK&animal=calliphoridae&ts=1502750274
> > Target: http://www.pgbuildfarm.org/cgi-bin/pgstatus.pl/$hash
> > Status Line: 492 Unknown code
> > Content: 
> > bad branch parameter REL_10_STABLE

> I am unfortunately away for about a week. Perhaps Stephen Frost can help with any emergency patches to the server 

Stephen? Any chance to relax the restriction here? It'd be somewhat bad
if we didn't have pg 10 buildfarm coverage over the next few days...

Greetings,

Andres Freund



Andres Freund <andres@anarazel.de> writes:
> On 2017-08-14 19:09:23 -0400, Andrew Dunstan wrote:
>> I am unfortunately away for about a week. Perhaps Stephen Frost can help with any emergency patches to the server

> Stephen? Any chance to relax the restriction here? It'd be somewhat bad
> if we didn't have pg 10 buildfarm coverage over the next few days...

In addition to just allowing submissions for v10, it'd be great if
we could get the list of active branches for run_branches.pl updated,
so that the critters with non-manually-maintained branch lists start
doing the right thing.

(Maybe that's the exact same thing, in which case nevermind.)
        regards, tom lane



Re: [pgsql-www] Failed to make v10 branch: gitmaster push hook needs adjustment

From
Stephen Frost
Date:
Tom, all,

On Mon, Aug 14, 2017 at 19:21 Tom Lane <tgl@sss.pgh.pa.us> wrote:
Andres Freund <andres@anarazel.de> writes:
> On 2017-08-14 19:09:23 -0400, Andrew Dunstan wrote:
>> I am unfortunately away for about a week. Perhaps Stephen Frost can help with any emergency patches to the server

> Stephen? Any chance to relax the restriction here? It'd be somewhat bad
> if we didn't have pg 10 buildfarm coverage over the next few days...

In addition to just allowing submissions for v10, it'd be great if
we could get the list of active branches for run_branches.pl updated,
so that the critters with non-manually-maintained branch lists start
doing the right thing.

(Maybe that's the exact same thing, in which case nevermind.)

I can certainly patch servers if needed. I'll be back to a keyboard in about 10m, tho I am at a loss as to what exactly needs doing here..?

I'll try to find the rest of the thread when I reach a real computer. 

Thanks!

Stephen

Re: [pgsql-www] Failed to make v10 branch: gitmaster push hook needsadjustment

From
Andres Freund
Date:
Hi,

On 2017-08-14 23:28:21 +0000, Stephen Frost wrote:
> Tom, all,
> 
> On Mon, Aug 14, 2017 at 19:21 Tom Lane <tgl@sss.pgh.pa.us> wrote:
> 
> > Andres Freund <andres@anarazel.de> writes:
> > > On 2017-08-14 19:09:23 -0400, Andrew Dunstan wrote:
> > >> I am unfortunately away for about a week. Perhaps Stephen Frost can
> > help with any emergency patches to the server
> >
> > > Stephen? Any chance to relax the restriction here? It'd be somewhat bad
> > > if we didn't have pg 10 buildfarm coverage over the next few days...
> >
> > In addition to just allowing submissions for v10, it'd be great if
> > we could get the list of active branches for run_branches.pl updated,
> > so that the critters with non-manually-maintained branch lists start
> > doing the right thing.
> >
> > (Maybe that's the exact same thing, in which case nevermind.)
> 
> 
> I can certainly patch servers if needed. I'll be back to a keyboard in
> about 10m, tho I am at a loss as to what exactly needs doing here..?
> 
> I'll try to find the rest of the thread when I reach a real computer.

Based on a quick look it seems the error is triggered by
https://github.com/PGBuildFarm/server-code/blob/master/cgi-bin/pgstatus.pl

There appear to be two levels of checks here. First:

if (open($brhandle,"../htdocs/branches_of_interest.txt"))
{   my @branches_of_interest = <$brhandle>;   close($brhandle);   chomp(@branches_of_interest);   unless (grep {$_ eq
$branch}@branches_of_interest)   {       print         "Status: 492 bad branch parameter $branch\n",
"Content-Type:text/plain\n\n",         "bad branch parameter $branch\n";       exit;   }
 
}

so that file needs to be updated.

Secondly there's:
unless ($branch =~ /^(HEAD|REL\d+_\d+_STABLE)$/)
{   print     "Status: 492 bad branch parameter $branch\nContent-Type: text/plain\n\n",     "bad branch parameter
$branch\n";  exit;
 
}

which needs its regex adjusted... Based on a quick look preliminarily it
seems to be ok to just make the first \d+ optional (i.e. (\d+)?).

Greetings,

Andres Freund



Re: [pgsql-www] Failed to make v10 branch: gitmaster push hook needsadjustment

From
Stephen Frost
Date:
Andres,

* Andres Freund (andres@anarazel.de) wrote:
> On 2017-08-14 23:28:21 +0000, Stephen Frost wrote:
> > On Mon, Aug 14, 2017 at 19:21 Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > > Andres Freund <andres@anarazel.de> writes:
> > > > On 2017-08-14 19:09:23 -0400, Andrew Dunstan wrote:
> > > >> I am unfortunately away for about a week. Perhaps Stephen Frost can
> > > help with any emergency patches to the server
> > >
> > > > Stephen? Any chance to relax the restriction here? It'd be somewhat bad
> > > > if we didn't have pg 10 buildfarm coverage over the next few days...
> > >
> > > In addition to just allowing submissions for v10, it'd be great if
> > > we could get the list of active branches for run_branches.pl updated,
> > > so that the critters with non-manually-maintained branch lists start
> > > doing the right thing.
> > >
> > > (Maybe that's the exact same thing, in which case nevermind.)
> >
> >
> > I can certainly patch servers if needed. I'll be back to a keyboard in
> > about 10m, tho I am at a loss as to what exactly needs doing here..?
> >
> > I'll try to find the rest of the thread when I reach a real computer.
>
> Based on a quick look it seems the error is triggered by
> https://github.com/PGBuildFarm/server-code/blob/master/cgi-bin/pgstatus.pl
>
> There appear to be two levels of checks here. First:

Thanks much.  Yes, makes sense that branches_of_interest would need
updating.  I can do that here shortly (Andrew- I recall updating this
previously in an incorrect way, any suggestions or tips about the
correct approach...?).

> Secondly there's:
> unless ($branch =~ /^(HEAD|REL\d+_\d+_STABLE)$/)
> {
>     print
>       "Status: 492 bad branch parameter $branch\nContent-Type: text/plain\n\n",
>       "bad branch parameter $branch\n";
>     exit;
> }
>
> which needs its regex adjusted... Based on a quick look preliminarily it
> seems to be ok to just make the first \d+ optional (i.e. (\d+)?).

Ah, yeah, that also makes sense.  Andrew, I can certainly update that
in-place on the server, but I'm not sure if I can update the canonical
git repo.  Just to verify- you'll do the same update in the git repo
before pushing your next code update...?

Thanks!

Stephen

Re: [pgsql-www] Failed to make v10 branch: gitmaster push hook needsadjustment

From
Stephen Frost
Date:
Andrew, Tom, Andrew,

* Andres Freund (andres@anarazel.de) wrote:
> On 2017-08-14 23:28:21 +0000, Stephen Frost wrote:
> > On Mon, Aug 14, 2017 at 19:21 Tom Lane <tgl@sss.pgh.pa.us> wrote:
> > > Andres Freund <andres@anarazel.de> writes:
> > > > On 2017-08-14 19:09:23 -0400, Andrew Dunstan wrote:
> > > >> I am unfortunately away for about a week. Perhaps Stephen Frost can
> > > help with any emergency patches to the server
> > >
> > > > Stephen? Any chance to relax the restriction here? It'd be somewhat bad
> > > > if we didn't have pg 10 buildfarm coverage over the next few days...
> > >
> > > In addition to just allowing submissions for v10, it'd be great if
> > > we could get the list of active branches for run_branches.pl updated,
> > > so that the critters with non-manually-maintained branch lists start
> > > doing the right thing.
> > >
> > > (Maybe that's the exact same thing, in which case nevermind.)
> >
> >
> > I can certainly patch servers if needed. I'll be back to a keyboard in
> > about 10m, tho I am at a loss as to what exactly needs doing here..?
> >
> > I'll try to find the rest of the thread when I reach a real computer.
>
> Based on a quick look it seems the error is triggered by
> https://github.com/PGBuildFarm/server-code/blob/master/cgi-bin/pgstatus.pl
>
> There appear to be two levels of checks here. First:
>
> if (open($brhandle,"../htdocs/branches_of_interest.txt"))
> {
>     my @branches_of_interest = <$brhandle>;
>     close($brhandle);
>     chomp(@branches_of_interest);
>     unless (grep {$_ eq $branch} @branches_of_interest)
>     {
>         print
>           "Status: 492 bad branch parameter $branch\n",
>           "Content-Type: text/plain\n\n",
>           "bad branch parameter $branch\n";
>         exit;
>     }
> }
>
> so that file needs to be updated.

Done.

> Secondly there's:
> unless ($branch =~ /^(HEAD|REL\d+_\d+_STABLE)$/)
> {
>     print
>       "Status: 492 bad branch parameter $branch\nContent-Type: text/plain\n\n",
>       "bad branch parameter $branch\n";
>     exit;
> }
>
> which needs its regex adjusted... Based on a quick look preliminarily it
> seems to be ok to just make the first \d+ optional (i.e. (\d+)?).

Done.

Let's see what happens...  I'm around for the next few hours if things
go south.

Thanks!

Stephen

Re: [pgsql-www] Failed to make v10 branch: gitmaster push hook needsadjustment

From
Stephen Frost
Date:
* Stephen Frost (sfrost@snowman.net) wrote:
> Andrew, Tom, Andrew,

Errrrrr, *Andres*, Tom, Andrew...

Apologies.

Thanks!

Stephen

Stephen Frost <sfrost@snowman.net> writes:
> Let's see what happens...  I'm around for the next few hours if things
> go south.

Looks like the basic reporting loop is working, but the dashboard
web page is putting REL_10_STABLE at the bottom :-(.  We can live
with that till Andrew returns from vacation, though.  Thanks!
        regards, tom lane



Re: [pgsql-www] Failed to make v10 branch: gitmaster push hook needsadjustment

From
Stephen Frost
Date:
Tom,

* Tom Lane (tgl@sss.pgh.pa.us) wrote:
> Stephen Frost <sfrost@snowman.net> writes:
> > Let's see what happens...  I'm around for the next few hours if things
> > go south.
>
> Looks like the basic reporting loop is working, but the dashboard
> web page is putting REL_10_STABLE at the bottom :-(.  We can live
> with that till Andrew returns from vacation, though.  Thanks!

Yeah, Andres and I were just chatting about that on IRC.  I think that's
the general consensus- wait until Andrew gets back to address it.  Looks
like it might be due to the UTF-8 collation that the database is set to.

Thanks!

Stephen

Re: [pgsql-www] Failed to make v10 branch: gitmaster push hook needsadjustment

From
Andres Freund
Date:
On 2017-08-14 20:35:14 -0400, Tom Lane wrote:
> Stephen Frost <sfrost@snowman.net> writes:
> > Let's see what happens...  I'm around for the next few hours if things
> > go south.
> 
> Looks like the basic reporting loop is working, but the dashboard
> web page is putting REL_10_STABLE at the bottom :-(.  We can live
> with that till Andrew returns from vacation, though.  Thanks!

Yep, we're discussing that just now on IRC. Looks like a collation
issue. That's probably why it works on perl side stuff, but not sql
ordered things. At least that's my theory :P.

On the buildfarm clone:

pgbfprod=> select 'REL_10_STABLE' > 'REL9_4_STABLE';?column? 
----------f
(1 row)

pgbfprod=> select 'REL_10_STABLE' > 'REL9_4_STABLE' COLLATE "C";?column? 
----------t
(1

Greetings,

Andres Freund



Re: [pgsql-www] Failed to make v10 branch: gitmaster push hook needs adjustment

From
Andrew Dunstan
Date:

On Mon, Aug 14, 2017 at 8:41 PM, Andres Freund <andres@anarazel.de> wrote:
On 2017-08-14 20:35:14 -0400, Tom Lane wrote:
> Stephen Frost <sfrost@snowman.net> writes:
> > Let's see what happens...  I'm around for the next few hours if things
> > go south.
>
> Looks like the basic reporting loop is working, but the dashboard
> web page is putting REL_10_STABLE at the bottom :-(.  We can live
> with that till Andrew returns from vacation, though.  Thanks!

Yep, we're discussing that just now on IRC. Looks like a collation
issue. That's probably why it works on perl side stuff, but not sql
ordered things. At least that's my theory :P.

On the buildfarm clone:

pgbfprod=> select 'REL_10_STABLE' > 'REL9_4_STABLE';
 ?column?
----------
 f
(1 row)

pgbfprod=> select 'REL_10_STABLE' > 'REL9_4_STABLE' COLLATE "C";
 ?column?
----------
 t
(1



(snatching a brief moment of connectivity)

I won't be be able to fix it until at least Sunday, possibly a good bit longer, but it should simply be a matter of adding a COLLATE clause to the branch ordering at line 75 of show_status.pl 

cheers

andrew
 

Andrew Dunstan <andrew@dunslane.net> writes:
> I won't be be able to fix it until at least Sunday, possibly a good bit
> longer, but it should simply be a matter of adding a COLLATE clause to the
> branch ordering at line 75 of show_status.pl

There's no great hurry about it, but when you do get a chance, there's
various lists on other pages of the buildfarm website that also need
adjustment, eg on the "members" page and two places on the "typedefs"
page.
        regards, tom lane



Re: [pgsql-www] Failed to make v10 branch: gitmaster push hook needsadjustment

From
Andrew Dunstan
Date:

On 08/16/2017 05:09 PM, Tom Lane wrote:
> Andrew Dunstan <andrew@dunslane.net> writes:
>> I won't be be able to fix it until at least Sunday, possibly a good bit
>> longer, but it should simply be a matter of adding a COLLATE clause to the
>> branch ordering at line 75 of show_status.pl
> There's no great hurry about it, but when you do get a chance, there's
> various lists on other pages of the buildfarm website that also need
> adjustment, eg on the "members" page and two places on the "typedefs"
> page.
>
>             


I think I have them all fixed now. See
<https://github.com/PGBuildFarm/server-code/commit/fb3222f3625c9489ac76d7dae42eacb95a424c2e>

cheers

andrew





Andrew Dunstan <andrew@dunslane.net> writes:
> I think I have them all fixed now. See
> <https://github.com/PGBuildFarm/server-code/commit/fb3222f3625c9489ac76d7dae42eacb95a424c2e>

Thanks, but there's something weird about the "failures" page.
The filter menu for "Branch(es)" is only showing All and HEAD.
I'm seeing a stray ">" rendered next to it, too, which might
be related?
        regards, tom lane



Re: [pgsql-www] Failed to make v10 branch: gitmaster push hook needs adjustment

From
Andrew Dunstan
Date:

> On Aug 20, 2017, at 10:42 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Andrew Dunstan <andrew@dunslane.net> writes:
>> I think I have them all fixed now. See
>> <https://github.com/PGBuildFarm/server-code/commit/fb3222f3625c9489ac76d7dae42eacb95a424c2e>
>
> Thanks, but there's something weird about the "failures" page.
> The filter menu for "Branch(es)" is only showing All and HEAD.
> I'm seeing a stray ">" rendered next to it, too, which might
> be related?
>
>

Oops. On the road right now. Will check in a few hours

Cheers

Andrew


Re: [pgsql-www] Failed to make v10 branch: gitmaster push hook needs adjustment

From
Andrew Dunstan
Date:


On Sun, Aug 20, 2017 at 11:36 AM, Andrew Dunstan <andrew@dunslane.net> wrote:


> On Aug 20, 2017, at 10:42 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Andrew Dunstan <andrew@dunslane.net> writes:
>> I think I have them all fixed now. See
>> <https://github.com/PGBuildFarm/server-code/commit/fb3222f3625c9489ac76d7dae42eacb95a424c2e>
>
> Thanks, but there's something weird about the "failures" page.
> The filter menu for "Branch(es)" is only showing All and HEAD.
> I'm seeing a stray ">" rendered next to it, too, which might
> be related?
>
>

Oops. On the road right now. Will check in a few hours



Should be fixed now.

cheers

andrew

Andrew Dunstan <andrew@dunslane.net> writes:
> Should be fixed now.

Yup, looks good now.  Thanks!
        regards, tom lane