Simplify image/tag syndication

Open
#2,240 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
csharp, docker
Domain
devops, release

Research direction

Read related issue #2239 first, then compare the manifest.json before/after examples and trace the commands that currently handle tag-level syndication. The change is done when syndication is represented at the image level, syndicated images remain 1:1 with primary images, and copying or retagging is limited to the final publishing step.

Written by the indexing model from the issue text.

Description

area-infrastructure

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.

Dominant language
C#
Stars
182
Forks
67
Avg merge
1d 20h
Merged PRs (30d)
15

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dotnet/docker-tools

All issues in dotnet/docker-tools

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.