Skip to content

Refactor manifest handling for lists and enhance error management#26

Open
anare wants to merge 2 commits intozebox:masterfrom
anare:advanced_sync
Open

Refactor manifest handling for lists and enhance error management#26
anare wants to merge 2 commits intozebox:masterfrom
anare:advanced_sync

Conversation

@anare
Copy link
Copy Markdown

@anare anare commented Mar 24, 2026

This pull request introduces support for handling Docker image manifest lists (multi-platform images) in the registry service. The changes include new types for manifest lists, updated interfaces and mocks, and new HTTP request logic to accommodate different manifest media types. This enhances the registry's ability to fetch and process both single-architecture and multi-architecture image manifests.

Manifest List and Multi-Platform Support:

  • Added new types: ManifestPlatform, ManifestListSchemaItem, and ManifestListSchema to represent multi-platform image manifests and their platforms in registry.go. [1] [2]
  • Introduced constants for new manifest media types: ManifestSchemeV2, ManifestImageScheme, and ManifestListSchemeV2.

Registry Interface and Implementation Updates:

  • Updated the Manifest method signature to accept a digest and manifest list item, and added a new ManifestList method to the registry interface and all mocks. [1] [2] [3]
  • Implemented new HTTP request methods (newHTTPRequestImage, newHTTPRequestList) to handle different Accept headers and authentication for various manifest types.
  • Refactored the Manifest and ManifestList methods in registry.go to use the new types and HTTP logic, supporting both single and multi-platform manifests.

Testing and Mock Enhancements:

  • Updated all relevant mocks and their call-tracking logic to support the new method signatures and behaviors, including ManifestList. (F645f281L397R442, [1] [2]
  • Added and improved comments for clarity and consistency in test and mock files. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]

Miscellaneous:

  • Moved import statements for store and engine to comply with Go import grouping conventions. [1] [2]
  • Added a method to calculate total compressed image size for manifest lists.

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.

1 participant