Wait for all files are in sync before archiving them

This commit is contained in:
Mikhail f. Shiryaev 2022-11-02 13:16:27 +01:00
parent 8ec4c77352
commit 550c776ffe
No known key found for this signature in database
GPG Key ID: 4B02ED204C7D93F4

View File

@ -353,6 +353,11 @@ class ClickhouseIntegrationTestsRunner:
)
def _compress_logs(self, dir, relpaths, result_path):
# We execute sync in advance to have all files written after containers
# are finished or killed
subprocess.check_call( # STYLE_CHECK_ALLOW_SUBPROCESS_CHECK_CALL
"sync", shell=True
)
subprocess.check_call( # STYLE_CHECK_ALLOW_SUBPROCESS_CHECK_CALL
"tar czf {} -C {} {}".format(result_path, dir, " ".join(relpaths)),
shell=True,