You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by ju...@apache.org on 2021/10/24 19:05:09 UTC

[buildstream] branch juerg/integration-cache updated (754388b -> bdf9c72)

This is an automated email from the ASF dual-hosted git repository.

juergbi pushed a change to branch juerg/integration-cache
in repository https://gitbox.apache.org/repos/asf/buildstream.git.


 discard 754388b  testing/integration.py: Use `utils._force_rmtree()` for cache cleanup
     new bdf9c72  testing/integration.py: Make integration cache cleanup more robust

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (754388b)
            \
             N -- N -- N   refs/heads/juerg/integration-cache (bdf9c72)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/buildstream/testing/integration.py | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

[buildstream] 01/01: testing/integration.py: Make integration cache cleanup more robust

Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

juergbi pushed a commit to branch juerg/integration-cache
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit bdf9c72e1bb2b0eeaa9db79126857133e7b53d8d
Author: Jürg Billeter <j...@bitron.ch>
AuthorDate: Sun Oct 24 20:34:08 2021 +0200

    testing/integration.py: Make integration cache cleanup more robust
    
    We already ignore FileNotFoundError during integration cache cleanup.
    However, the approach with a dummy except clause results in `rmtree()`
    aborting on the first error. Use `ignore_errors=True` to try and remove
    as many files and directories as possible instead of aborting on the
    first error.
---
 src/buildstream/testing/integration.py | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/src/buildstream/testing/integration.py b/src/buildstream/testing/integration.py
index 269b3d3..662111d 100644
--- a/src/buildstream/testing/integration.py
+++ b/src/buildstream/testing/integration.py
@@ -103,11 +103,5 @@ def integration_cache(request):
 
     # Clean up the artifacts after each test session - we only want to
     # cache sources between tests
-    try:
-        shutil.rmtree(cache.cachedir)
-    except FileNotFoundError:
-        pass
-    try:
-        shutil.rmtree(os.path.join(cache.root, "cas"))
-    except FileNotFoundError:
-        pass
+    shutil.rmtree(cache.cachedir, ignore_errors=True)
+    shutil.rmtree(os.path.join(cache.root, "cas"), ignore_errors=True)