Re: More efficient build farm animal wakeup?

From: Andres Freund <andres(at)anarazel(dot)de>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
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 06:23:35
Message-ID: 20221120062335.juovwjpz5njs4mcz@awork3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2022-11-19 16:12:24 +1300, Thomas Munro wrote:
> Is there a way to find out about new git commits that is more
> efficient and timely than running N git fetches or whatever every
> minute in a cron job? Maybe some kind of long polling where you send
> an HTTP request that says "I think the tips of branches x, y, z are at
> 111, 222, 333" and the server responds when that ceases to be true?

I think a git fetch is actually ok for that - it doesn't take a whole lot of
resources. However run_builds.pl is more heavyweight. For one, it starts one
run_build.pl for each branch, which each then fetches from git separately. But
more importantly, each run_build.pl seems to actually do a fair bit of work
before discovering nothing has changed.

A typical log I see:

Nov 20 06:08:17 bf-valgrind-v4 run_branches.pl[3289916]: Sun Nov 20 06:08:17 2022: buildfarm run for grassquit:REL_14_STABLE starting
Nov 20 06:08:17 bf-valgrind-v4 run_branches.pl[3289916]: grassquit:REL_14_STABLE [06:08:17] checking out source ...
Nov 20 06:08:20 bf-valgrind-v4 run_branches.pl[3289916]: grassquit:REL_14_STABLE [06:08:20] checking if build run needed ...
Nov 20 06:08:20 bf-valgrind-v4 run_branches.pl[3289916]: grassquit:REL_14_STABLE [06:08:20] No build required: last status = Sat Nov 19 23:54:38 2022 GMT, cur>

So we spend three seconds in the "checking out source" stage, just to then see
that nothing has actually changed.

Greetings,

Andres Freund

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2022-11-20 07:42:35 Re: How to *really* quit psql?
Previous Message Nikolay Shaplov 2022-11-20 06:11:46 Re: [PATCH] New [relation] option engine