[Bf-blender-cvs] [5dc1183580e] blender-v2.82-release: Codesign: Possible fix for stamp appearing prior to archive

Sergey Sharybin noreply at git.blender.org
Tue Feb 4 09:50:30 CET 2020


Commit: 5dc1183580e932870064b44246e8fb750a8d806e
Author: Sergey Sharybin
Date:   Tue Feb 4 09:47:59 2020 +0100
Branches: blender-v2.82-release
https://developer.blender.org/rB5dc1183580e932870064b44246e8fb750a8d806e

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.

===================================================================

M	build_files/buildbot/codesign/archive_with_indicator.py

===================================================================

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:



More information about the Bf-blender-cvs mailing list