From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 19 06:06:07 2020 Received: (at 43494) by debbugs.gnu.org; 19 Sep 2020 10:06:07 +0000 Received: from localhost ([127.0.0.1]:45687 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJZkt-00073d-7o for submit@debbugs.gnu.org; Sat, 19 Sep 2020 06:06:07 -0400 Received: from mira.cbaines.net ([212.71.252.8]:57754) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kJZkr-00073V-8G for 43494@debbugs.gnu.org; Sat, 19 Sep 2020 06:06:05 -0400 Received: from localhost (unknown [46.237.174.246]) by mira.cbaines.net (Postfix) with ESMTPSA id 492B927BBE7; Sat, 19 Sep 2020 11:06:04 +0100 (BST) Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 1e7a9b66; Sat, 19 Sep 2020 10:06:01 +0000 (UTC) References: <20200918184042.22660-1-mail@cbaines.net> <20200918184042.22660-4-mail@cbaines.net> <87pn6iu8rx.fsf@gnu.org> User-agent: mu4e 1.4.13; emacs 26.3 From: Christopher Baines To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: [bug#43494] [PATCH 4/4] services: guix: Add guix-build-coordinator-queue-builds-service-type. In-reply-to: <87pn6iu8rx.fsf@gnu.org> Date: Sat, 19 Sep 2020 11:05:57 +0100 Message-ID: <87363e9j3u.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 43494 Cc: 43494@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > Christopher Baines skribis: > >> * gnu/services/guix.scm (): >> New record type. >> (guix-build-coordinator-queue-builds-configuration, >> guix-build-coordinator-queue-builds-configuration?, >> guix-build-coordinator-queue-builds-configuration-package, >> guix-build-coordinator-queue-builds-configuration-user, >> guix-build-coordinator-queue-builds-coordinator, >> guix-build-coordinator-queue-builds-configuration-systems, >> guix-build-coordinator-queue-builds-configuration-system-and-targets, >> guix-build-coordinator-queue-builds-configuration-guix-data-service, >> guix-build-coordinator-queue-builds-configuration-processed-commits-file, >> guix-build-coordinator-queue-builds-shepherd-services, >> guix-build-coordinator-queue-builds-activation, >> guix-build-coordinator-queue-builds-account): New procedures. >> (guix-build-coordinator-queue-builds-service-type): New variable. > > [...] > >> +@defvar {Scheme Variable} guix-build-coordinator-queue-builds-service-t= ype >> +Service type for the >> +guix-build-coordinator-queue-builds-from-guix-data-service script. Its > > Oh! :-) > > =E2=80=98guix-build-queue=E2=80=99 maybe? Because after all, it can queu= e builds coming > from anywhere, not just from the Data Service, right? > > It=E2=80=99d be nice to add a sentence or two explaining how the =E2=80= =9Cqueue=E2=80=9D fits in > the big picture (I=E2=80=99m not quite sure :-)). So, this got me thinking a bit, maybe this script should actually exist outside of the guix-build-coordinator repository... You can run `guix-build-coordinator build ...` to build a derivation, and what this does is just make the relevant HTTP request to the coordinator. What this script does is just fetch derivation names from an instance of the Guix Data Service, and ask the Guix Build Coordinator to build them. >> +@item @code{systems-and-targets} (default: @code{#f}) >> +An association list of system and target pairs for which to fetch >> +derivations to build. > > Cross-compilation target triplets are a notion that=E2=80=99s not availab= le at > the derivation level; it only exists for packages. > > Are we mixing things here? This setting is basically configuing the query parameters to use for this page for example [1]. You're right that it's not available at the derivation level, but you can ask the Guix Data Service for derivations for packages which were computed for a specific system and target. 1: http://data.guix.gnu.org/revision/70ef8b24550c54cc8e9f20026bfd24b8680499= b4/package-derivations >> +@item @code{guix-data-service} (default: @code{"https://data.guix.gnu.o= rg"}) >> +The Guix Data Service instance from which to query to find out about >> +derivations to build. > > Ah so the queue pulls from the Data Service. Got it! I wouldn't read too much in to "queue" in the name here, "submit" might be a better word to use, since that's the term used on the Guix Build Coordinator side. There's also nothing resemling a queue anywhere... >> +@item @code{processed-commits-file} (default: @code{"/var/lib/guix-buil= d-coordinator-queue-builds/processed-commits"}) >> +A file to record which commits have been processed, to avoid needlessly >> +processing them again if the service is restarted. > > Maybe in /var/cache by default, no? Ah, yeah, I've changed it to be in /var/cache, as that's fine. >> + (processed-commits-file >> + guix-build-coordinator-queue-builds-configuration-processed-commits-= file >> + (default "/var/lib/guix-build-coordinator-queue-builds/processed-com= mits"))) > > Maybe =E2=80=9Cstate-file=E2=80=9D? In addition to saving space :-), it= =E2=80=99d leave room > for additional bits of state. Currently, it's just a file with each commit on its own line. Given that, if there's a need to store more state, it might just end up in different files. If that happens, this setting could become a directory, rather than a specific file to avoid adding extra configuration options. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl9l2AVfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9XdCjQ/8DIg3yovjZeLdZteOJnB4JMRyFhx+VTZPbTVEDJcT8BL8gwqiZrVKsiLW Cz+vu62Bwiohk0zrXKLTuqTfsvq/NGnqWm4lt+cz6OiH8guX5CfvuXeLNXWh0t6S PA6O8ieRry/ar+DFQBUEF20XNUIb/hCGhykcdjKC1vLFac4npBaYxRyIwCwiyMLG PrugkmFveh93Xe9E7qqByT6DEPa22zw44zDrzRFWUP3Zbpv+fFuA+MwDg/BjS7lf xGuc0tfI8XVBWwsbnmdMUUNuHneBf5mYRhMDBFqjP+ZrWDq8Z2PHyIUFvie9iaC1 phgwQvjUwXe5w2H5k0rav+izwyjYe2Lg8GgBZsn2j9DV0FlRq3AhM0Ex96wCs6js xbDcAKeuKqaLKwbBoRd40uo+0Aoo5FBo7lVije0M3S4JaQjqGPxqR1HSCPz8VMxo XoKzq36kmZQEly8XLgSf/lWFLkVvEgLvBR4g5bFMVLKxKEK2lHSEa1jfxDc1Lz6V 6/4qVF/bMN8SUqU7ZvRr6klUUbQ2OaTV5Csl5fG1jlZNWDXOTlEKXcgUq+jbU0QE CoM1OED+rppjSXe1zbaubWZKKXk1Vq3Ix7uAIg3G7fwd0rD5FPjTXEdqtAZ4KLOO REYJt6fooebFrPdxqPOGEJQ8IHXBvlOK305U3/GplY2iP70kxrg= =d1v4 -----END PGP SIGNATURE----- --=-=-=--