126 Commits

Author SHA1 Message Date
Nikola Radisic
4cacd2e044
fix(proxy): preserve raw encoded preview path across proxy hops (#4449)
* fix(proxy): preserve raw encoded preview path across proxy hops

Closes #4448

Signed-off-by: Nikola Radisic <radisicc@yahoo.com>

* fix(proxy): update copyright headers per repo convention

Signed-off-by: Nikola Radisic <radisicc@yahoo.com>

* fix(proxy): use commonproxy.RawParam helper in daemon toolbox proxy

apps/daemon/pkg/toolbox/proxy/proxy.go:27-30 inlined the raw-path
extraction logic but omitted two guards that exist in the shared helper:

  1. Empty-string early return: if decodedParam == "" { return "" }
  2. Bounds check: if prefixLen < 0 || prefixLen > len(escapedFull) { return decodedParam }

Without these guards, a mismatch between ctx.Request.URL.Path and
ctx.Param("path") (e.g. due to double-encoding or an unusual router
configuration) would cause an out-of-bounds slice panic instead of
falling back gracefully to the decoded form.

Root cause: the file is in package proxy, so importing
github.com/daytonaio/common-go/pkg/proxy without an alias would cause a
name collision. The inline copy was added to work around the collision
rather than using an aliased import.

Fix: import the shared package as commonproxy and delegate to
commonproxy.RawParam(ctx, "path"). The aliased import compiles cleanly
under the go.work workspace (daemon and common-go are both workspace
members) — the same pattern is already used in apps/runner. Both the
bounds check and the empty-string guard in RawParam are now in effect
here too.

Co-authored-by: Mirko Džaja <mirkodzja0@gmail.com>
Signed-off-by: Nikola Radisic <radisicc@yahoo.com>

---------

Signed-off-by: Nikola Radisic <radisicc@yahoo.com>
Co-authored-by: Mirko Džaja <mirkodzja0@gmail.com>
2026-04-17 12:58:10 +02:00
Ivan Dagelic
22187e79f2
feat(runner): build resource limits
Signed-off-by: Ivan Dagelic <dagelic.ivan@gmail.com>
2026-04-17 11:15:21 +02:00
dependabot[bot]
67e118d22f chore(deps): bump github.com/moby/buildkit in /apps/runner
Bumps [github.com/moby/buildkit](https://github.com/moby/buildkit) from 0.22.0 to 0.28.1.
- [Release notes](https://github.com/moby/buildkit/releases)
- [Commits](https://github.com/moby/buildkit/compare/v0.22.0...v0.28.1)

---
updated-dependencies:
- dependency-name: github.com/moby/buildkit
  dependency-version: 0.28.1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-13 12:20:16 +02:00
Ivan Dagelic
130c73b050
feat(runner): buildkit (#4215)
Signed-off-by: Ivan Dagelic <dagelic.ivan@gmail.com>
2026-04-07 14:36:56 +02:00
Bruno Grbavac
356b68299c
fix(runner): preserve sparse files during rsync copy to prevent quota overflow (#4368)
Signed-off-by: Bruno Grbavac <bruno.grbavac@outlook.com>
2026-04-07 10:51:53 +02:00
Toma Puljak
3566172bfd
fix(runner): image name from resource id in remove snapshot (#4290)
Signed-off-by: Toma Puljak <toma.puljak@hotmail.com>
2026-04-01 13:53:34 +02:00
Toma Puljak
ed576047cc
feat(api,runner,sdk): force stop sandbox (#4172)
Signed-off-by: Toma Puljak <toma.puljak@hotmail.com>
2026-03-26 14:55:49 +01:00
Luka Brecic
cb6628bc6d
fix(runner): pulling snapshot on runner (#4177)
Signed-off-by: Luka Brecic <luka.brecic3@gmail.com>
2026-03-25 13:53:02 +01:00
Toma Puljak
bf349e88a0
feat(runner): inter-sandbox network enabled config (#4122)
Signed-off-by: Toma Puljak <toma.puljak@hotmail.com>
2026-03-24 15:58:59 +01:00
Bruno Grbavac
8a4a0b65b6
fix: match backup completion to snapshot tag (#4145)
Signed-off-by: Bruno Grbavac <bruno.grbavac@outlook.com>
2026-03-23 17:32:31 +01:00
Bruno Grbavac
cebe348c38
fix(runner): use single fuse mount per volume with bind subdirs for subpaths (#4047)
Signed-off-by: Bruno Grbavac <bruno.grbavac@outlook.com>
2026-03-20 14:06:00 +01:00
Luka Brecic
3a8ba4c1f4
fix(runner): handle pulling snapshot on create (#4114)
Signed-off-by: Luka Brecic <luka.brecic3@gmail.com>
2026-03-20 13:46:59 +01:00
Luka Brecic
d7652d14ef
feat(api,runner): add docker healthcheck to runner (#3941)
Signed-off-by: Luka Brecic <luka.brecic3@gmail.com>
2026-03-19 15:03:23 +01:00
Luka Brecic
b2d71cdd2c
fix(api,runner): change allocated metrics to double precision (#4120)
Signed-off-by: Luka Brecic <luka.brecic3@gmail.com>
2026-03-18 11:02:53 +01:00
Ivan Dagelic
e8e66996f1
fix(runner): return nil on sandbox not found (#4105)
Signed-off-by: Ivan Dagelic <dagelic.ivan@gmail.com>
2026-03-17 15:54:19 +01:00
Ivan Dagelic
6406a7e423
fix(runner): treat code 255 as stopped (#4109)
Signed-off-by: Ivan Dagelic <dagelic.ivan@gmail.com>
2026-03-17 15:20:06 +01:00
Luka Brecic
a58eed49ff
fix(api,runner): handle destroy operations and state on runner (#4035)
Signed-off-by: Luka Brecic <luka.brecic3@gmail.com>
2026-03-13 15:36:05 +01:00
Bruno Grbavac
3a3546e132
fix(runner): persist fuse mounts on runner restart (#4093)
Signed-off-by: Bruno Grbavac <bruno.grbavac@outlook.com>
2026-03-13 12:40:11 +01:00
Toma Puljak
1422975ef9
fix(proxy): propagate api error messages to user (#4076)
Signed-off-by: Toma Puljak <toma.puljak@hotmail.com>
2026-03-13 10:18:59 +01:00
Ivan Dagelic
5139b30060
feat(runner): add retry on ip address not found (#4063)
Signed-off-by: Ivan Dagelic <dagelic.ivan@gmail.com>
2026-03-10 14:55:14 +01:00
Ivan Dagelic
e0527cc646
fix(runner): wait for daemon before version check (#4061)
Signed-off-by: Ivan Dagelic <dagelic.ivan@gmail.com>
2026-03-10 14:54:42 +01:00
Toma Puljak
96525f099f
fix(runner): exponential backoff for docker info on init (#4036)
Signed-off-by: Toma Puljak <toma.puljak@hotmail.com>
2026-03-09 16:22:23 +01:00
Toma Puljak
85b711c50b
feat(api,runner,daemon): send org and region id as labels in OTel (#4008)
Signed-off-by: Toma Puljak <toma.puljak@hotmail.com>
2026-03-09 14:21:35 +01:00
Ivan Dagelic
8979033af6
feat(api,runner): job update validation and retries (#3959)
Signed-off-by: Ivan Dagelic <dagelic.ivan@gmail.com>
2026-02-27 16:23:25 +01:00
Luka Brecic
20198caa30
fix(daemon): add graceful shutdown with OTel flush (#3893)
Signed-off-by: Luka Brecic <luka.brecic3@gmail.com>
2026-02-27 14:57:54 +01:00
Toma Puljak
a5a2210972
fix(runner): don't cancel context for telemetry init (#3936)
Signed-off-by: Toma Puljak <toma.puljak@hotmail.com>
2026-02-26 11:00:14 +01:00
Toma Puljak
69459579fe fix(runner): reduce docker calls in create sandbox path
Signed-off-by: Toma Puljak <toma.puljak@hotmail.com>
2026-02-25 13:42:57 +01:00
Goran Draganić
bea16a80d9
feat(runner): structured and OTEL logging (#2775)
Signed-off-by: Goran Draganic <goran@daytona.io>
Signed-off-by: Luka Brecic <luka.brecic3@gmail.com>
Co-authored-by: Luka Brecic <luka.brecic3@gmail.com>
2026-02-24 13:59:57 +01:00
Mirko Džaja
af0cfae1a6
refactor(api,runner,docs): make snapshot pull/build async and poll for result (#3798)
Signed-off-by: MDzaja <mirkodzaja0@gmail.com>
2026-02-24 12:02:10 +01:00
Bruno Grbavac
011e8b61b5
fix(runner): add volume cleanup exclusion period (#3630)
Signed-off-by: Bruno Grbavac <bruno.grbavac@outlook.com>
2026-02-23 12:23:42 +01:00
Ivan Dagelic
f37503c225
fix(runner): snapshot size calculation (#3668)
Signed-off-by: Ivan Dagelic <dagelic.ivan@gmail.com>
2026-02-19 15:17:48 +01:00
Luka Brecic
d65a982540
fix(common-go): implement TTL cache (#3820)
Signed-off-by: Luka Brecic <luka.brecic3@gmail.com>
2026-02-19 14:29:08 +01:00
Toma Puljak
4fd06600fd
fix(runner): do not force websocket logs to octet-stream (#3782)
Signed-off-by: Toma Puljak <toma.puljak@hotmail.com>
2026-02-16 12:59:11 +01:00
Bruno Grbavac
cc2ff96db3
fix(runner): handle pruned image tags and null snapshot in recovery (#3740)
Signed-off-by: Bruno Grbavac <bruno.grbavac@outlook.com>
2026-02-13 14:40:48 +01:00
Ivan Dagelic
e71f6d271f
feat(api): automatic runner draining (#3699)
Signed-off-by: Ivan Dagelic <dagelic.ivan@gmail.com>
2026-02-12 12:54:26 +01:00
Toma Puljak
308269eb3d feat(daemon,api,dashboard,sdk): sandbox OTEL collection
- organizations now support experimental configuration
- sandbox daemon OTEL collection is configured by an endpoint and auth headers
- added an Experimental dashboard page
- sandbox telemetry data can be queried from the dashboard
- added a custom otel collector that proxies otel data
  - supports exporting to clickhouse

Signed-off-by: Toma Puljak <toma.puljak@hotmail.com>
2026-02-11 11:39:27 +01:00
Bruno Grbavac
b00abc5a7d
feat(runner): add volume mountpath labels to containers (#3479)
Signed-off-by: Bruno Grbavac <bruno.grbavac@outlook.com>
2026-02-10 11:46:50 +01:00
Bruno Grbavac
2721ef44d2
fix(runner): added default dry run on volumes cleanup and exit on failed docker list (#3454)
Signed-off-by: Bruno Grbavac <bruno.grbavac@outlook.com>
2026-02-04 12:19:09 +01:00
Bruno Grbavac
676ceb06c3
feat: resize sandbox cpu, mem and disk (#3481)
Signed-off-by: Bruno Grbavac <bruno.grbavac@outlook.com>
2026-01-30 13:45:03 +01:00
Bruno Grbavac
76a9b0b56d
fix(runner): append recovery notice to recoverable error reason (#3482)
Signed-off-by: Bruno Grbavac <bruno.grbavac@outlook.com>
2026-01-26 12:34:48 +01:00
Ivan Dagelic
97c1ac1afc
fix(runner): backup state in progress (#3472)
Signed-off-by: Ivan Dagelic <dagelic.ivan@gmail.com>
2026-01-23 17:27:16 +01:00
Ivan Dagelic
d15fd04d9b
fix(runner): backup timeout (#3467)
Signed-off-by: Ivan Dagelic <dagelic.ivan@gmail.com>
2026-01-23 12:32:28 +01:00
Bruno Grbavac
19ea2ec32b
fix(runner): volumes cleanup (#3430)
Signed-off-by: Bruno Grbavac <bruno.grbavac@outlook.com>
2026-01-21 10:58:39 +01:00
Luka Brecic
e6b583a2a9
feat(api, runner): add cpu load avg metric (#3372)
Signed-off-by: Luka Brecic <luka.brecic3@gmail.com>
2026-01-20 16:29:33 +01:00
Andrija Colović
8b1b94a07e
chore: rename go module to be used externally via new go-sdk (#3367)
Signed-off-by: Aki Colovic <andrijaa@gmail.com>
2026-01-20 11:57:12 +01:00
MDzaja
772af488fd fix(runner): build log filepath
Signed-off-by: MDzaja <mirkodzaja0@gmail.com>
2026-01-18 08:49:11 +01:00
Toma Puljak
fed4feac95 fix(runner): sandbox set recoverable in v0 api
Signed-off-by: Toma Puljak <toma.puljak@hotmail.com>
2026-01-18 08:49:11 +01:00
Toma Puljak
97e4c3950f fix(runner): registry creds
Signed-off-by: Toma Puljak <toma.puljak@hotmail.com>
2026-01-18 08:49:11 +01:00
Toma Puljak
d10ce5a681 chore: format and lint fix
Signed-off-by: Toma Puljak <toma.puljak@hotmail.com>
2026-01-18 08:49:11 +01:00
Toma Puljak
6240e1dfbd feat: job-based runner (v2) (#3219)
- implemented jobs for all runner actions
- v2 runners poll jobs
- v2 runners send healthcheck updates to the api
- runner version changed to apiVersion, add appVersion
- refactored: inspect snapshot in registry
  - changed how snapshot refs are fetched
  - now the runner inspects the snapshot in the registry directly
  - the api no longer calls the registry to get info
  - this is important for self-hosted registries
- added signed port preview urls

Signed-off-by: Toma Puljak <toma.puljak@hotmail.com>
Signed-off-by: Goran Draganic <goran@daytona.io>
2026-01-18 08:49:11 +01:00