Commit Graph

23 Commits

Author SHA1 Message Date
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