Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

CloudflareContainerBackend: pass image, instance and containerSnapshot to ctx.container.start() for the durable_object scheduling policy

Cerrado
#176 0 comentarios 1 reacción 1 asignado Ver en GitHub

Los mantenedores suelen responder en 1 día

@aron-cf ya está trabajando en esto.

Desde el 30/9/2026.

Evaluación

Este issue todavía no se ha evaluado.

Descripción

CloudflareContainerBackend cannot start a container on an app that uses the new durable_object scheduling policy, because it never passes an image to ctx.container.start().

What happens today (main at ada64809, 2026-09-29; @cloudflare/computer 0.3.0)

  • ContainerLaunchSpec is { env, enableInternet }, and the host launches with ctx.container.start({ enableInternet, env }).
  • Under durable_object, monitor() rejects a start that names neither image nor containerSnapshot (scheduling policy).
  • With no instance, the container gets lite (1/16 vCPU, 256 MiB), which is too small for computerd plus a build toolchain.
  • #launchAs is private, so a Durable Object using withWorkspaceContainer cannot add these fields itself without replacing ctx.container.

What would fix it

  1. Optional image, instance and containerSnapshot on CloudflareContainerBackendOptions. Each would be a value or a function the backend calls at every launch, so the Durable Object can choose them per task.
  2. Carry the three through ContainerLaunchSpec, and include them in the launch record, so a running container started with a different spec is relaunched, as env and enableInternet already are.
  3. A snapshot(options) method on the host API that passes through to ctx.container.snapshotContainer(). A workspace could then save the container's own disk (tool caches) before setInactivityTimeout lets it sleep. /workspace is a mount, so a snapshot leaves it out, and it stays with the Workspace as now.

Why it matters to us

We run CloudflareContainerBackend inside our own Durable Object through withWorkspaceContainer. Moving to the new policy would give us:

  • the faster start path from the 2026-09-30 post;
  • an instance size chosen per task;
  • no app-wide rollout that replaces containers while a build is running.
Lenguaje dominante
TypeScript
Estrellas
9.5k
Forks
552
Merge medio
2 d 5 h
PR fusionados (30 d)
48

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de cloudflare/computer

Todos los issues de cloudflare/computer

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.