From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id MFH5FtYvcGa8zgAA62LTzQ:P1 (envelope-from ) for ; Mon, 17 Jun 2024 12:45:10 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id MFH5FtYvcGa8zgAA62LTzQ (envelope-from ) for ; Mon, 17 Jun 2024 14:45:10 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=inria.fr header.s=dc header.b=e+yIdoEa; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=inria.fr ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1718628310; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=iFAMtZNqpJMUXPjvvY7stRJo4MH0RiVLIbvqyYSaRjs=; b=XBmkzn8j1m9I3vi8ENy6BJW5NpTNTNa5gUcnozGsyMYK/FZfbeciKVPhc88sl4VlMzpDMT xM2lqCzjMbqZ0HuPpjWF9HlZvhVz636VtPRCJGmirRHeVkihrJ9CYRJ7Oh7UnL79cVcnx3 O0c1yym8jvdrtr4HJMtE+qa/L+7c/CvI8aRjtoGi+Ym2uafA1O1Yqs6Pf791RYSrPlxzpm vb40t9mYOuW6JriaFuHbuonHz8i83vwQMf6ccmMsQJ5ZnjG5OA0Q2YFCyNqD2KPj6BcFnq jWY3CyerxQL4/x/mTI7wsSYKUPW6zXVWcgAaXIZYYiRurppBsFP3n1hIbzexrw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=inria.fr header.s=dc header.b=e+yIdoEa; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=inria.fr ARC-Seal: i=1; s=key1; d=yhetil.org; t=1718628310; a=rsa-sha256; cv=none; b=S/9+aJ6VkZJatFnO3BLxSal09g38e/Tp0yEkrPNkm3azyyptcE0/qDf+Szq4nDt2KOmPqT pcJN/xp3qE75LK7qSW+GzuZke02rnRjpY2bl6nWl0HS+Jt9tx56VYVsjizximD49ryIueU ukKwaOaZsZQ+CQGxs0F/DGVlny+xqeZyvMswjindIpgNNAQfdMMV2S9AkohxsmSk038VnN LtoRPsd4LqznLGTXZKJvmeGlR4Ci24jlIWvbdGIE3hmMqYpxP7QCkyCwNvcP+aONBnGuS3 MiGCGe012LnCSQK6fCnw4igv8s2QWj1BesToFmRbWUbqWuOVX/+BBnM8UqPM5w== 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 1761C65BD4 for ; Mon, 17 Jun 2024 14:45:10 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sJBj9-0006z8-VZ; Mon, 17 Jun 2024 08:44:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sJBj7-0006yd-MD for guix-devel@gnu.org; Mon, 17 Jun 2024 08:44:49 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sJBj4-00011m-V5 for guix-devel@gnu.org; Mon, 17 Jun 2024 08:44:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=iFAMtZNqpJMUXPjvvY7stRJo4MH0RiVLIbvqyYSaRjs=; b=e+yIdoEaWmdk38eB25Q6f9FHAzaxHz72pmG7tBf1ina/1b6d5bZDj8D1 ytce+xV361ILCqNNkvCRel+T5jSr4kX5KsIrxTrNPYduL8XjTHIoQHkt8 DiL13HCHH3Y9DBABPgPyRshR3k2ZPmDpfm0DmPxOWrh85lf9m05n6ux/d E=; X-IronPort-AV: E=Sophos;i="6.08,244,1712613600"; d="scan'208";a="171049493" Received: from unknown (HELO guix-A102.bordeaux.inria.fr) ([193.50.110.191]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Jun 2024 14:44:43 +0200 From: Romain GARBAGE To: guix-devel@gnu.org Cc: ludovic.courtes@inria.fr, Romain GARBAGE Subject: [PATCH Cuirass] cuirass: Fix handling of SPECIFICATION-NAME. Date: Mon, 17 Jun 2024 14:44:25 +0200 Message-ID: <20240617124425.8410-1-romain.garbage@inria.fr> X-Mailer: git-send-email 2.45.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=192.134.164.83; envelope-from=romain.garbage@inria.fr; helo=mail2-relais-roc.national.inria.fr X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Queue-Id: 1761C65BD4 X-Migadu-Scanner: mx13.migadu.com X-Migadu-Spam-Score: -10.56 X-Spam-Score: -10.56 X-TUID: R07kRivApOqv Fixes a regression introduced in 1da873b0e23eceb3c239dd6dc6781debf23bec63, where the NAME field of the SPECIFICATION record type is forced to be a symbol as stated by the documentation. * src/cuirass/base.scm: Handle SPECIFICATION-NAME as a symbol. * src/cuirass/http.scm: Handle SPECIFICATION-NAME as a symbol. * src/cuirass/templates.scm: Fix template generation. --- src/cuirass/base.scm | 4 ++-- src/cuirass/http.scm | 6 +++--- src/cuirass/templates.scm | 21 +++++++++++---------- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/src/cuirass/base.scm b/src/cuirass/base.scm index 86d2f97..507be5f 100644 --- a/src/cuirass/base.scm +++ b/src/cuirass/base.scm @@ -857,7 +857,7 @@ POLLING-PERIOD seconds." ((_ . actor) actor))) (loop registry)) (`(update ,spec) - (let ((name (string->symbol (specification-name spec)))) + (let ((name (specification-name spec))) (match (vhash-assq name registry) (#f (log-error "cannot update non-existent spec '~s'" name)) @@ -877,7 +877,7 @@ POLLING-PERIOD seconds." #:polling-period period)) (name (specification-name spec))) (log-info "registering new jobset '~a'" name) - (loop (vhash-consq (string->symbol name) monitor + (loop (vhash-consq name monitor registry)))) ((_ . monitor) (log-info "jobset '~a' was already registered" diff --git a/src/cuirass/http.scm b/src/cuirass/http.scm index 48c506c..092eca1 100644 --- a/src/cuirass/http.scm +++ b/src/cuirass/http.scm @@ -191,7 +191,7 @@ a record." ((mastodon? notif) `((type . mastodon))))) - `((name . ,(specification-name spec)) + `((name . ,(symbol->string (specification-name spec))) (build . ,(match (specification-build spec) ((? symbol? subset) subset) @@ -743,7 +743,7 @@ bogus reply is received, return DEFAULT." (respond-json-with-error 400 "Jobset already exists.")))) ;; Accepted or rejected merge requests receive the same treatment. ((or "close" "merge") - (let ((spec-name (symbol->string (specification-name spec)))) + (let ((spec-name (specification-name spec))) (if (db-get-specification spec-name) (begin (db-remove-specification spec-name) @@ -760,7 +760,7 @@ bogus reply is received, return DEFAULT." ;; treated the same way: the jobset is reevaluated. ;; XXX: Copied and adapted from "/jobset//hook/evaluate. ("update" - (let ((spec-name (symbol->string (specification-name spec)))) + (let ((spec-name (specification-name spec))) (if (db-get-specification spec-name) (if (call-bridge `(trigger-jobset ,(specification-name spec)) bridge) diff --git a/src/cuirass/templates.scm b/src/cuirass/templates.scm index 54a10c1..d49c868 100644 --- a/src/cuirass/templates.scm +++ b/src/cuirass/templates.scm @@ -378,8 +378,8 @@ system whose names start with " (code "guile-") ":" (br) (td (@ (class "column-name")) (a (@ (href "/jobset/" - ,(specification-name spec))) - ,(specification-name spec))) + ,(symbol->string (specification-name spec)))) + ,(symbol->string (specification-name spec)))) (td (@ (class "column-build")) ,(match (specification-build spec) @@ -422,11 +422,11 @@ system whose names start with " (code "guile-") ":" (br) (style "vertical-align: middle")) ,@(let* ((summary (and=> (spec->latest-eval-ok - (specification-name spec)) + (symbol->string (specification-name spec))) eval-summary)) (last-eval (spec->latest-eval - (specification-name spec))) + (symbol->string (specification-name spec)))) (last-eval-status-ok? (and last-eval (<= (evaluation-current-status last-eval) @@ -455,7 +455,7 @@ system whose names start with " (code "guile-") ":" (br) (else '())))) (td (@ (class "column-action")) - ,@(let* ((name (specification-name spec)) + ,@(let* ((name (symbol->string (specification-name spec))) (dashboard-name (string-append "Dashboard " name))) `((a (@ (href "/eval/latest/dashboard?spec=" @@ -468,10 +468,10 @@ system whose names start with " (code "guile-") ":" (br) ,(let ((id (string-append "specDropdown-" - (specification-name spec))) + (symbol->string (specification-name spec)))) (name (string-append "Options " - (specification-name spec)))) + (symbol->string (specification-name spec))))) `(div (@ (id ,id) (title ,name) @@ -490,12 +490,12 @@ system whose names start with " (code "guile-") ":" (br) (li (@ (role "menuitem")) (a (@ (class "dropdown-item") (href "/specification/edit/" - ,(specification-name spec))) + ,(symbol->string (specification-name spec)))) " Edit")) (li (@ (role "menuitem")) (a (@ (class "dropdown-item") (href "/admin/specifications/deactivate/" - ,(specification-name spec))) + ,(symbol->string (specification-name spec)))) " Deactivate")))))))) specs))))))) @@ -569,7 +569,8 @@ the existing SPEC otherwise." '("") rest))))))) - (let ((name (and spec (specification-name spec))) + (let ((name (and spec (symbol->string + (specification-name spec)))) (build (and spec (match (specification-build spec) ((? symbol? build) build) ((build _ ...) build)))) -- 2.45.1