* Support Vetu virtualization on Linux in addition to Tart on macOS
* api(portForward): ensure that rendezvousConn is closed
* Re-try SSH connections in integration tests
Because a VM might be still booting.
* controller(api): new "GET /vms/{name}/exec" WebSocket-based endpoint
* Split SSH connection and execution to avoid standard input handoff
* execstream: make Exit field a pointer again
To support serializing exit codes equal to 0.
* Implement server-side filtering for VMs by worker
* Parse more than one filter but error out when more than one is provided
* Fix off-by-one
* No need to use "\n" in Debugf()
* Load testing: synthetic VMs, multiple worker support and Grafana k6 test
* echoserver: prevent fallthrough when Accept() fails
* Move default local-dev context logic to CreateDevController()
* Synthetic: add a random delay to startup script echoing
* Add pagination support for listing VM events
Introduced a paginated event listing API, added support for pagination parameters in the request, and included cursor-based navigation using headers. Relevant tests and Badger store implementations were updated to support the new logic.
* Remove support for ordering VM events
Dropped `ListOrder` type, `order` query parameter, and related logic for ordering VM events. Updated tests, API schema, and Badger store to reflect the removal.
* Remove invalid VM events ordering test
Deleted a test case for invalid VM events ordering since the `order` query parameter and related functionality have been removed.
* Add support for ordering VM events
Implemented `order` query parameter for specifying sort order (ascending/descending) of VM events. Updated API schema, Badger store, and added related tests.
* Add support for limiting and ordering VM logs
Introduced `--limit` and `--order` flags for controlling the number of log lines and their sort order (ascending/descending). Updated API client to handle new options.
* Update internal/controller/store/badger/badger_events.go
Co-authored-by: Nikolay Edigaryev <edigaryev@gmail.com>
* fix: address PR review feedback
- switch logs CLI to --tail with desc ordering
- reuse ParseLogsOrder in controller with helpful errors
- always use ListEventsPage and scope event cursors
- move events pagination coverage to integration test
🤖 Generated with [Codex](https://chatgpt.com/codex)
Co-Authored-By: Codex <codex@openai.com>
* refactor: simplify prefix trimming and improve error formatting
- Replaced manual prefix check with `bytes.TrimPrefix` in Badger store.
- Enhanced error message formatting in VM logs controller.
* fix: address PR review feedback
- use suggested reverse seek in badger events pagination
- add events pagination client helper and use it in integration test
🤖 Generated with [Codex](https://chatgpt.com/codex)
Co-Authored-By: Codex <codex@openai.com>
---------
Co-authored-by: Nikolay Edigaryev <edigaryev@gmail.com>
Co-authored-by: Codex <codex@openai.com>
* Ability to set VM's power state and retrieve backing Tart VM's name
* Validate user-provided "powerState" field
* Introduce TestSpecUpdatePowerStateSuspend
* Introduce TestSpecUpdatePowerStateStopped
* OpenAPI specification: add note about suspended VMs to "tartName" desc.
* Sometimes we need to wait more than 30 seconds
* Simplify state reconciliation and support changing Softnet settings
* Remove unused "updateFunc" parameter from syncOnDiskVMs()
* Don't take an address of a loop variable
* ensure → ensures
* updateVMState(): don't forget to update VMState
* Introduce TestSpecUpdateSoftnet integration test
* Update OpenAPI specification to include generation/observedGeneration
* Support for prefixed Orchard Controller API URLs
* Fix Swagger UI
* Remove spurious "fmt" import
* Use url.URL in order to correctly calculate API path for Swagger UI
* API: introduce ability to watch a VM
* Document ?watch=true for GET /vms/{name} in the OpenAPI specification
* WatchVM: ensure that goroutine is terminated on early return with error
* WatchVM: close channels on goroutine exit
* WatchVM: ensure that we wait for the goroutine after additional barriers
* WatchVM: ignore unexpected keys instead of throwing an error
* WatchVM: perform context-aware writes to a bounded channel
* WatchVM: don't forget to close errCh on goroutine exit too
* WatchVM: don't close readyCh in goroutine to avoid ambiguity
* WatchVM: filter out spurious KVs that signify VM deletion
* Small timout for worker notification
It seems at the moment if a worker re-establishes notify stream (for example, if network flips or proxy breaks the connection) then we can see "no worker registered with this name" errors.
This change makes Notifier to wait for 30 seconds before failing, at the time of calling `Notifier#Notify` we know such worker exists.
PS not sure if we need to make the timeout configurable.
* Wait via context
* Make sure all `context`s for `Notify` is time bounded
* Lint issues
* Allow creating VMs with implicit CPU and memory
* Clarify why cpu/memory can be 0 a bit better
* Controller(API): don't forget to update DefaultCPU and DefaultMemory
* Add an integration test for implicit CPU and memory
* Introduce WebSocket-based RPC v2
* go test: add -ldflags="-B gobuildid"
* No need to change the "controller.workerNotifier.Notify()" error message
* No need to modify Protocol Buffers/gRPC generated code
* rpcWatch(): explain that connection shouldn't be normally be closed
* Avoid "port forwarding failed: " repetition in error messages
* Improve comments and avoid repetition in IP resolution errors
* API: only overwrite specific worker fields when worker already exists
* Don't forget to return when creating new worker
* Return updated worker when updating the worker
* POST /v1/workers: do not list workers in a single update txn
* schedulingLoopIteration(): do not list workers in a single update txn
* .golangci.yml: remove mentions of fully deprecated linters
* Schedule opportunistically and more granularly
To avoid transaction conflicts.
* Measure scheduling loop iteration duration and log it at debugging level
* Use "continue NextWorker" instead of just "continue" for clarity
* Controller: emit lifecycle events when the VM gets restarted or deleted
* vm_{scheduling,run}_time → vm_{scheduling,run}_duration for clarity
* Update VM endpoint: only update VM started time when zero