Enable registry to process OCI 1.1 reference manifests

Why are we doing this work

To support the OCI 1.1 referrals API, we need a way to associate referral manifests with their subject. The proposed way to do this is to add a new column onto the manifests table.

See: Pushing Manifests with Subject

Non-functional requirements

  • Documentation:
  • Feature flag:
  • Performance:
  • Testing:

Implementation plan

We will make the following changes to the container registry:

  1. Write database migration(s):
    1. Add a subject_manifest_id bigint column onto the manifests table
    2. Add a self-referencing foreign key onto subject_manifest_id with ON DELETE cascade
  2. Update manifest persistence:
    1. If the manifest has a subject, look up the subject manifest by digest
    2. Return 404 if the subject manifest does not exists
    3. Set subject_manifest_id to the ID of the subject manifest
    4. Return the subject manifest's digest in the OCI-Subject HTTP header

Verification steps

Edited by Brian Williams