From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id QBTnALTCCWW/lgAAG6o9tA:P1 (envelope-from ) for ; Tue, 19 Sep 2023 17:48:04 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id QBTnALTCCWW/lgAAG6o9tA (envelope-from ) for ; Tue, 19 Sep 2023 17:48:04 +0200 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 368DF54265 for ; Tue, 19 Sep 2023 17:48:02 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=none; 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=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1695138483; a=rsa-sha256; cv=none; b=kFrFoFC238tfSfEDPmAwK7bEfJEFfcPheEAFhPkmZmuMH5ugV7hasFpSP+eMMabM+xfmEy 8OhPQDXXWOpCnbemj1RFlkgnTPTutPL8cKVDKjUSlEpJd8Wbzhl0XtBk+CSnNLhqa86STz qDbPfL0uUZixy74wF2ZpGvcob1ds59YqungSF/09lScFZk4b4TQCDlX7t2V7x4ACPdoGp5 lSeplw/XsmrNFWs7D+AKDFz/r/8RrjF0DkMVUryVB/3DKD3YNGydIaTsXMdMaFq5mo4+2I 0NtNnbJFpo+XPBAGrYNtfuZ9Y2E6ZLs/uVbE7waua3Nff4rk7D9nNbce4ASLDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1695138483; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=NH+zwugxCI+9TC5UbQG/41srfv2aOb/Biods4wvvuMo=; b=MQzK5LVLHklqBV8hfQthTJs0A3Fo2fa2jaPp+STtLS7TqyLb9ZWBmp8njh418nV6oBIQ1P KeXIutqRCPmlICrDLQQqoSJbTUA+9zuP4M8R+F5JM8PAdKDbYBGgtG/oqDdLmW6OZGnZVt Q4VAYNvXY6qYR6D3a0KWmOQyV6xcm3AFWztigCmeSPij/61xczjE/slVb9ARvg75tjK/N9 e3BbLUV/xQ7QQp4DdF+HnxqPo4KjurVTGBZa/r/CSkuYREeDqPV9avpRyqk/rYOqdy21eD iDgCP3P1m5+HzHwtJ+oEp5JWez4pfvVeRiaSIEp38DHIwgWhjZuMXoLeXE9Elw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; 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=none Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qicwd-0005dh-3H; Tue, 19 Sep 2023 11:47:23 -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 1qicwb-0005dJ-3o for guix-devel@gnu.org; Tue, 19 Sep 2023 11:47:21 -0400 Received: from mira.cbaines.net ([2a01:7e00:e000:2f8:fd4d:b5c7:13fb:3d27]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qicwP-0004oq-Bq for guix-devel@gnu.org; Tue, 19 Sep 2023 11:47:14 -0400 Received: from localhost (unknown [217.155.61.229]) by mira.cbaines.net (Postfix) with ESMTPSA id 9E0FC27BBE2; Tue, 19 Sep 2023 16:47:06 +0100 (BST) Received: from felis (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id f88c7479; Tue, 19 Sep 2023 15:47:05 +0000 (UTC) References: <4c2f6851dece004152bb1904c8b03c7d5206eeeb.1695074290.git.vivien@planete-kraus.eu> User-agent: mu4e 1.10.5; emacs 28.2 From: Christopher Baines To: Vivien Kraus Cc: guix-devel@gnu.org Subject: Re: [PATCH qa-frontpage] Apply incoming patches onto the correct feature branch Date: Tue, 19 Sep 2023 15:33:34 +0100 In-reply-to: <4c2f6851dece004152bb1904c8b03c7d5206eeeb.1695074290.git.vivien@planete-kraus.eu> Message-ID: <87cyyew4g8.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=2a01:7e00:e000:2f8:fd4d:b5c7:13fb:3d27; envelope-from=mail@cbaines.net; helo=mira.cbaines.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -8.30 X-Spam-Score: -8.30 X-Migadu-Queue-Id: 368DF54265 X-Migadu-Scanner: mx2.migadu.com X-TUID: +CMJpTJFGMGh --=-=-= Content-Type: text/plain Vivien Kraus writes: > It seems that the only available information of the feature branch is > in the patch name. > --- > > Hello guix! > > Thank you for making the QA tool. It seems to me that feature branches > are ignored for patches. The patches seem to always be applied on top > of master. I get that idea because the base-for-issue-* tag is always > put on HEAD, and all my patches targetting gnome-team recently get > applied to master. I understand that the latter could be a problem > with me. > > If patches are indeed applied on top of master, then the question > arises, what to do. The available information from patchwork is > scarce: the base-commit is not available, and the optional feature > branch only appears in the name of the patches of the series. > > I think it is possible to parse the patch names. This way, we get some > useful information: the feature branch, the series revision, and the > patch index. The patch index can be used to make sure the patches are > in correct order (this can be the case if a server in the path > re-orders the emails). > > What do you think? Hi Vivien, Thanks for trying to implement this and sending a patch, I think it's a good feature to add but there's a few things needed to make this work. Firstly, you need to actually change which branch the patch is applied to, and the place to do that is here [1] in the call to with-git-worktree. You can probably use get-commit from (guix-qa-frontpage git-repository) to find the commit hash for a branch. You'll also probably need to move around some of the code in create-branch-for-issue so that you have the data about the patches to work out what the desired branch is before you call with-git-worktree. 1: https://git.cbaines.net/guix/qa-frontpage/tree/guix-qa-frontpage/manage-patch-branches.scm#n250 The second thing is that there's other places in the codebase that assume the patches have been applied to the master branch. In start-manage-patch-branches-thread, there's get-changes-compared-to-master which is used to decide if a branch needs recreating if there's too many changes between the base revision and a recent master branch revision. That'll need changing to at least skip over any patches been applied to a non-master branch, or perform the comparison against the tip of the relevant branch. The third thing that will need to change to allow this to happen is adding clear messaging on to the issue page to indicate where patches have been applied to non-master branches. That'll help to avoid people merging these patches in to the master branch rather than the branch they were intended for. Maybe what would be helpful is a procedure in (guix-qa-frontpage issue) that takes the data for the issue from latest-patchwork-series-by-issue, and gives you back the branch name that the patches should be applied to. That can then be used to get the branch information for all the above 3 use cases. As for trying to order the patches, do you know of a case where the ordering from Patchwork is wrong? I think it's only worth changing the ordering in the qa-frontpage if we know we're doing it for a reason. There's now a create-issue-branch command to the guix-qa-frontpage script as well, which will be a good way of testing the code out for applying patches to various branches. It'll fail when it comes to pushing the branch, but it'll still be useful for testing the code up to that point. Would you be able to look at sending some revised patches? Thanks, Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmUJwndfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh aW5lcy5uZXQACgkQXiijOwuE9XcwJQ/+I/7kTY6Kz027qpaVZExUay8EE8efG5RZ f8AgJdr4YrgsdDaiqoEkQxigCwY6ZhGlN6l0aNWwgYn3hX/EkB1cn1OpmibsegcL LRwbnNlHmemNrDDIx7tijT25UIma3lwrywCvIbeC3B2Tq0UmKyrCL394HepjiqEq 6N29pMHVtZ2RWVGCl2Ece+nDvfKH7oTn8BTMjwS8aoe281QqcROQS8Ksby9P6JwN vULJFeT0FVEJccPmts40Ft9wfHK5WOl6UfepTMVcFLX4yqTD/wDEAiHNAdiPNsrA 1vylmtJywRc9r0Lo+nvsLsDXbyxYl/7aYSDTXlnJnjFk0ez+Ev0lZoVAmMTGjmhG Sz89dXYFv2SM6w8ycc8bv8Urmhh33xDPYw90bu90JMZO0rE0/sKXjjI4b6FWqRVS W8U9OkvFQvQ6f4KePpJt3jG8RUj+EnOHzXPOI8mWY29Lc7jgfj99et4EpcQjUrKe urOPv5x3Au18uRG0TuQRk3EfZHd7Rtn/wGMEepsp4m23JlDbcnhN3RmPlpkBtsjI Gxrwwour+cAljVlkXZgpGe+1cUvTd2sBI5bltv6q1PuKsqQrevnBmr7DjD59u3Y2 j/PIl+Cx6Zg3knlIJb4rZplHyABlcc4OQKUogmmP9NMp3/BiyPbhO2DsK2VkZRii PqRhBAhtVtg= =PYIO -----END PGP SIGNATURE----- --=-=-=--