From 5dc1183580e932870064b44246e8fb750a8d806e Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Tue, 4 Feb 2020 09:47:59 +0100 Subject: Codesign: Possible fix for stamp appearing prior to archive From looking into builder's logs it seems that stamp file is picked up prior to actual archive: sometimes worker reports missing archive file, from a code path which is only possible if there is a stamp file. Could be something with IO scheduling where bigger file is sent to Samba server after smaller file. Hopefully with this change this will not happen anymore. --- build_files/buildbot/codesign/archive_with_indicator.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'build_files/buildbot') diff --git a/build_files/buildbot/codesign/archive_with_indicator.py b/build_files/buildbot/codesign/archive_with_indicator.py index 51bcc28520d..0574c964612 100644 --- a/build_files/buildbot/codesign/archive_with_indicator.py +++ b/build_files/buildbot/codesign/archive_with_indicator.py @@ -18,6 +18,7 @@ # +import os from pathlib import Path from codesign.util import ensure_file_does_not_exist_or_die @@ -82,6 +83,10 @@ class ArchiveWithIndicator: If it is violated, an assert will fail. """ assert not self.is_ready() + # Try the best to make sure everything is synced to the file system, + # to avoid any possibility of stamp appearing on a network share prior to + # an actual filr. + os.sync() self.ready_indicator_filepath.touch() def clean(self) -> None: -- cgit v1.2.3