Skip to content

Simplify image/tag syndication #2240

Description

@lbussell

Related: #2239 (more context therein)

Right now, syndication is declared on a platform/tag level. Syndication is rarely used, but we pay the cost with every command that has to reason about tags. Because the current model does not guarantee that all platforms in an image are syndicated, it forces us to have special handling for syndicated images in every command.

Most of the time with syndication, you would want images/tags to be replicated 1:1 to the syndicated repo. To make this simpler, I propose that syndication is moved from tags to images.

Here is an example of how much simpler this makes things:

manifest.json image before/after

Manifest before proposal:

{
  "sharedTags": {
    "13.6.0": {
      "syndication": {
        "repo": "dotnet/nightly/aspire-dashboard"
      }
    },
    "13": {
      "syndication": {
        "repo": "dotnet/nightly/aspire-dashboard",
        "destinationTags": ["13", "latest"]
      }
    }
  },
  "platforms": [
    {
      "tags": {
        "13.6.0-amd64": {
          "syndication": {
            "repo": "dotnet/nightly/aspire-dashboard"
          }
        }
      }
    },
    {
      "tags": {
        "13.6.0-arm64v8": {
          "syndication": {
            "repo": "dotnet/nightly/aspire-dashboard"
          }
        }
      }
    }
  ]
}

Manifest after proposal:

{
  "syndication": "dotnet/nightly/aspire-dashboard",
  "sharedTags": {
    "13.6.0": {},
    "13": {},
    "latest": {}
  },
  "platforms": [
    {
      "tags": {
        "13.6.0-amd64": {}
      }
    },
    {
      "tags": {
        "13.6.0-arm64v8": {}
      }
    }
  ]
}

By forcing syndicated images to be 1:1 with primary images, this lets us ignore syndication for all purposes except the final publishing step, at which point we would simply re-tag/copy syndicated images and manifest lists to an extra destination.

Metadata

Metadata

Assignees

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions