From b83e405e62b0ac63fafbc5b01a0ffe9303bf11bd Mon Sep 17 00:00:00 2001 From: "Christopher Krawczyk (SQL) (from Dev Box)" Date: Tue, 27 Oct 2026 15:44:01 -0700 Subject: [PATCH] chore: prepare 0.2.4 with PostgreSQL lock-safety fix Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: f0e4a2b7-cb07-472c-8af1-62da8abd5a63 --- .github/copilot-instructions.md | 2 +- CHANGELOG.md | 19 +++++++++++++++++++ Cargo.toml | 2 +- README.md | 10 ++++++++++ npm/npm/darwin-arm64/package.json | 2 +- npm/npm/darwin-x64/package.json | 2 +- npm/npm/linux-arm64-gnu/package.json | 2 +- npm/npm/linux-x64-gnu/package.json | 2 +- npm/npm/win32-x64-msvc/package.json | 2 +- package-lock.json | 14 +++++++------- package.json | 12 ++++++------ 11 files changed, 49 insertions(+), 20 deletions(-) diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 9e95147..bb6e8bf 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -172,7 +172,7 @@ Activities have no restrictions — they run once, result is cached. Release manifests must resolve `duroxide` and `duroxide-pg` from crates.io: ```toml duroxide = { version = "0.1.32", features = ["sqlite"] } -duroxide-pg = "0.1.37" +duroxide-pg = "0.1.38" ``` Temporary local `[patch.crates-io]` sections or inline `path =` overrides are diff --git a/CHANGELOG.md b/CHANGELOG.md index d9aedf3..054a5e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.2.4] - 2026-10-27 + +### Changed + +- Require `duroxide-pg` 0.1.38. PostgreSQL connections apply migration `0026`, + which replaces the renewal and acknowledge procedures and adds a unique + index on `instance_locks(lock_token)`. The index is not built concurrently; + it blocks writes to that table while it builds. Check database upgrade and + rollback compatibility before deployment. An older native build can reject + a database with a migration it does not know. + +### Fixed + +- Adopt the provider's [lock-safety fix](https://github.com/microsoft/duroxide-pg/pull/44). + It fixes deadlocks between renewal and fetch, acknowledge or abandon, prevents + renewal from reviving an expired lease or shortening a live one, and rejects + acknowledge after another worker has taken over. Renewal retries transient + errors. There is no JavaScript API change. + ## [0.2.3] - 2026-10-21 ### Changed diff --git a/Cargo.toml b/Cargo.toml index bf02282..4bae888 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ crate-type = ["cdylib"] [dependencies] duroxide = { version = "0.1.32", features = ["sqlite"] } -duroxide-pg = "0.1.37" +duroxide-pg = "0.1.38" napi = { version = "2", features = ["async", "napi6", "serde-json"] } napi-derive = "2" async-trait = "0.1" diff --git a/README.md b/README.md index a23acaa..5199401 100644 --- a/README.md +++ b/README.md @@ -155,6 +155,16 @@ const provider = await PostgresProvider.connectWithSchema( ); ``` +#### Upgrading to 0.2.4 + +This release uses `duroxide-pg` 0.1.38. Connecting applies migration `0026`, +including a unique index on `instance_locks(lock_token)`. The index is not +built concurrently and blocks writes to that table while it builds. + +Qualify the database upgrade and rollback before deployment. An older native +build can reject an unknown applied migration. Reinstalling an older npm package +does not undo a database migration. The JavaScript API is unchanged. + ### PostgreSQL with Microsoft Entra ID (Azure) For Azure Database for PostgreSQL Flexible Server, use Entra ID token authentication instead of a password: diff --git a/npm/npm/darwin-arm64/package.json b/npm/npm/darwin-arm64/package.json index 218c054..3ba7fba 100644 --- a/npm/npm/darwin-arm64/package.json +++ b/npm/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "duroxide-darwin-arm64", - "version": "0.2.3", + "version": "0.2.4", "os": [ "darwin" ], diff --git a/npm/npm/darwin-x64/package.json b/npm/npm/darwin-x64/package.json index 6645b4a..c8209a0 100644 --- a/npm/npm/darwin-x64/package.json +++ b/npm/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "duroxide-darwin-x64", - "version": "0.2.3", + "version": "0.2.4", "os": [ "darwin" ], diff --git a/npm/npm/linux-arm64-gnu/package.json b/npm/npm/linux-arm64-gnu/package.json index dd519b2..55f091b 100644 --- a/npm/npm/linux-arm64-gnu/package.json +++ b/npm/npm/linux-arm64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "duroxide-linux-arm64-gnu", - "version": "0.2.3", + "version": "0.2.4", "os": [ "linux" ], diff --git a/npm/npm/linux-x64-gnu/package.json b/npm/npm/linux-x64-gnu/package.json index fa022a1..5fb8f6f 100644 --- a/npm/npm/linux-x64-gnu/package.json +++ b/npm/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "duroxide-linux-x64-gnu", - "version": "0.2.3", + "version": "0.2.4", "os": [ "linux" ], diff --git a/npm/npm/win32-x64-msvc/package.json b/npm/npm/win32-x64-msvc/package.json index af12547..9d381bc 100644 --- a/npm/npm/win32-x64-msvc/package.json +++ b/npm/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "duroxide-windows-x64", - "version": "0.2.3", + "version": "0.2.4", "os": [ "win32" ], diff --git a/package-lock.json b/package-lock.json index f76443b..c84c975 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "duroxide", - "version": "0.2.3", + "version": "0.2.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "duroxide", - "version": "0.2.3", + "version": "0.2.4", "license": "MIT", "devDependencies": { "@napi-rs/cli": "^2.18.0", @@ -16,11 +16,11 @@ "node": ">= 18" }, "optionalDependencies": { - "duroxide-darwin-arm64": "0.2.3", - "duroxide-darwin-x64": "0.2.3", - "duroxide-linux-arm64-gnu": "0.2.3", - "duroxide-linux-x64-gnu": "0.2.3", - "duroxide-windows-x64": "0.2.3" + "duroxide-darwin-arm64": "0.2.4", + "duroxide-darwin-x64": "0.2.4", + "duroxide-linux-arm64-gnu": "0.2.4", + "duroxide-linux-x64-gnu": "0.2.4", + "duroxide-windows-x64": "0.2.4" } }, "node_modules/@napi-rs/cli": { diff --git a/package.json b/package.json index 37c856e..8fd5944 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "duroxide", - "version": "0.2.3", + "version": "0.2.4", "description": "Durable execution runtime for Node.js, powered by Rust", "main": "lib/duroxide.js", "types": "lib/duroxide.d.ts", @@ -44,11 +44,11 @@ "node": ">= 18" }, "optionalDependencies": { - "duroxide-darwin-arm64": "0.2.3", - "duroxide-darwin-x64": "0.2.3", - "duroxide-linux-arm64-gnu": "0.2.3", - "duroxide-linux-x64-gnu": "0.2.3", - "duroxide-windows-x64": "0.2.3" + "duroxide-darwin-arm64": "0.2.4", + "duroxide-darwin-x64": "0.2.4", + "duroxide-linux-arm64-gnu": "0.2.4", + "duroxide-linux-x64-gnu": "0.2.4", + "duroxide-windows-x64": "0.2.4" }, "files": [ "index.js",