fix: extend Daytona snapshot activation timeout

This commit is contained in:
Bryan Helmkamp 2026-08-23 17:11:14 -04:00
parent 7200d437e9
commit 901bb7a6a8
No known key found for this signature in database
2 changed files with 4 additions and 2 deletions

View file

@ -231,7 +231,7 @@ Custom Daytona snapshot names are computed from the Dockerfile, resource hints,
### "Timed out waiting for snapshot to become active"
Snapshot creation took longer than 10 minutes. This can happen with large Dockerfiles. Check the snapshot status in the Daytona dashboard — it may still be building. Subsequent runs will reuse the snapshot once it's active.
Snapshot creation took longer than 30 minutes. This can happen with large Dockerfiles. Check the snapshot status in the Daytona dashboard — it may still be building. Subsequent runs will reuse the snapshot once it's active.
### Git clone fails for private repositories

View file

@ -76,6 +76,8 @@ const DAYTONA_POST_CLONE_SETUP_TIMEOUT: Duration = Duration::from_mins(5);
/// Best-effort push-credential setup should not consume or extend the required
/// post-clone setup budget.
const DAYTONA_CREDENTIAL_SETUP_TIMEOUT: Duration = Duration::from_secs(10);
/// Budget for a custom snapshot to reach Daytona's active state.
const DAYTONA_SNAPSHOT_ACTIVE_TIMEOUT: Duration = Duration::from_mins(30);
/// Grace for the toolbox to return the server-side command timeout response.
/// The SDK truncates the server timeout to whole seconds, so the server can
/// fire up to one second before the shared deadline; this additional grace
@ -1121,7 +1123,7 @@ impl DaytonaSandbox {
use daytona_api_client::models::SnapshotState;
let mut delay = std::time::Duration::from_secs(2);
let max_delay = std::time::Duration::from_secs(30);
let deadline = Instant::now() + std::time::Duration::from_mins(10);
let deadline = Instant::now() + DAYTONA_SNAPSHOT_ACTIVE_TIMEOUT;
while Instant::now() < deadline {
time::sleep(delay).await;