Commit Graph

37 Commits

Author SHA1 Message Date
Nikolay Edigaryev 37b8219579
Switch to github.com/open-telemetry/opentelemetry-swift fork (#1186)
* Switch to github.com/open-telemetry/opentelemetry-swift fork

* Use cirruslabs-owned fork
2026-01-29 16:54:57 +00:00
Nikolay Edigaryev 7038c45f8b
Switch to OpenTelemetry (#1179)
* Switch to OpenTelemetry

* Integration tests in Golang
2026-01-23 12:04:21 +01:00
Nikolay Edigaryev 294c5fc5e5
Upgrade Swift Argument Parser to 1.6.1 (#1103)
* Upgrade Swift Argument Parser to 1.6.1

* Remove ArgumentParser workaround
2025-07-08 00:19:50 +04:00
Nikolay Edigaryev 5793935317
tart ip: implement --resolver=agent (#1095)
* tart ip: implement --resolver=agent

* CI: fix GoReleaser installation
2025-06-19 13:07:06 +04:00
Fedor Korotkov 8248f19943
Update sentry (#1079) 2025-05-28 23:06:10 +00:00
Nikolay Edigaryev dfbdb5559c
Introduce "tart exec" command as an alternative to SSH (#1074)
* Introduce "tart exec" command as an alternative to SSH

* Simplify control socket machinery by using NIO async/await primitives

* No reason to print the "vm" object directly, just refer to it as "VM"

* Log to Apple’s Unified Logging System
2025-05-22 17:28:14 +04:00
Nikolay Edigaryev 31ab4218f7
tart pull: 284% faster pulls with default concurrency setting (#970)
* DiskV2: avoid allocating zero chunk on each zeroSkippingWrite() call

* Increase hole granularity size from 64 KiB to 4 MiB

* Fetcher: never write to disk, thanks to URLSessionDataDelegate
2024-12-11 21:48:59 +04:00
Nikolay Edigaryev 10c6ace671
Re-generate ANTLR files using ANTLR 4.13.2 (#907)
* Re-generate ANTLR files using ANTLR 4.13.2

* Package.swift: require exactly ANTLR of version 4.13.2
2024-09-20 17:50:14 +04:00
Nikolay Edigaryev b98e23956b
Package.swift: bump Sentry SDK to 8.36.0 + upgrade other packages (#905)
* Package.swift: bump Sentry SDK to 8.36.0

* $ swift package update
2024-09-19 19:06:37 +00:00
Nikolay Edigaryev 1b81b12760
tart pull: try to re-use APFS blocks by cloning the base image (#864)
* tart pull: try to re-use APFS blocks by cloning the base image

* Punch a hole when a zero chunk is detected

* Properly retrieve errno when hole punching operation fails

* tart pull: do not retry on RuntimeError

* Ensure that the holes we're about to punch are FS block size-aligned

* VMDirectory: remove unused static variables

* tart pull: log if we've found an image to deduplicate against

* Do not prematurely read contents from disk

* Only consider candidates with deduplicatedBytes more than 0

* APFS reuse UX/DX improvements (#870)

* Show how much deduplication happening

Improvement to the APFS deduplication logic which checks whether a disk image file `mayShareFileContent` with some other file, and then we put a custom attribute to track the deduplication since there is no way to get this information from APFS itself.

It's not 100% accurate but given that OCI cache is immutable the actual disk usage can only be lover than that.

* Use string attribute

* Update Sources/tart/URL+Prunable.swift

Co-authored-by: Nikolay Edigaryev <edigaryev@gmail.com>

* Added SizeOnDisk colume

---------

Co-authored-by: Nikolay Edigaryev <edigaryev@gmail.com>

---------

Co-authored-by: Fedor Korotkov <fedor.korotkov@gmail.com>
2024-07-25 15:33:15 +00:00
Nikolay Edigaryev 79084555f6
tart pull: retry VM pull with exponential backoff (#788) 2024-04-12 21:32:03 +04:00
Fedor Korotkov 896d03ce0b
Fixed Swift Warning (#787)
* Fixed Swift Warning

Plus updated all the dependencies and Swift Tools.

Fixes #785

* Fixed race condition
2024-04-11 19:53:10 +04:00
Nikolay Edigaryev b7b3b702ac
Sentry: upgrade and attach command-line arguments (#774)
* Sentry: upgrade and attach command-line arguments

* Sentry's setContext(): explicitly pass a String
2024-04-02 18:31:16 +04:00
Nikolay Edigaryev 0f47cca746
MAC address resolver: skip expired leases (#669) 2023-11-27 10:12:36 -05:00
Nikolay Edigaryev 1f23b24920
PIDLock: check open(2) error (#538)
* PIDLock: check open(2) error

* Bump Sentry to 8.8.0
2023-07-04 15:22:25 +00:00
Nikolay Edigaryev 4f70d01dd6
Set User-Agent header for OCI HTTP requests (#478)
* Set User-Agent header for OCI HTTP requests

* IORegistry value is actually a NUL-terminated C string

* Use sysctl instead of IOKit
2023-04-28 18:02:57 +04:00
Nikolay Edigaryev ea6fd814f5
Upgrade Sentry to 8.3.3 (#455) 2023-03-29 08:52:17 -04:00
Fedor Korotkov def779e20b
Report to Sentry instead of Puppy (#402)
Instead of logging locally let's report to Sentry.
2023-02-07 20:04:45 +04:00
Fedor Korotkov f34aa5f072
JSON output for get and list commands (#394)
* JSON output for `get` and `list` commands

In the light of the upcoming `1.0.0` release and stabilizing of the API, let's introduce some breaking changes for the good.

Removed all the `--cpu`, `--memory`, `--disk` and `--display` flags and replaced with a single `--json` flag for machine-readable output.

Added `--json` option to the `list` command to output a single JSON list. Notably removed `--quite` flag since it seemed unnecessary.

Fixes #297

* Added Size to `list` output

Fixes #379

* Added running state to `get`

Fixes #393

* Better signature

* Updated tests

* More test fixes
2023-02-04 11:40:39 +04:00
Nikolay Edigaryev d9f1c37cdd
Sentry integration (#352)
* Ditch Foundation.exit()'s where feasible

* Sentry integration

* SwiftFormat

* Upload symbols and sources to Sentry

* Use Sentry Releases

* Do not use ExitCode exceptions

* Clarify why we need CustomNSError extension
2022-12-15 13:50:21 +00:00
Nikolay Edigaryev d9f4f9e954
Switch to github.com/nicklockwood/SwiftFormat version 0.50.6 (#345) 2022-12-05 11:11:57 +04:00
Nikolay Edigaryev e061d00afc
Fix SwiftFormat's URL/glob mishandling (#342)
* Fix SwiftFormat's URL/glob mishandling

* Revert "Fix SwiftFormat's URL/glob mishandling"

This reverts commit 4d1a4c7fb3.

* Use a fixed SwiftFormat

* Another SwiftFormat fix

* Update .cirrus.yml

Co-authored-by: Fedor Korotkov <fedor.korotkov@gmail.com>
2022-11-30 17:53:25 +00:00
Nikolay Edigaryev ad9c3c661e
Reformat code idents and introduce the SwiftFormat linter (#339)
* Package.swift: add SwiftFormat

Can be invoked with "swift package plugin swiftformat".

* $ swift package plugin swiftformat

* .cirrus.yml: run SwiftFormat

* SwiftFormat: exclude Sources/tart/OCI/Reference/Generated
2022-11-29 15:56:13 +00:00
Nikolay Edigaryev 667de2a199
Monitor Softnet process and throw if it terminates prematurely (#270) 2022-10-12 20:00:13 +04:00
Nikolay Edigaryev 44650e9713
Improve RemoteName parser (#225) (#269)
* Improve RemoteName parser

* Remove Parsing import

* Permit namespace components to contain separators, but no more than one

* Add testNoPathTraversal
2022-10-11 22:59:44 +04:00
Nikolay Edigaryev 89301d114e
Log cache pruning to $TART_HOME/tart.log (#265)
* Log cache pruning to $TART_HOME/tart.log

* Log zero capacities
2022-10-07 23:01:42 +04:00
Nikolay Edigaryev 166e3e570f
Ditch AsyncHTTPClient in favor of URLSession (#260) 2022-10-05 00:39:36 +04:00
Nikolay Edigaryev 625d431d10
Revert "Improve RemoteName parser (#225)" (#230)
This reverts commit ae7018c31f.
2022-09-06 22:13:30 +04:00
Nikolay Edigaryev ae7018c31f
Improve RemoteName parser (#225)
* Improve RemoteName parser

* Remove Parsing import

* Permit namespace components to contain separators, but no more than one

* Add testNoPathTraversal
2022-09-06 17:28:49 +04:00
Nikolay Edigaryev 440681320a
Introduce "tart prune" command (#164) 2022-08-12 16:43:04 +03:00
Fedor Korotkov e2b7f12388
Support chunked uploads (#159)
* Support chunked uploads

* Rebase fixes

* Bump swift http client
2022-08-08 10:16:47 -04:00
Fedor Korotkov 35904dc637
Async http client for pull/push (#95)
* Use async http client for pull/push

* Don't update progress too frequently

* Removed unused variable

* Rebased after added tests
2022-05-20 11:04:21 -04:00
Fedor Korotkov 0a257a1547
Option to run in recovery mode (#91)
* Option to run in recovery mode

* Fixed typo

* Use Dynamic package to call private APIs

* Improved comment

* Move options closer to invocation
2022-05-19 08:17:05 -04:00
Nikolay Edigaryev 95316c0d67
Support pulling/pushing VMs to OCI-compatible registries (#32)
* Support pulling/pushing VMs to OCI-compatible registries

* Registry: rename request() to endpointRequest() for clarity

* Registry: include JSON details on HTTP status code mismatch errors

* .cirrus.yml: run tests

* Fix testDigest

* Registry: set Content-{Length,Type} headers when pushing blob

* Refactor Registry.auth() and enrich RegistryError.AuthFailed

* Remove useless comment

* Fix WWWAuthenticate a bit and add tests

* WWWAuthenticate: expect a Bearer scheme

* Registry.auth(): document the passing of ["scope", "service"] parameters

* Clarify unexpected HTTP code error when retrieving auth token

* Make RemoteName parser more relaxed for now

* tart clone: pull the VM if it's OCI-based first

* VMStorageOCI: ensure the old symbolic link is overwritten

* tart push: support multiple remote VM names

* Logging: push/pull progress

* Use 500 MB chunks (instead of 500 MiB) to evenly cut disk

...which also uses powers of 10.

* Credentials: only read credentials labeled "Tart Credentials"
2022-05-03 14:30:26 -04:00
Fedor Korotkov e100cc0d7f
Add App Icon (#23) 2022-04-14 13:23:21 -04:00
Fedor Korotkov 49d430b3c4
Update dependencies and styles (#12)
* Update deps and .editorconfig

* run config
2022-03-24 18:54:49 +03:00
Fedor Korotkov 483627904c
Swift package simplified (#7)
* Convert project to a Swift Package

* SwiftEntitlementsPlugin

* Include .swiftpm

* Removed plugin

* Run configuration to run signed binary

* Cirrus CI Configuration

* Fixed worker label
2022-03-07 11:46:49 -05:00