Add a tracing span around call to skopeo inspect
This call can fail and with a span we can get better visibility into that. Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com> (cherry picked from commit 7b803d620f9951ef4ee1a17eeb5e46b8c9728e47)
This commit is contained in:
parent
858c0ab252
commit
84f7766dcf
@ -276,7 +276,8 @@ class ContainerTagResolver(object):
|
||||
raise RuntimeError("Failed to find tag name")
|
||||
tag = m.group(1)
|
||||
|
||||
data = _skopeo_inspect(url)
|
||||
with tracing.span("skopeo-inspect", url=url):
|
||||
data = _skopeo_inspect(url)
|
||||
digest = data["Digest"]
|
||||
return url.replace(tag, f"@{digest}")
|
||||
|
||||
@ -1075,7 +1076,7 @@ def format_size(sz):
|
||||
return "%.3g %sB" % (sz, UNITS[unit])
|
||||
|
||||
|
||||
@retry(interval=60, timeout=300, wait_on=RuntimeError)
|
||||
@retry(interval=5, timeout=60, wait_on=RuntimeError)
|
||||
def _skopeo_inspect(url):
|
||||
"""Wrapper for running `skopeo inspect {url}` and parsing the output.
|
||||
Retries on failure.
|
||||
|
Loading…
Reference in New Issue
Block a user