Skip to content

Begin work to support DiskImageKit in tart - #1303

Open
yzhuang-oai wants to merge 1 commit into
mainfrom
support-diskimagekit
Open

Begin work to support DiskImageKit in tart#1303
yzhuang-oai wants to merge 1 commit into
mainfrom
support-diskimagekit

Conversation

@yzhuang-oai

Copy link
Copy Markdown

This is first of a couple of PRs to add support for the new
DiskImageKit ASIF layers to tart VM images.

https://developer.apple.com/documentation/diskimagekit

This change is focused on laying down the OCI media type for
ASIF layers, the DiskLayerCache structure, DiskImageStack type,
as well as the VMDirectory structure for supporting layers.

Since this is a larger feature I am doing this in smaller PRs to help
with review.

Issue: #1269

@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: fd363baad6

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Sources/tart/VMDirectory.swift Outdated
Comment thread Sources/tart/OCI/Manifest.swift
@yzhuang-oai
yzhuang-oai force-pushed the support-diskimagekit branch from fd363ba to 2c88d63 Compare August 5, 2026 22:48

@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: 2c88d63290

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Sources/tart/DiskLayerCache.swift
@yzhuang-oai
yzhuang-oai force-pushed the support-diskimagekit branch from 2c88d63 to c4a48df Compare August 5, 2026 23:56

@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: c4a48df1f7

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Sources/tart/DiskLayerCache.swift Outdated
Comment thread Sources/tart/DiskLayerCache.swift Outdated
@yzhuang-oai
yzhuang-oai force-pushed the support-diskimagekit branch 2 times, most recently from dd5be53 to 3305159 Compare August 6, 2026 00:29

@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: 3305159cd4

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread Sources/tart/OCI/Manifest.swift Outdated
@yzhuang-oai
yzhuang-oai force-pushed the support-diskimagekit branch from 3305159 to a5e6a62 Compare August 6, 2026 00:36
This is first of several changes to add support for the new
DiskImageKit ASIF layers to tart VM images.

This change is focused on laying down the OCI media type for
ASIF layers, the DiskLayerCache structure, as well as the
VMDirectory structure for supporting layers.

Add DiskImageStack type to model VM image using DiskImage APIs.
@yzhuang-oai
yzhuang-oai force-pushed the support-diskimagekit branch from a5e6a62 to 7641f87 Compare August 6, 2026 22:16

@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: 7641f87b4c

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

let baseURL: URL

init() throws {
try self.init(baseURL: Config().tartCacheDir.appendingPathComponent("OCIs/content", isDirectory: true))

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep cached content outside the registry-host namespace

When using a valid remote whose host is content, namespace is sha256, and tag is a 64-character hex string (for example, content/sha256:<hex>), VMStorageOCI.appendingRemoteName maps the VM to the same path this cache uses for that digest. A pull can therefore replace a cached disk file with a VM directory, while subsequent cache lookups can fail when they attempt to hash that directory. Place the content cache outside OCIs, or under a path component that cannot be a valid registry host.

Useful? React with 👍 / 👎.

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