Re: More efficient build farm animal wakeup?

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Andrew Dunstan <andrew(at)dunslane(dot)net>
Subject: Re: More efficient build farm animal wakeup?
Date: 2022-11-20 21:53:52
Message-ID: CA+hUKGKNkG=wxi9KdRKOrSc9Ja4bYjboPtD0imNzUSdcQL1kaw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Nov 21, 2022 at 10:31 AM Magnus Hagander <magnus(at)hagander(dot)net> wrote:
> Um, branches of interest will only pick up when it gets a new *branch*, not a new *commit*, so I think that would be a very different problem to solve. And I don't think we have new branche *that* often...

Sure, could be done with an extra different request you make from time
to time or keeping the existing list. No strong opinions on that, I
was just observing that it could also be combined, something like:

Client: I have 14(at)1234, 15(at)1234, HEAD(at)1234; what should I do now, boss?
Server: You should fetch 14 (it has a new commit) and 16 (it's a new
branch you didn't mention).

> I'd imagine something like a
> GET https://git.postgresql.org/buildfarm-branchtips
> X-branch-master: a4adc31f69
> X-branch-REL_14_STABLE: b33283cbd3
> X-longpoll: 120
>
> For that one it would check branch master and rel 14, and if either branchtip doesn't match what was in the header, it'd return immediately with a textfile that's basically
> master:<whateveritis>
>
> if master has changed and not REL_14.
>
> If nothing has changed, go into longpoll for 120 seconds based on the header, and if nothing at all has changed in that time, return a 304.

LGTM, that's exactly the sort of thing I was imagining.

> We could also use something like a websocket to just stream the changes out over.

True. The reason I started on about long polling instead of
websockets is that I was imagining that the simpler, dumber protocol
where the client doesn't even really know it's participating a new
kind of magic would be more cromulent in ye olde perl script (no new
cpan dependencies).

> In either case it would also need to change the buildfarm client to run as a daemon rather than a cronjob I think? (obviously optional, we don't have to remove the current abilities)

Given that the point of the build farm is (these days) to test on
weird computers and operating systems, I expect that proper 'run like
a service' support would be painful or not get done. It'd be nice if
there were some way to make this work with simple crontab entries...

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Roberto C. Sánchez 2022-11-20 22:00:45 Re: Question concerning backport of CVE-2022-2625
Previous Message Tom Lane 2022-11-20 21:42:20 Re: Precedence of bitwise operators