Not only is it no longer necessary now that we're caching the
entire shaman result, it actually can lead to missing deletions
if the same sha1 validly exists for different builds (like for
centos8 vs centos9, or crimson vs default, etc.)
Signed-off-by: Dan Mick <dan.mick@redhat.com>
REPO = "ceph-ci/ceph"
# cache shaman search results so we only have to ask once
-short_sha1_cache = set()
sha1_cache = set()
# quay page ranges to fetch; hackable for testing
if ref is None:
return False
- if short_sha1 in short_sha1_cache:
- if verbose:
- print('Found %s in shaman short_sha1_cache' % short_sha1)
- return True
-
error, matches = query_shaman(ref, None, el)
if error:
print('Shaman request failed')
if match['sha1'][0:7] == short_sha1:
if verbose:
print('Found %s in shaman: sha1 %s' % (ref, match['sha1']))
- short_sha1_cache.add(short_sha1)
return True
return False