Project

General

Profile

Actions

Bug #10298

open

[Crunch2] [API] Accept collection UUID or PDH as container_image in a container request

Added by Tom Clegg over 7 years ago. Updated 2 months ago.

Status:
New
Priority:
Normal
Assigned To:
-
Category:
Crunch
Target version:
Story points:
-
Release:
Release relationship:
Auto

Description

Currently, if container_image is
  • ...a docker hash, repo, or repo:tag, then we look up tag links and use the indicated collection
  • ...a PDH, then we look in the indicated collection to see whether it has a single file called (sha256:)?{64-hex-digits}.tar. If so, we use that collection; if not, we try to look for tag links as if it were a docker repo:tag or hash (!).
  • ...a UUID, then we look for tag links as if it were a docker repo:tag or hash.

It is possible to have a docker image with a name that happens to look like a PDH or UUID. In such cases, the image selected by the current code depends not only on whether a real collection with the PDH-like string happens to exist, but also the contents of that collection.

It would be more predictable to say
  • If container_image looks like a collection UUID (".....-4zz18-..........")
    • ...and that collection is readable, then use that collection.
    • ...otherwise, fail.
  • If container_image looks like a PDH ("hexdigest+decsize")
    • ...and that collection is readable, then use that collection.
    • ...otherwise, fail.
  • Otherwise, treat it as a docker repo, repo:tag, or hash, and look up tags as usual.
Actions

Also available in: Atom PDF