diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2020-02-04 11:47:59 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2020-02-04 11:47:59 +0300 |
commit | 5dc1183580e932870064b44246e8fb750a8d806e (patch) | |
tree | aec1ea0c3edf3b8c8ad3cce0b5397ac67a313ac3 | |
parent | 0964ae5266541f09a1d54d8941393bada97d08a2 (diff) |
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.
-rw-r--r-- | build_files/buildbot/codesign/archive_with_indicator.py | 5 |
1 files changed, 5 insertions, 0 deletions
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 @@ # <pep8 compliant> +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: |