* Improved format for fast and efficient pulls from remote OCI-registry
* Tests: introduce fileWithRandomData() helper function
* Remove useless continuation
* --concurrency should be an option, not an argument
* --v2-disk-format → --old-disk-format and use the new V2 by default
* Reduce LZ4 buffer size from 64 to 4 MiB
* --old-disk-format → --disk-format=...
* Support wildcards in `credHelpers`
With #591 `tart pull` fails when for example you have `ecr-login` set as the default `credsStore` but you try to pull our images from `ghcr.io`.
This change reverts #591 and instead supports regex in `credHelpers`. This is not supported by Docker itself but highly demanded in https://github.com/docker/cli/issues/2928
I think it's fine to support it for Tart.
Additionally this change bumps the minimum host macOS version to Ventura in order to bring `Regex`. Yes, `Regex` only supported in Swift for macOS 13+ 🤦♂️I think it's fine in the light of Sonoma release and Tart 2.0.0.
* Removed Monterey mentions from docs
This way for #581 we don't need to specify a fully quialified URL and can simply use the following `~/.docker/config.json`:
```json
{
"credsStore": "ecr-login"
}
```
Related to https://github.com/docker/cli/issues/2928
* GC avoidance and tmpDeterminstic
* change tmpDeterministic to use hashing
- temporaryDeterministic() now takes in a key and hashes it
- creates directory with the hash
* Update Sources/tart/VMStorageOCI.swift
Co-authored-by: Fedor Korotkov <fedor.korotkov@gmail.com>
---------
Co-authored-by: Fedor Korotkov <fedor.korotkov@gmail.com>
Seems in 2.0.0 release they broke looping. Right now animation on https://tart.run/ is always looping even without `loop` property. I was able to disable it, so I just downgraded to the last known working version.
* Don't delete an initiator of pruning
Sometimes people have an image that is greater than half of the disk itself. In that case such image will be pulled and prunned right away.
This change makes sure that an image that is being cloned from is not pruned right away.
* Resolve symbolic links
* Allow mounting a single directory without a name
To utilize `VZSingleDirectoryShare` which seems more stable than `VZMultipleDirectoryShare`.
We've been having reports from users that mounted directories occasionally return "no such file" errors when building large projects. I took a stab at reproducing the issue by running https://github.com/devMEremenko/XcodeBenchmark in a mounted directory:
```bash
tart run --dir=workdir-test:~/workspace-temp/XcodeBenchmark ventura-xcode
```
And I was able to reproduce the "no such file" error on the first try! After looking into the issue I decided to try `VZSingleDirectoryShare` as this PR changes and to my pleasant surprise it all worked like a charm the next run. So it seems there is a bug in `VZMultipleDirectoryShare` integration with virtiofs. Since in most cases users only mount a single directory it makes sense to allow doing it wihtout providing a `name`.
So now it will be possible to run the following command:
```bash
tart run --dir=~/workspace-temp/XcodeBenchmark ventura-xcode
```
Which will make `~/workspace-temp/XcodeBenchmark` available under `/Volumes/My Shared Files/` without any intermediate directories.
* Reformat
* Updated description
* Upload debug files to both Sentry projects
Apparently it's not possible to share debug files cross projects. So let's upload to both of them. To one we use in production and one we use for testing.
* Use environment variable
* Suspend/resume support
* Use RuntimeError.SuspendFailed for consistency's sake
* Add a comment about "Running" field deprecation
* Use compute credits
* Use Mac-specific input devices and remove --no-{audio,entropy}
* Suspend the VM when closing window and running with --suspendable
* Snapshotting Improvements (#539)
* Don't use static field for arguments
It throws a runtime error
* Fixed suspendability
* Lazy generation of new MAC addresses
To support cloning on suspended VMs
* Refactored
* formatted
* Configurable signal for window closing
* reformatted
* Don't generate MAC only for suspended VMs
* Removed misleading comment
* Reverted
* Lock while a suspendable VM is starting
* Lock on TART_HOME
---------
Co-authored-by: Fedor Korotkov <fedor.korotkov@gmail.com>
* Optimistically check if we need to do anything on a pull
Right now on a pull we always acquire a lock for a registry host. This is problematic because, for example, host can be pulling `ghcr.io/cirruslabs/macos-ventura-xcode:15-beta-2` image when a new request will come to pull `ghcr.io/cirruslabs/macos-ventura-xcode:latest` if needed.
In this situation, even though `ghcr.io/cirruslabs/macos-ventura-xcode:latest` is already cached and linked, `tart pull` will wait for a lock.
This change optimistically check if there is something to do at all before acquiring a lock.
* Fix linter errors
---------
Co-authored-by: Nikolay Edigaryev <edigaryev@gmail.com>