Add OCI transport and base clone with DiskImageKit - #1304
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e3f8702752
ℹ️ 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".
e3f8702 to
ed67af0
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ed67af0ddb
ℹ️ 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".
7641f87 to
4f50c8d
Compare
ed67af0 to
1274d23
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1274d23499
ℹ️ 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".
1274d23 to
2a302c9
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2a302c9d2d
ℹ️ 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".
4f50c8d to
6d110c7
Compare
This change adds transport logic to support push/pull of ASIF layers for VM image.
2a302c9 to
4e13bb5
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4e13bb5b9b
ℹ️ 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".
4e13bb5 to
ad27fc7
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: ad27fc75ba
ℹ️ 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".
ad27fc7 to
9129de6
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9129de6550
ℹ️ 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 reclaimBytes = min(unallocatedBytes, Int(pruneLimit) * 1024 * 1024 * 1024) | ||
| if reclaimBytes > 0 { | ||
| try Prune.reclaimIfNeeded(UInt64(reclaimBytes), sourceVM) | ||
| if sourceVM.isStandalone { |
There was a problem hiding this comment.
Reclaim runtime headroom for stacked clones
When cloning a stacked OCI record or local stacked VM on a constrained host, this guard skips automatic pruning entirely, even though the newly created writable overlay can later grow toward the full guest disk size. As a result, --prune-limit becomes ineffective for the new clone modes and a VM can encounter ENOSPC while reclaimable cache entries remain; calculate suitable writable headroom from the stacked disk geometry instead of limiting reclamation to standalone sources.
Useful? React with 👍 / 👎.
| // digest identifies this OCI cache record and stacked VMs pin it. | ||
| try manifestData.write(to: tmpVMDir.manifestURL) | ||
|
|
||
| try move(digestName, from: tmpVMDir) |
There was a problem hiding this comment.
Preserve explicit-pull status while repairing a digest
When a digest was explicitly pulled, its shared stacked content later becomes missing or corrupt, and the same digest is repaired through a tag, this replacement discards the existing directory's .explicitly-pulled marker. Because the tag path does not execute the name == digestName branch that recreates the marker, moving or deleting that tag later lets gc() remove a digest the user explicitly requested to retain; preserve the marker across replacement.
Useful? React with 👍 / 👎.
This is the second PR adding support for new
DiskImageKit ASIF layers to tart VM images.
https://developer.apple.com/documentation/diskimagekit
This change implements the OCI transport logic and
adds the
tart clone --baseoption to clone an existingVM image into the new layered VM image format.
Issue: #1269