diff mbox series

[2/2] oeqa/gitarchive: Push tag before copying log files

Message ID 20251230-mathieu-fix-15696-v1-2-b4de13efebc0@bootlin.com
State New
Headers show
Series oeqa/gitarchive: Push tag before copying log files | expand

Commit Message

Mathieu Dubois-Briand Dec. 30, 2025, 5:47 p.m. UTC
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 after the folder is copied, which can lead to
some issues if for any reason the tag is not pushed. This might also
lead to some race condition. Push the tag before coying data, in order
to prevent these issues.

Fixes [YOCTO #15696]

Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
---
 scripts/lib/resulttool/store.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/scripts/lib/resulttool/store.py b/scripts/lib/resulttool/store.py
index b143334e699d..da3fac39ea8d 100644
--- a/scripts/lib/resulttool/store.py
+++ b/scripts/lib/resulttool/store.py
@@ -78,11 +78,12 @@  def store(args, logger):
             if args.logfile_archive:
                 excludes = ['*.log', "*.log.zst"]
 
+            push_tag = args.logfile_archive
             tagname = gitarchive.gitarchive(tempdir, args.git_dir, False, False,
                                   "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, [], push_tag, keywords, logger)
 
             if args.logfile_archive:
                 logdir = args.logfile_archive + "/" + tagname