@pgflow/core 0.3.0-alpha.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CHANGELOG.md +28 -0
- package/dist/package.json +1 -1
- package/package.json +2 -2
package/dist/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
# @pgflow/core
|
|
2
2
|
|
|
3
|
+
## 0.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- c3653fa: Replace single-phase polling with two-phase approach to eliminate race conditions
|
|
8
|
+
|
|
9
|
+
**Breaking Change**: The `poll_for_tasks` function is now deprecated and returns an empty set. Edge workers must be updated to use the new two-phase polling mechanism.
|
|
10
|
+
|
|
11
|
+
**What Changed:**
|
|
12
|
+
|
|
13
|
+
- Added new "started" status for step_tasks with `started_at` timestamp and `last_worker_id` tracking
|
|
14
|
+
- Introduced `start_tasks` function for the second phase of task processing
|
|
15
|
+
- Edge worker now uses two-phase approach: first `read_with_poll` to get messages, then `start_tasks` to process them
|
|
16
|
+
- This eliminates race conditions where tasks might not be visible when processing messages
|
|
17
|
+
|
|
18
|
+
**Migration Instructions:**
|
|
19
|
+
|
|
20
|
+
1. Run `npx pgflow install` to apply database migrations and update dependencies
|
|
21
|
+
2. Redeploy your edge workers - they will automatically use the new polling mechanism
|
|
22
|
+
3. Old workers will continue running but won't process any tasks (safe degradation)
|
|
23
|
+
|
|
24
|
+
**Why This Change:**
|
|
25
|
+
The previous `poll_for_tasks` had subtle race conditions on slower systems where messages could be read but matching step_tasks weren't visible in the same transaction, leading to lost work. The new two-phase approach provides stronger guarantees and better observability.
|
|
26
|
+
|
|
27
|
+
### Patch Changes
|
|
28
|
+
|
|
29
|
+
- @pgflow/dsl@0.3.0
|
|
30
|
+
|
|
3
31
|
## 0.2.6
|
|
4
32
|
|
|
5
33
|
### Patch Changes
|
package/dist/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pgflow/core",
|
|
3
|
-
"version": "0.3.0
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"license": "AGPL-3.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"postgres": "^3.4.5",
|
|
27
|
-
"@pgflow/dsl": "0.
|
|
27
|
+
"@pgflow/dsl": "0.3.0"
|
|
28
28
|
},
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"access": "public"
|