Skip to content
Commit eae43fa4 authored by Sam Thursfield's avatar Sam Thursfield Committed by Jürg Billeter
Browse files

Don't push artifacts to remote caches that already contain them

This adds two separate checks to avoid pushing artifacts unnecessarily.

First, in the OSTreeCache.push() method we now first obtain the list of
remotes that contain the refs that we are about to push. We then avoid
pushing to any remote that already contains that ref.

Note that the internal ref map is read once on process startup, so
if multiple `bst` processes are pushing to a cache they might still both
push the same artifact. There is an existing issue for this:

  #179

Secondly the Element._skip_push() method now checks if all remote
caches configured for pushing already have a given artifact, and will
skip the push job altogether if they do. The first check would already
mean that no pushes would actually happen, but without the second check
the user would still see Push jobs being created for every artifact
which would be quite misleading.
parent c36a1825
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment