Skip to content

Persist sleepAfter to DO storage#504

Merged
ghostwriternr merged 1 commit intomainfrom
fix/persist-sleep-after
Mar 23, 2026
Merged

Persist sleepAfter to DO storage#504
ghostwriternr merged 1 commit intomainfrom
fix/persist-sleep-after

Conversation

@ghostwriternr
Copy link
Copy Markdown
Member

@ghostwriternr ghostwriternr commented Mar 18, 2026

sleepAfter was the only configuration setter not persisted to Durable Object storage. After DO eviction it reverted to the class default while the isolate-local config cache in getSandbox() prevented re-sending it, so the sandbox could silently run with the wrong sleep timeout.

Persist in setSleepAfter() and restore during blockConcurrencyWhile init, matching keepAlive and containerTimeouts.


Open with Devin

sleepAfter was only held in memory, unlike keepAlive and
containerTimeouts. After DO eviction the value reverted to the
default and the config cache prevented re-sending it. Write to
storage in setSleepAfter and restore during init.
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 18, 2026

⚠️ No Changeset found

Latest commit: a63dc35

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Mar 18, 2026

Open in StackBlitz

npm i https://pkg.pr.new/cloudflare/sandbox-sdk/@cloudflare/sandbox@504

commit: a63dc35

@github-actions
Copy link
Copy Markdown
Contributor

📦 Preview Build

Version: 0.0.0-pr-504-a63dc35

Install the SDK preview:

npm i https://pkg.pr.new/cloudflare/sandbox-sdk/@cloudflare/sandbox@504

🐳 Docker images were not rebuilt — no container changes detected. Use the latest release images from Docker Hub.

Copy link
Copy Markdown
Contributor

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

@ghostwriternr ghostwriternr merged commit f5a4ed2 into main Mar 23, 2026
20 checks passed
@ghostwriternr ghostwriternr deleted the fix/persist-sleep-after branch March 23, 2026 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants