Skip to content

Consume OCI image info in build, generateBuildMatrix, getStaleImages, mergeImageInfo commands - #2157

Merged
lbussell merged 8 commits into
mainfrom
lbussell/oci-image-info-code
Jun 22, 2026
Merged

lbussell merged 8 commits into
mainfrom
lbussell/oci-image-info-code

Conversation

@lbussell

@lbussell lbussell commented Jun 22, 2026 •

Copy link
Copy Markdown
Member

Part 2/3 of #2142. Part 3/3 will be documentation/pipeline changes.

Each commit is independently reviewable. I am taking a slightly different/refined approach compared to #2155. Here are the invariants I followed:

  • OCI image info is not optional.
  • OCI image info is always the source of truth.
  • Commands that previously relied on a file for image info input now pull the artifact directly using ORAS.
  • During builds, image info is always pulled from the publish repo, not a public repo (unless doing a PR build, etc.). This means we don't have to rely on MAR for correctness. It also unlocks internal/private image info tracking for free.
  • Individual image publishers decide whether they want to make OCI image info public or not by choosing the repo destination (one that's onboarded to MAR or not).
  • Publishing to GitHub is downstream of the OCI image info and optional + disabled by default. Eventually we will disable/remove this feature since the automation would be extremely simple to write in a separate GitHub workflow or Azure pipeline something. It doesn't need to be in the publish pipeline.

Out of scope for this MVP:

  • Publishing image infos for individual build legs. These stay as pipeline artifacts for now.
  • Publishing un-merged image info to the build staging registry. Stays as pipeline artifact.
  • Commands that take multiple image infos. Since individual image infos are pipeline artifacts these are still read from files.

Pipeline changes (part 3/3) are currently WIP, pushed here: https://github.com/dotnet/docker-tools/tree/lbussell/oci-image-info-pipelines

lbussell and others added 7 commits June 22, 2026 09:41
Introduce PullAsync and FetchBlobAsync on IOrasService/OrasDotNetService and the OciArtifact/OciBlob records describing pulled manifest and blob content. These are the low-level primitives used to consume image-info published as an OCI artifact.

Co-authored-by: Copilot <[email protected]>
Add a method to pull image-info from the OCI artifact declared by the manifest's imageInfo metadata, validating artifactType, blob media type, and blob count. Shared manifest-artifact validation is factored into GetValidatedImageInfoArtifact.

Co-authored-by: Copilot <[email protected]>
When --image-info-source-path is not supplied and the manifest declares an imageInfo artifact, pull the image-info from the OCI artifact for build-time cache checks instead of relying on a file path.

Co-authored-by: Copilot <[email protected]>
Add --image-info-registry-override and --image-info-repo-prefix options and load image-info from the manifest's OCI artifact when no --image-info path is given. Image artifact details are now loaded asynchronously.

Co-authored-by: Copilot <[email protected]>
Replace the GitHub/Octokit-based image-info lookup with a pull from the manifest's image-info OCI artifact. Add --image-info-registry-override and --image-info-repo-prefix so the central pipeline can source artifacts from a private publish registry.

Co-authored-by: Copilot <[email protected]>
Add --initial-image-info-registry-override, --initial-image-info-repo-prefix, and --initial-image-info-output-path so the initial merge target can be pulled from the OCI artifact during publish instead of a versions repo checkout.

Co-authored-by: Copilot <[email protected]>
Image-info is now pulled from the manifest's OCI artifact rather than a GitHub file referenced by the subscription, so the Subscription.ImageInfo property is no longer needed.

Co-authored-by: Copilot <[email protected]>
@lbussell
lbussell requested a review from a team as a code owner June 22, 2026 17:27
@lbussell

lbussell commented Jun 22, 2026 •

Copy link
Copy Markdown
Member Author

Dismissing the github-code-quality comments about Path.Combine because the inputs are trusted and it only commented on test projects.

@lbussell
lbussell requested a review from mthalman June 22, 2026 20:34
@lbussell
lbussell merged commit 0bf689c into main Jun 22, 2026
14 checks passed
lbussell added a commit that referenced this pull request Jul 1, 2026
This PR reverts:
- #2155 
- #2157

This is related to #2142. Publishing public OCI artifacts to MAR for
this might not be the best long-term decision.

My plan is to take this work in a different direction - see the
following issues for context:
- #2166
- #1602
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants