Skip to content

Commit b9fbc2e

Browse files
refactor(routes): drop the complete Flight worker message (#838)
* refactor(routes): drop the complete Flight worker message Generated Flight workers have streamed chunk and end since #718. The production invocation host kept a complete branch for artifacts compiled before it, and the epoch store could restore one across a dev-server restart. Such an artifact now fails its render until the project rebuilds. * docs(changeset): reference the pull request number
1 parent 0dad46c commit b9fbc2e

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"agent-bundle": minor
3+
---
4+
5+
Drop the `complete` Flight worker message from the development server's production route invocation path. Generated workers have streamed `chunk` and `end` since #718, so an artifact compiled before that and restored from the epoch store now fails its render with `Compiled route worker failed.` instead of rendering one buffered document. Rebuild the project to restore rendering. (#838)

‎packages/agent-bundle/src/dev/routes/route-invocation-production.ts‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ interface WorkerMessage {
6868
readonly status?: 'failed' | 'mounted';
6969
readonly type:
7070
| 'chunk'
71-
| 'complete'
7271
| 'end'
7372
| 'error'
7473
| 'observed-handler'
@@ -348,11 +347,7 @@ const streamFromWorker = (
348347
}
349348
pending.delete(message.id);
350349
entry.dispatchSignal.removeEventListener('abort', entry.abort);
351-
// `complete` is the whole render in one message from a Flight worker
352-
// compiled before #718; the epoch store restores such artifacts across
353-
// dev-server restarts until the project rebuilds.
354-
if (message.type === 'complete' && message.bytes !== undefined) entry.controller.enqueue(message.bytes);
355-
if (message.type === 'end' || message.type === 'complete') {
350+
if (message.type === 'end') {
356351
entry.controller.close();
357352
return;
358353
}

0 commit comments

Comments
 (0)