Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/rivetkit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
"@bare-ts/lib": "~0.3.0",
"@hono/standard-validator": "^0.1.3",
"@hono/zod-openapi": "^0.19.10",
"@rivetkit/engine-runner": "https://pkg.pr.new/rivet-dev/engine/@rivetkit/engine-runner@f594631",
"@rivetkit/engine-runner": "https://pkg.pr.new/rivet-dev/engine/@rivetkit/engine-runner@03e3532",
"@rivetkit/fast-json-patch": "^3.1.2",
"cbor-x": "^1.6.0",
"hono": "^4.7.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/rivetkit/src/drivers/engine/actor-driver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -411,9 +411,9 @@ export class EngineActorDriver implements ActorDriver {

return streamSSE(c, async (stream) => {
// Runner id should be set if the runner started
const runnerId = this.#runner.runnerId;
invariant(runnerId, "runnerId not set");
stream.writeSSE({ data: runnerId });
const payload = this.#runner.getServerlessInitPacket();
invariant(payload, "runnerId not set");
Copy link

Choose a reason for hiding this comment

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

The error message "runnerId not set" doesn't match what's being validated in the updated code. Since the check is now for payload rather than runnerId, consider updating the error message to something like "serverless init packet not available" to accurately reflect the condition being tested.

Suggested change
invariant(payload, "runnerId not set");
invariant(payload, "serverless init packet not available");

Spotted by Diamond

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

stream.writeSSE({ data: payload });

return this.#runnerStopped.promise;
});
Expand Down
22 changes: 11 additions & 11 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading