Skip to content

Conversation

@jakubno
Copy link
Member

@jakubno jakubno commented Nov 6, 2025

Plan for migration:

  1. Populate Redis with Sandbox data.
  2. Read data from Redis, state transitions still in memory
  3. State transitions and reservations in Redis

Note

Introduce a new pluggable sandbox store with Redis population, refactor orchestrator/handlers to use context-aware store APIs, and enable Redis in CI.

  • Storage/State:
    • Introduce pluggable sandbox.Store wrapping Storage and ReservationStorage with context-aware APIs (Add/Get/Update/Remove/Reserve/Release, Sync).
    • Add memory backend sandbox/storage/memory and Redis backend sandbox/storage/redis (with redislock), plus populate_redis wrapper to mirror writes to Redis.
    • Add reservations package replacing in-memory reservations; comprehensive tests added.
    • Add JSON tags to sandbox.Sandbox.
  • Orchestrator:
    • Wire new store; select Redis-backed storage when Redis client is present.
    • Update GetSandbox, create/keep-alive/delete flows to pass ctx and new store methods; handle add errors and cleanup; use store Sync from nodes; update evictor and team metrics to accept *sandbox.Store.
    • Adjust node sync (nodemanager.Node.Sync) to use store Sync.
  • Handlers:
    • Pass ctx to orchestrator.GetSandbox across connect/get/pause/kill/resume.
  • CI:
    • Start Redis in .github/actions/start-services/action.yml and export REDIS_URL.
  • Deps:
    • Add github.com/bsm/redislock; keep go-redis usage.

Written by Cursor Bugbot for commit f58b5eb. This will update automatically on new commits. Configure here.

@linear
Copy link

linear bot commented Nov 6, 2025

@jakubno jakubno force-pushed the make-api-service-populate-redis-store-eng-3060 branch 2 times, most recently from 35f94ee to 9309d33 Compare November 6, 2025 15:23
@jakubno jakubno marked this pull request as ready for review November 7, 2025 08:22
chatgpt-codex-connector[bot]

This comment was marked as off-topic.

cursor[bot]

This comment was marked as resolved.

Copy link
Contributor

@dobrac dobrac left a comment

Choose a reason for hiding this comment

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

this PR is beautiful 🌸

@jakubno jakubno force-pushed the make-api-service-populate-redis-store-eng-3060 branch from 86b6ed1 to b9b2281 Compare November 18, 2025 12:45
@jakubno jakubno requested a review from dobrac November 18, 2025 12:47
@jakubno jakubno requested a review from dobrac November 20, 2025 15:26
@jakubno jakubno merged commit 656e108 into main Nov 20, 2025
28 checks passed
@jakubno jakubno deleted the make-api-service-populate-redis-store-eng-3060 branch November 20, 2025 17:56
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.

3 participants