INNER CODE UNIT · Python
verified_fingerprint
varunsalian/debrify · tool/webdav_memory_stress/run.py:112
def verified_fingerprint(image):
labels = image["Config"].get("Labels") or {}
try:
fingerprint = json.loads(labels[PROVENANCE_LABEL])
except (KeyError, TypeError, json.JSONDecodeError):
raise SystemExit("Image lacks input provenance; rebuild without --skip-build")
if (fingerprint != input_fingerprint()
or labels.get(INPUT_LABEL) != fingerprint.get("inputDigest")):
raise SystemExit(
"The image does not match the current sources; rebuild without --skip-build"
)
# Reports use the image's copied inputs, even if the workspace changes after
# this check. Never re-read live source files to describe the compiled image.
return fingerprint
def run_case(case, report, timeout, image_id, allow_probe_oom=False):
label, limit, expected, arguments = case