From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id QKjsAnhJFmEHawEAgWs5BA (envelope-from ) for ; Fri, 13 Aug 2021 12:29:12 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id uNsiOndJFmHTbwAAbx9fmQ (envelope-from ) for ; Fri, 13 Aug 2021 10:29:11 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 35653BBF3 for ; Fri, 13 Aug 2021 12:29:11 +0200 (CEST) Received: from localhost ([::1]:49944 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mEUR3-0000To-JP for larch@yhetil.org; Fri, 13 Aug 2021 06:29:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42710) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mEUQw-0000Tg-PF for guix-patches@gnu.org; Fri, 13 Aug 2021 06:29:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:57214) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mEUQw-0008Bz-De for guix-patches@gnu.org; Fri, 13 Aug 2021 06:29:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mEUQw-0006wE-7p for guix-patches@gnu.org; Fri, 13 Aug 2021 06:29:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#50040] [PATCH 0/2] publish: Always render nar/narinfo during backing. Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 13 Aug 2021 10:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 50040 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 50040@debbugs.gnu.org Cc: Mathieu Othacehe X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.162885049026604 (code B ref -1); Fri, 13 Aug 2021 10:29:02 +0000 Received: (at submit) by debbugs.gnu.org; 13 Aug 2021 10:28:10 +0000 Received: from localhost ([127.0.0.1]:40526 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mEUQ6-0006uy-Ds for submit@debbugs.gnu.org; Fri, 13 Aug 2021 06:28:10 -0400 Received: from lists.gnu.org ([209.51.188.17]:37340) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mEUQ2-0006up-HE for submit@debbugs.gnu.org; Fri, 13 Aug 2021 06:28:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42384) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mEUQ2-0000MP-9X for guix-patches@gnu.org; Fri, 13 Aug 2021 06:28:06 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51410) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mEUQ2-0007Lh-1F for guix-patches@gnu.org; Fri, 13 Aug 2021 06:28:06 -0400 Received: from [2a01:e0a:19b:d9a0:f2f7:a404:c3d3:f8b4] (port=44572 helo=localhost.localdomain) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mEUQ1-0003LR-Ny; Fri, 13 Aug 2021 06:28:05 -0400 From: Mathieu Othacehe Date: Fri, 13 Aug 2021 12:28:00 +0200 Message-Id: <20210813102800.805-1-othacehe@gnu.org> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1628850551; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=qQRpB9wRQWFSCILode4BNaM0eRd4Frhxu3MCrt0AMk4=; b=RIsZ3NVdNr1sG9jtRDXmYcQXnt/GXt7/7kf9nXhPjPfl1s/DXdXG6rCBwPe47m50GO5q4/ rtWElsUwRbCnI8jkKDYMVKdv+tsb+Y+XE2OGz4p6WEf5ZvSSEfdu5Y3SH3o2Vv+JLzUJgv P60ZP2lF7MCufswLrHpmmHWiVVKJMQ9u0TIU22Vp7Pff8vi6ga6Qe/pwPvg317BXXC2GS2 r/CgtzS7a18g3XxLbV1z6NvNwUM4Tp1SxDGJCFDdJ0QUXJNxWJS/kBt0L25UIzOSi9KsqX LNOO2qN6l97VbrSaFtG5L4UetR4Ltvmm4wfe9ywtFi/yDLvrHI0ApEaD6u2exg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1628850551; a=rsa-sha256; cv=none; b=OPGY5Y2gZ6I2BkHECYEyy7fvciEt2pep2zwTLLk6cyPKLTHzsFZd6VlO8eO1IQzkTcsue+ JAXhasrJ21vjt4+06ryBpToJ5jTtgN1lrrLnyvOOe+YIEw9v4E5U+au3/wmH0EIlwTBavK 86JfCfw+huMxltYoSKSLyHznovmqKRi8MtXq27g5J4O3v/wT5VK+M5Y/fHk6i78sbGNJzo RPBWCA+MiwgSn61TtJCqIwupVBXjh9f7mEj1hODu9lr6c0DTj6hmgvAMRAgDYBtRJpQ7+a B6YqS8pFWkjZicaqvlwDivV8moEITE18DzMHq3hm1Yu00yfaLFvIAbITYktl7Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 2.09 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 35653BBF3 X-Spam-Score: 2.09 X-Migadu-Scanner: scn0.migadu.com X-TUID: GfRc/XQWtH37 Hello, This patchset does two things: * It ensures that the narinfo creation is always done in a dedicated thread to prevent blocking the main publish thread and cause the timeout connection errors that some users experimented. * It removes the cache bypass support and always renders temporary narinfo and nar files during baking. This way, the first user asking for a substitute won't get a 404 error. It also removes the need for Cuirass to pre-bake nar files. Finally it will make way easier to use a publish server with caching in a CI context. The downside is that it makes the publish server code harder to understand and that it consumes more server resources by duplicating the nar/narinfo file creation. In the long run, spawning new threads constantly won't scale. I think it would be nice to rewrite the publish server using Fiber or an HTTP server framework. Thanks, Mathieu Mathieu Othacehe (2): publish: Defer narinfo string creation to the http-write. publish: Remove cache bypass support. doc/guix.texi | 15 ----- gnu/services/base.scm | 11 +--- guix/scripts/publish.scm | 136 +++++++++++++++++++++++---------------- tests/publish.scm | 88 +++---------------------- 4 files changed, 93 insertions(+), 157 deletions(-) -- 2.32.0