From patchwork Thu Jan 8 14:45:42 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Dubois-Briand X-Patchwork-Id: 78287 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8783ED1D467 for ; Thu, 8 Jan 2026 14:46:02 +0000 (UTC) Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.7897.1767883555188947551 for ; Thu, 08 Jan 2026 06:45:56 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=dkim header.b=nNqp8HvV; spf=pass (domain: bootlin.com, ip: 185.246.85.4, mailfrom: mathieu.dubois-briand@bootlin.com) Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id A16AC4E42000 for ; Thu, 8 Jan 2026 14:45:53 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 77544606B6 for ; Thu, 8 Jan 2026 14:45:53 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id C83CD103C889C; Thu, 8 Jan 2026 15:45:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1767883553; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=yKvrYZXW45CuR9HQEAxsa6T/6j/9KXxxfAJGLIaZPbI=; b=nNqp8HvV4fUwLmxrtHD2wTsz5K4IqRUnnB1b1tvkHpoXjzk90mGgTtYEIyY9QARTHs4z6u zhdznTn4IVjYM0NG1RJDRzdOCAPlkJ5tcRphs0iweHXRT7Rg1wBZVXJ0eLTNZlAxesnYLV bS5LJYVrnISVJLSXGkUzAx/CEdn2y+WdtXR+TMBL5UjMOOwSdNPU+3V8zqwPpQpcy4oPsq qxEFP64yPMhA8vt4v5vSydgxzCS+J2lpg3vSR9nM0XvDYBtEZUYgoN5MU1hoh3q33ZzXMJ I6OwmygLexRXwoxwxn/gMtwd1g1LutfC54DXar/TQmVNod9Zw+nw4TucyHhFAg== From: Mathieu Dubois-Briand Date: Thu, 08 Jan 2026 15:45:42 +0100 Subject: [PATCH v2 1/2] oeqa/gitarchive: Fix git push URL parameter MIME-Version: 1.0 Message-Id: <20260108-mathieu-fix-15696-v2-1-fbb0967fdfed@bootlin.com> References: <20260108-mathieu-fix-15696-v2-0-fbb0967fdfed@bootlin.com> In-Reply-To: <20260108-mathieu-fix-15696-v2-0-fbb0967fdfed@bootlin.com> To: openembedded-core@lists.openembedded.org Cc: Thomas Petazzoni , Mathieu Dubois-Briand X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1767883551; l=5056; i=mathieu.dubois-briand@bootlin.com; s=20241219; h=from:subject:message-id; bh=IoBterGziLtZjEx6nV335LYdMsx6tmwPjLWoM/ERy84=; b=ieAP5CaKE42bDakUI6s6vgZuiZ88zoVjWJqWJ3uY14IIX3b79/fjtVttt3lZnxFM3+anzibpH Mwrku0mthUVCwbVsBx3xQvC7wrpG0sWYv3mdGeFbH7mzRFH3LbHv4UW X-Developer-Key: i=mathieu.dubois-briand@bootlin.com; a=ed25519; pk=1PVTmzPXfKvDwcPUzG0aqdGoKZJA3b9s+3DqRlm0Lww= X-Last-TLS-Session-Version: TLSv1.3 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 08 Jan 2026 14:46:02 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/229079 The gitarchive() function takes a `push` parameter than can be either a boolean or a string. But this parameter is then passed to expand_tag_strings(), which clearly expect it to be a string if it is defined. Split this in two arguments: a `push` boolean value and a `push_remote` optional string. Signed-off-by: Mathieu Dubois-Briand --- meta/lib/oeqa/selftest/cases/gitarchivetests.py | 4 ++-- meta/lib/oeqa/utils/gitarchive.py | 8 ++++---- scripts/lib/resulttool/store.py | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/meta/lib/oeqa/selftest/cases/gitarchivetests.py b/meta/lib/oeqa/selftest/cases/gitarchivetests.py index 71382089c124..dcf0eb3be569 100644 --- a/meta/lib/oeqa/selftest/cases/gitarchivetests.py +++ b/meta/lib/oeqa/selftest/cases/gitarchivetests.py @@ -74,7 +74,7 @@ class GitArchiveTests(OESelftestTestCase): "Results of {branch}:{commit}", "branch: {branch}\ncommit: {commit}", "{branch}", False, "{branch}/{commit_count}-g{commit}/{tag_number}", 'Test run #{tag_number} of {branch}:{commit}', '', - [], [], False, keywords, logger) + [], [], False, None, keywords, logger) self.assertTrue(tag_exists(git_obj, target_tag), msg=f"Tag {target_tag} has not been created") delete_fake_repository(path) @@ -88,7 +88,7 @@ class GitArchiveTests(OESelftestTestCase): "Results of {branch}:{commit}", "branch: {branch}\ncommit: {commit}", "{branch}", False, "{branch}/{commit_count}-g{commit}/{tag_number}", 'Test run #{tag_number} of {branch}:{commit}', '', - [], [], False, keywords, logger) + [], [], False, None, keywords, logger) self.assertTrue(tag_exists(git_obj, second_tag), msg=f"Second tag {second_tag} has not been created") delete_fake_repository(path) diff --git a/meta/lib/oeqa/utils/gitarchive.py b/meta/lib/oeqa/utils/gitarchive.py index 7e1d5057482f..6ec17d36958c 100644 --- a/meta/lib/oeqa/utils/gitarchive.py +++ b/meta/lib/oeqa/utils/gitarchive.py @@ -162,7 +162,7 @@ def expand_tag_strings(repo, name_pattern, msg_subj_pattern, msg_body_pattern, msg_body = format_str(msg_body_pattern, keyws) return tag_name, msg_subj + '\n\n' + msg_body -def gitarchive(data_dir, git_dir, no_create, bare, commit_msg_subject, commit_msg_body, branch_name, no_tag, tagname, tag_msg_subject, tag_msg_body, exclude, notes, push, keywords, log): +def gitarchive(data_dir, git_dir, no_create, bare, commit_msg_subject, commit_msg_body, branch_name, no_tag, tagname, tag_msg_subject, tag_msg_body, exclude, notes, push, push_remote, keywords, log): if not os.path.isdir(data_dir): raise ArchiveError("Not a directory: {}".format(data_dir)) @@ -179,7 +179,7 @@ def gitarchive(data_dir, git_dir, no_create, bare, commit_msg_subject, commit_ms tag_name, tag_msg = expand_tag_strings(data_repo, tagname, tag_msg_subject, tag_msg_body, - push, log, keywords) + push_remote, log, keywords) # Commit data commit = git_commit_data(data_repo, data_dir, branch_name, @@ -195,10 +195,10 @@ def gitarchive(data_dir, git_dir, no_create, bare, commit_msg_subject, commit_ms cmd = ['push', '--tags'] # If no remote is given we push with the default settings from # gitconfig - if push is not True: + if push_remote is not None: notes_refs = ['refs/notes/' + ref.format(branch_name=branch_name) for ref, _ in notes] - cmd.extend([push, branch_name] + notes_refs) + cmd.extend([push_remote, branch_name] + notes_refs) log.info("Pushing data to remote") data_repo.run_cmd(cmd) diff --git a/scripts/lib/resulttool/store.py b/scripts/lib/resulttool/store.py index b143334e699d..f3caafaff822 100644 --- a/scripts/lib/resulttool/store.py +++ b/scripts/lib/resulttool/store.py @@ -82,7 +82,7 @@ def store(args, logger): "Results of {branch}:{commit}", "branch: {branch}\ncommit: {commit}", "{branch}", False, "{branch}/{commit_count}-g{commit}/{tag_number}", 'Test run #{tag_number} of {branch}:{commit}', '', - excludes, [], False, keywords, logger) + excludes, [], False, None, keywords, logger) if args.logfile_archive: logdir = args.logfile_archive + "/" + tagname From patchwork Thu Jan 8 14:45:43 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Dubois-Briand X-Patchwork-Id: 78286 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7C0FED1D462 for ; Thu, 8 Jan 2026 14:46:02 +0000 (UTC) Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.7898.1767883555812168937 for ; Thu, 08 Jan 2026 06:45:56 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@bootlin.com header.s=dkim header.b=y5LbiBO/; spf=pass (domain: bootlin.com, ip: 185.246.85.4, mailfrom: mathieu.dubois-briand@bootlin.com) Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 4E7734E42001 for ; Thu, 8 Jan 2026 14:45:54 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 23560606B6 for ; Thu, 8 Jan 2026 14:45:54 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 6299D103C889D; Thu, 8 Jan 2026 15:45:53 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1767883553; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=cMNyAT6/w11l9iezrGckheRcvnN7FBV16n7DUQ/qDao=; b=y5LbiBO/QU3eHF/xgBXagPiGSlpldvh7rVZIy0gQN7HcpFL+KlUJDcBzIRo3xEVQ0L558r YdhS6+xHeHppVchCXAady7gW992yHNrKhODXnFwn90R0HqmtIU7VDsPBpGXtzAnvTeo/wc DAJhQEuj6CXBklXF0vVOtLcRG7dMxIk9euYdx423TdpMXV0QBRfxPFxyxzWavm1vZ6tztX 3GlShkcThqh6xYkUIN06pA/Er5yaMhA8nifnQ6PuW1LB7ksb5DicT8uUm8DCyZkm5uIzd8 mSmSqZ/bISDvP0Ji470ImWoQ/Vlp7i20WfHSg33/ETMbw4EY6EMPSPJZPSKCaw== From: Mathieu Dubois-Briand Date: Thu, 08 Jan 2026 15:45:43 +0100 Subject: [PATCH v2 2/2] oeqa/gitarchive: Push tag before copying log files MIME-Version: 1.0 Message-Id: <20260108-mathieu-fix-15696-v2-2-fbb0967fdfed@bootlin.com> References: <20260108-mathieu-fix-15696-v2-0-fbb0967fdfed@bootlin.com> In-Reply-To: <20260108-mathieu-fix-15696-v2-0-fbb0967fdfed@bootlin.com> To: openembedded-core@lists.openembedded.org Cc: Thomas Petazzoni , Mathieu Dubois-Briand X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1767883551; l=2670; i=mathieu.dubois-briand@bootlin.com; s=20241219; h=from:subject:message-id; bh=WlBu6G4em83+DKQU6Vj7YEbAjUQ/gEDMYyjUr7OFnUk=; b=JKbfrrYSbYed8C83A4lyp231rMp/tOdHpPQu2ymlMbtFtKAvIv1+Fll60howmkQVnrKLrcvlC AXuAALDALFrD8MQrP39UjtMBU9AdYIcF6OxQBSuKNY/dNxmKyM8oxAt X-Developer-Key: i=mathieu.dubois-briand@bootlin.com; a=ed25519; pk=1PVTmzPXfKvDwcPUzG0aqdGoKZJA3b9s+3DqRlm0Lww= X-Last-TLS-Session-Version: TLSv1.3 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 08 Jan 2026 14:46:02 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/229078 Resulttool creates a git tag in the yocto-testresults git and then copies log files to a newly created folder on the NFS share, whose name is controlled by the name of this git tag. As tags are unique, the folder name is also unique, preventing any clash between different builds. Today, the tag is pushed from the calling script, so after the folder is copied. This can lead to some issues if for any reason the tag is not pushed. This might also lead to some race condition. Allow to push the tag before coying data, in order to prevent these issues, and add a warning if the calling script choose to not push the tag but still copy the log files on the NFS share. Fixes [YOCTO #15696] Signed-off-by: Mathieu Dubois-Briand --- scripts/lib/resulttool/store.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/lib/resulttool/store.py b/scripts/lib/resulttool/store.py index f3caafaff822..dc2c259331b2 100644 --- a/scripts/lib/resulttool/store.py +++ b/scripts/lib/resulttool/store.py @@ -82,9 +82,14 @@ def store(args, logger): "Results of {branch}:{commit}", "branch: {branch}\ncommit: {commit}", "{branch}", False, "{branch}/{commit_count}-g{commit}/{tag_number}", 'Test run #{tag_number} of {branch}:{commit}', '', - excludes, [], False, None, keywords, logger) + excludes, [], args.push_tags, None, keywords, logger) if args.logfile_archive: + if not args.push_tags: + # As no tag was pushed, we can't guarantee there "tagname" + # is uniq and so we might have several builds trying to use + # the same "logdir" target. + logger.warning("Archiving log files but the %s tag was not pushed: this may result in target folder conflicts") logdir = args.logfile_archive + "/" + tagname shutil.copytree(tempdir, logdir) os.chmod(logdir, 0o755) @@ -123,3 +128,5 @@ def register_commands(subparsers): help='only store data for the specified revision') parser_build.add_argument('-l', '--logfile-archive', default='', help='directory to separately archive log files along with a copy of the results') + parser_build.add_argument('-p', '--push-tags', action='store_true', + help='push created tags to remote git')