Skip to content
Draft
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
6 changes: 5 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,8 @@ jobs:
set -euo pipefail
git tag "v$VERSION"
git push origin "v$VERSION"
gh release create "v$VERSION" --generate-notes --title "v$VERSION"
if [[ "$VERSION" == *-* ]]; then
gh release create "v$VERSION" --generate-notes --title "v$VERSION" --prerelease
else
gh release create "v$VERSION" --generate-notes --title "v$VERSION"
fi
3 changes: 2 additions & 1 deletion packages/workflows/src/rivetkit/driver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,11 @@ class WorkflowStorage {

if (includeState) {
await this.#db.transaction(commit, {
name: "workflow-batch-state",
experimental: { includeState: true },
});
} else {
await this.#db.transaction(commit);
await this.#db.transaction(commit, { name: "workflow-batch" });
}
}
}
Expand Down
5 changes: 4 additions & 1 deletion packages/workflows/tests/rivetkit/driver.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ describe("RivetKit workflow driver", () => {
await driver.batch([write(), write(3, 4)]);
expect(db.transaction).toHaveBeenCalledOnce();
expect(db.transaction.mock.calls[0]?.[1]).toEqual({
name: "workflow-batch-state",
experimental: { includeState: true },
});
});
Expand All @@ -63,7 +64,9 @@ describe("RivetKit workflow driver", () => {
const { controlDriver, db } = createSubject();
await controlDriver.batch([write()]);
expect(db.transaction).toHaveBeenCalledOnce();
expect(db.transaction.mock.calls[0]?.[1]).toBeUndefined();
expect(db.transaction.mock.calls[0]?.[1]).toEqual({
name: "workflow-batch",
});
});

test("reads, lists, and deletes byte-compatible rows", async () => {
Expand Down
Loading