A handled getWritable() failure still fails the step after its body returns
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
- Área
- backend, distributed-systems
Línea de trabajo
Start in step/writable-stream.js and flushable-stream.js to trace how stream failures reach ctx.ops, then inspect runtime/step-executor.js and its opsSettled handling. Reproduce the failure with a world whose streams.write rejects with a 503 StreamError, and compare the available handling options in the issue. Done means a caught secondary stream failure no longer fails the step or discards its returned value, while unhandled failures retain current behavior.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
A step that writes to getWritable() fails after its body returns whenever any write to that stream failed, even when the step body caught the write error and finished its own work. There is no way to mark a step stream as best-effort, so a transient platform fault on a secondary output turns a completed step into a failed one.
Versions
@workflow/core5.0.0-beta.51@workflow/world-vercel5.0.0-beta.46
What happens
- The step body writes UI chunks to
getWritable(). A PUT to/v2/runs/<run>/stream/<name>fails (for exampleStream write failed: HTTP 503, ortransport failure after 300005ms (UND_ERR_INFO)).world-vercelcorrectly doesn't retry the append (streamer.js, stream retry options skip 5xx because appends aren't idempotent). - The step body catches the rejected
writer.write(), stops writing to that stream, and finishes its real work (it persists the result elsewhere and settles billing). Then it returns normally. getWritable()pushed the flushable state's promise intoctx.ops(step/writable-stream.js:ctx.ops.push(state.promise)). The pipe failure rejects it (flushable-stream.js,flushablePipePerChunkcatch →state.reject(err)).- After the body returns,
runtime/step-executor.jsawaitsPromise.all(ops)in theopsSettledrace and rethrows every rejection exceptAbortError/ResponseAborted(isClientDisconnectError). So the step fails with the stream's error. WithmaxRetries: 0the run endsfailed, and anything the workflow does after the step (settling state, enqueueing analytics from the step's return value) never runs.
Result: the user-visible work is complete, but the run is recorded as failed and the step's return value is lost.
Expected
A way for a step to own the failure of a stream it wrote to. Any of these would work for us:
- an option such as
getWritable({ failStepOnError: false })(or a best-effort mode) that keeps the stream out of the step's fatal ops; - an API to abandon or detach a writable after a handled failure, so its rejection no longer fails the step;
- treating a stream failure the step body already observed (the writer's
write()/close()rejected into user code) as handled.
Repro sketch
In a step: get a writer from getWritable(), write a few chunks, make a write fail at the sink (a world whose streams.write rejects with a StreamError of status 503 reproduces it), catch the rejection, release the lock, and return a value. The step fails with the stream error instead of completing with the value.
- Lenguaje dominante
- TypeScript
- Estrellas
- 2.5k
- Forks
- 401
- Merge medio
- 1 d 21 h
- PR fusionados (30 d)
- 201
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de vercel/workflow
-
getPortLazy re-runs OS port discovery on every call when it finds no portPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
node-module-esbuild-plugin: getImportedIdentifier only checks the first named import when locating a violationPosiblemente ocupada @div-cowboy la tomó hace 6 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
vercel/workflow#5057 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
code-transform.mdx §ID Generation omits the package-shipped `name@version` ID formPosiblemente ocupada @Mohith26 la tomó hace 113 días. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
Los mantenedores suelen responder en 1 día
Todos los issues de vercel/workflow
Issues similares
-
type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
db-ux-design-system/core-web#8856 ·
Los mantenedores suelen responder en 1 día
-
'!' breaking change is lost when the commit also has an empty BREAKING CHANGE footerPosiblemente ocupada @wittdennis la tomó hoy. Abiertopriority: p3 type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
googleapis/release-please#2971 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 87/100
Los mantenedores suelen responder en 1 día
-
🛠️ dette technique
Dificultad 2/5 1-3 horas Aptitud para principiantes 61/100
betagouv/mon-entreprise#4752 · 1 comentario ·
Los mantenedores suelen responder en 5 días