Skip to content

Tart save oci archive - #1279

Draft
mathstuf wants to merge 9 commits into
openai:mainfrom
mathstuf:tart-save-oci-archive
Draft

Tart save oci archive#1279
mathstuf wants to merge 9 commits into
openai:mainfrom
mathstuf:tart-save-oci-archive

Conversation

@mathstuf

@mathstuf mathstuf commented Jul 7, 2026

Copy link
Copy Markdown

100% vibe coded because I'm not familiar with Swift. I have at least spot-checked the code's logic flow; no idea about idiomatic Swift patterns though.

Tested by exporting an image and copying to DockerHub with skopeo's oci-archive: mechanism for the exported file. The blobs copied, but the config failed due to application/vnd.cirruslabs.tart.config.v1 being an unknown media type.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b5253d5e89

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread Sources/tart/OCI/OCIArchiveWriter.swift
@mathstuf
mathstuf marked this pull request as draft July 7, 2026 16:37
mathstuf added 3 commits July 7, 2026 12:38
Replace custom Cirrus Labs layer media types (tart.config.v1, tart.disk.v2,
tart.nvram.v1) with a single standard application/vnd.oci.image.layer.v1.tar+gzip
layer containing the VM files as a tar+gzip archive.

This makes the archive fully compatible with skopeo, Docker, and any OCI-compliant
tool, since all layers use standard media types. The OCI config labels still carry
tart-specific metadata (disk format, etc.) for round-tripping.
Use the same OCI manifest format and custom Cirrus Labs layer media
types (config.v1, disk.v2, nvram.v1) that tart push produces. skopeo
copy --format oci already works with images pushed by tart push, so the
archive now matches that format exactly.
@mathstuf

mathstuf commented Jul 7, 2026

Copy link
Copy Markdown
Author

This at least gets to DockerHub. Need to test that pulling the image from there works.

@mathstuf

mathstuf commented Jul 8, 2026

Copy link
Copy Markdown
Author

Pulling the image fails with:

tart command returned non-zero exit code: "Error: DecodingError.dataCorrupted: Data was corrupted. Debug description: The given data was not valid JSON.. Underlying error: Error Domain=NSCocoaErrorDomain Code=3840 \"Unexpected character '<' around line 1, column 1.\" UserInfo={NSJSONSerializationErrorIndex=0, NSDebugDescription=Unexpected character '<' around line 1, column 1.}"

This happens with both skopeo copy between a GitLab registry and DockerHub and the oci-archive export of this PR and DockerHub. I'm partial to blaming skopeo here. I plan on using dive to investigate the two, but it'll take time to pull the data down.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant