feat: add root_dir parameter to oci_layers_on_top#168
Merged
tarilabs merged 1 commit intocontainers:mainfrom Apr 6, 2026
Merged
feat: add root_dir parameter to oci_layers_on_top#168tarilabs merged 1 commit intocontainers:mainfrom
tarilabs merged 1 commit intocontainers:mainfrom
Conversation
87c52ff to
529e3c8
Compare
This preserves subdirectory structure in layer arcnames if provided. Signed-off-by: Jon Burdo <jon@jonburdo.com>
529e3c8 to
eb6e605
Compare
This was referenced Mar 31, 2026
Merged
Collaborator
Author
|
I've just gotten back to testing this with |
tarilabs
approved these changes
Apr 6, 2026
Member
tarilabs
left a comment
There was a problem hiding this comment.
I have verified manually with:
poetry run python scripts/test_oras_py.py download quay.io/mmortari/demo20260406:oldsignatureto still be working the old way.
Then, I checked leveraging this new named parameter with:
poetry run python scripts/test_oras_py.py download quay.io/mmortari/demo20260406:newsignatureand local modification as:
diff --git a/scripts/test_oras_py.py b/scripts/test_oras_py.py
index dc5b75a..6968b9f 100644
--- a/scripts/test_oras_py.py
+++ b/scripts/test_oras_py.py
@@ -38,7 +38,7 @@ def main():
print(f" modelcard: {modelcard.relative_to(model_dir)}")
for f in model_files:
print(f" {f.relative_to(model_dir)}")
- oci_layers_on_top(layout_dir, model_files, modelcard)
+ oci_layers_on_top(layout_dir, model_files, modelcard, root_dir="download")
print(f"Pushing to {args.dest} ...")
oras_py_push(layout_dir, args.dest, insecure=args.insecure)and results as intended (subdirectory preserved)
Thanks a lot @jonburdo !
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 preserves subdirectory structure in layer arcnames if provided.