fix(images): Accept http(s)+oci image references - #437
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds parsing and round-tripping support for http+oci and https+oci instance image references.
Changes:
- Introduces scheme-aware image parsing and wire serialization.
- Updates instance creation/editing and image listing behavior.
- Adds unit, integration, and help-output coverage.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
internal/types/image.go |
Preserves URI-based image references. |
internal/types/image_test.go |
Tests image reference behavior. |
internal/images/images.go |
Adds scheme-aware parsing. |
internal/images/images_test.go |
Tests supported formats and errors. |
internal/cmd/instances.go |
Sends URI references to the API. |
internal/cmd/images.go |
Loads URI-backed platform images. |
cmd/unikraft/testdata/TestHelp/instances |
Updates generated help expectations. |
cmd/unikraft/integration/instance_http_oci_test.go |
Adds end-to-end coverage. |
craciunoiuc
force-pushed
the
craciunoiuc/support-http-oci
branch
from
August 4, 2026 16:01
7fa36ff to
cdca2ea
Compare
jedevc
reviewed
Aug 7, 2026
Contributor
Author
|
All comments legitimate, will address |
craciunoiuc
force-pushed
the
craciunoiuc/support-http-oci
branch
2 times, most recently
from
August 20, 2026 13:04
7673dc5 to
4efad6e
Compare
Contributor
Author
|
addressed |
jedevc
force-pushed
the
craciunoiuc/support-http-oci
branch
from
September 30, 2026 10:17
4efad6e to
b52016f
Compare
craciunoiuc
commented
Sep 30, 2026
jedevc
force-pushed
the
craciunoiuc/support-http-oci
branch
4 times, most recently
from
September 30, 2026 14:02
ee6a529 to
26cb700
Compare
jedevc
reviewed
Sep 30, 2026
jedevc
force-pushed
the
craciunoiuc/support-http-oci
branch
6 times, most recently
from
October 1, 2026 09:30
38a4dde to
c3ed1a0
Compare
An http(s)+oci image is fetched by the platform, so the CLI only carries the URI through, verbatim. Parsing moves to image-spec's reference package, and the image listings build on its Reference rather than distribution's types. GitHub-Fixes: TOOL-1093 Signed-off-by: Cezar Craciunoiu <cezar@unikraft.io> Signed-off-by: Justin Chadwell <justin@unikraft.com>
A minimal file server serves a layout out of an imported volume, and the instance has to boot from its http+oci URI and print its output. The layout is repacked before it is served: the node's unpacker wants index.json to list the manifest directly and every directory in the tarball before its contents, which the CLI's layouts don't give it. Signed-off-by: Justin Chadwell <justin@unikraft.com>
jedevc
force-pushed
the
craciunoiuc/support-http-oci
branch
from
October 1, 2026 09:40
c3ed1a0 to
8562251
Compare
jedevc
marked this pull request as ready for review
October 1, 2026 09:42
jedevc
approved these changes
Oct 1, 2026
jedevc
left a comment
Member
There was a problem hiding this comment.
Reviewed-by: Justin Chadwell <justin@unikraft.com>
Approved-by: Justin Chadwell <justin@unikraft.com>
Comment on lines
+617
to
624
| if parsedRef.Scheme().IsHTTP() { | ||
| // A layout served over HTTP is addressed by its URI alone. | ||
| return []ImageEntry{{ | ||
| platformImage: &image, | ||
| Digest: baseDigest, | ||
| Ref: types.NewImageRef(parsedRef), | ||
| }}, nil | ||
| } |
Member
There was a problem hiding this comment.
Yeah, there's no namespaces for this. Expected.
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.



Accepts
http+oci:///https+oci://image references, so an OCI layout served over HTTP works wherever a registry reference does. The node is what fetches it, so the CLI carries the URI through verbatim.The reference grammar and normalization move to
unikraft.com/x/image-spec/reference, replacing the CLI'sinternal/x/referencefork.Depends on unikraft-cloud/x#508 (merged).
GitHub-Fixes: TOOL-1093