[release-1.35] Add support for additional read-only artifact stores#9829
Conversation
This commit implements the logic allowing users to configure additional
read-only paths for OCI artifacts. This addresses use cases where artifacts
(such as large AI models) are pre-populated on shared filesystems or
read-only media, preventing redundant downloads to the graph root.
Changes included:
1. Core Logic (internal/ociartifact):
- Updated `Store` struct and `NewStore` to accept `additionalPaths`.
- Implemented `resolveRootPath` helper to look up artifacts in additional
stores before falling back to the main writeable store.
- Updated `PullData`, `List`, and `BlobMountPaths` to respect these paths.
2. Configuration (pkg/config):
- Added `AdditionalArtifactStores` slice to `RuntimeConfig`.
3. Wiring (server):
- Injected the configuration value into the artifact store initialization.
4. Build & Test Fixes:
- Updated `NewStore` signatures in `internal/storage/image.go` and
`seccompociartifact.go`.
- Added missing test helpers (`SetState`, `SetImpl`, `SetCgroupManager`)
in `container.go`, `config.go`, and `seccompociartifact.go` to ensure
full project compilation and test passing.
Fixes: cri-o#9570
Related: cri-o#9583
Signed-off-by: Paulo Henrique <paulo.hco47@gmail.com>
- Only skip pulling for artifacts found in additional (read-only) stores, not the main store, so tag re-pointing still works as expected - Deduplicate List results by reference only (additional stores win) - Move implementation detail from doc comment into function body - Mark additional_artifact_stores as experimental, subject to change Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: openshift-cherrypick-robot, saschagrunert The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## release-1.35 #9829 +/- ##
=================================================
- Coverage 67.53% 46.48% -21.06%
=================================================
Files 211 169 -42
Lines 29161 25757 -3404
=================================================
- Hits 19693 11972 -7721
- Misses 7793 12602 +4809
+ Partials 1675 1183 -492 🚀 New features to boost your workflow:
|
|
/override ci/prow/e2e-aws-ovn |
|
@saschagrunert: Overrode contexts on behalf of saschagrunert: ci/prow/e2e-aws-ovn DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
45558dc
into
cri-o:release-1.35
This is an automated cherry-pick of #9702
/assign saschagrunert