Add ORAS CLI integration for multi-platform manifest management#363
Merged
ianpittwood merged 9 commits intomainfrom Mar 3, 2026
Merged
Add ORAS CLI integration for multi-platform manifest management#363ianpittwood merged 9 commits intomainfrom
ianpittwood merged 9 commits intomainfrom
Conversation
Test Results1 177 tests 1 177 ✅ 12m 57s ⏱️ Results for commit 7235a74. ♻️ This comment has been updated with latest results. |
85d7f86 to
dcac285
Compare
1dbf3ea to
6ec926d
Compare
dcac285 to
f268fe1
Compare
Implements an oras-based alternative to `docker buildx imagetools create` for merging multi-platform images. This avoids authentication issues that affect Docker's imagetools when performing cross-registry operations. The workflow: 1. Creates a temporary manifest index from platform-specific sources 2. Copies the index to all target registries/tags 3. Deletes the temporary index Key components: - find_oras_bin() for binary discovery using existing find_bin() pattern - OrasManifestIndexCreate, OrasCopy, OrasManifestDelete command classes - OrasMergeWorkflow orchestrator with from_image_target() factory method - Source validation ensuring all sources are from the same repository Includes 37 unit tests covering command construction, execution, validation, workflow orchestration, and ImageTarget integration. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix validate_sources validator to use image_target._get_merge_sources() - Add sources property to expose merge sources from image target - Fix from_image_target to pass target.labels instead of target.labels.items() - Fix log statement to use self.sources instead of self.image_target.sources - Add destination property to Tag model for grouping by registry/repository - Group copy operations by destination for more efficient tag pushing - Update tests to use mock ImageTarget fixtures Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
f268fe1 to
c654aab
Compare
bschwedler
approved these changes
Mar 2, 2026
|
|
||
| :param ref: The image reference to parse (e.g., "registry.io/repo/image@sha256:digest"). | ||
| :return: A tuple of (registry, repository, tag_or_digest). | ||
| """ |
Contributor
There was a problem hiding this comment.
Would it make sense to put this logic co-located with the Tag model, or is this purely for string translation?
Contributor
Author
There was a problem hiding this comment.
I did this as part of #365 since doing it here would cause a circular dependency.
Comment on lines
+99
to
+100
| "ghcr.io/posit/test/tmp@sha256:amd64digest", | ||
| "ghcr.io/posit/test/tmp@sha256:arm64digest", |
Contributor
There was a problem hiding this comment.
nit: Our registries are under ghcr.io/posit-dev. I know these are just tests, but I don't want there to confusion for humans or LLMs.
Contributor
Author
There was a problem hiding this comment.
Good point, they've been renamed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacks on #364
Summary
docker buildx imagetools createfor merging multi-platform imagesOrasMergeWorkfloworchestrator that creates temporary manifest indexes, copies to target registries, and cleans upChanges
posit_bakery/image/oras/oras.py: Main implementation with command classes and workflow orchestratorposit_bakery/image/oras/__init__.py: Module exportstest/image/oras/test_oras.py: 37 unit tests covering all componentsTest plan
just test -k oras)🤖 Generated with Claude Code