Merge soci and oras plugins into imagetools plugin#619
Open
ianpittwood wants to merge 2 commits into
Open
Conversation
The SOCI and ORAS plugins are almost exclusively used together in CI (the `bakery ci publish` orchestration composes oras index-create → soci-convert → oras index-copy → verify), so consolidate them into a single `imagetools` plugin and move the publish orchestration logic out of the CLI layer and into the plugin. - New `imagetools` plugin (`ImageToolsPlugin`): `execute`/`results` drive SOCI conversion, `merge_execute`/`merge_results` drive ORAS merge, and `publish` holds the multi-phase orchestration migrated from `cli/ci.py`. - CLI: canonical `bakery imagetools merge` / `bakery imagetools soci-convert`, with `bakery oras merge` / `bakery soci convert` preserved as hidden back-compat aliases. `bakery ci publish` / `bakery ci merge` are unchanged thin wrappers delegating to `ImageToolsPlugin.publish`. - pyproject: replace the `oras` + `soci` entry points with `imagetools`. - SociOptions keeps its `tool: soci` literal, so existing bakery.yaml files parse unchanged. - Consolidate tests under test/plugins/builtin/imagetools/ and update import paths, patch targets, and the ci publish/merge delegation. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
333aca4 to
b48a30e
Compare
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.
This change lays the groundwork to parallelize
bakery ci publishcalls on a per-target basis by mergingsociandorasintoimagetoolsand migrating the heavily CLI entrypoint driven logic to the same plugin. Future parallelized calls will need to be batched together in an order, this eases that future logic.Summary
The SOCI and ORAS plugins are almost exclusively used together in CI (the
bakery ci publishorchestration composesoras index-create→soci-convert→oras index-copy→verify), so this consolidates them into a singleimagetoolsplugin and moves the publish orchestration out of the CLI layer and into the plugin.Changes
imagetoolsplugin (ImageToolsPlugin):execute/resultsdrive SOCI conversion,merge_execute/merge_resultsdrive ORAS merge, andpublishholds the multi-phase orchestration migrated fromcli/ci.py.oras.py,soci.py, andoptions.pymoved (as renames) from the old plugins.bakery imagetools merge/bakery imagetools soci-convert, withbakery oras merge/bakery soci convertkept as hidden back-compat aliases.bakery ci publish/bakery ci mergeare unchanged thin wrappers delegating toImageToolsPlugin.publish.oras+socientry points with a singleimagetoolsentry point.SociOptionskeeps itstool: sociliteral, so existingbakery.yamlfiles in sibling repos parse unchanged.test/plugins/builtin/imagetools/with updated import paths, patch targets, and theci publish/mergedelegation seams.Notes
This branch was rebased on the latest
main. All ofmain's recent additions to these files are preserved: the retry logic (RetryPolicy/retry_on_transient) on the ORAS/SOCI workflows, theOrasWaitForSourcesWorkflowGHCR eventual-consistency pre-flight, and the--dev-specoption + wait-for-sources block onci publish(manually ported into the plugin'spublish, since the orchestration moved files).Verification
just test): 1875 passedruff check/ruff format --checkcleanbakery imagetools merge/soci-convert, the hiddenoras/socialiases, andbakery ci publish --dev-spec🤖 Generated with Claude Code