@pgflow/core 0.0.0-array-map-steps-302d00a8-20250922101336 → 0.0.0-array-map-steps-302d00a8-20250925065142
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 +66 -0
- package/dist/package.json +1 -1
- package/package.json +2 -2
package/dist/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,71 @@
|
|
|
1
1
|
# @pgflow/core
|
|
2
2
|
|
|
3
|
+
## 0.0.0-array-map-steps-302d00a8-20250925065142
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- e9c2be9: Improve failure handling and prevent orphaned messages in queue
|
|
8
|
+
|
|
9
|
+
- Archive all queued messages when a run fails to prevent resource waste
|
|
10
|
+
- Handle type constraint violations gracefully without exceptions
|
|
11
|
+
- Store output on failed tasks (including type violations) for debugging
|
|
12
|
+
- Add performance index for efficient message archiving
|
|
13
|
+
- Prevent retries on already-failed runs
|
|
14
|
+
- Update table constraint to allow output storage on failed tasks
|
|
15
|
+
|
|
16
|
+
- 2a1c532: Add map step type infrastructure in SQL core
|
|
17
|
+
|
|
18
|
+
## 🚨🚨🚨 CRITICAL MIGRATION WARNING 🚨🚨🚨
|
|
19
|
+
|
|
20
|
+
**THIS MIGRATION REQUIRES MANUAL DATA UPDATE BEFORE DEPLOYMENT!**
|
|
21
|
+
|
|
22
|
+
The migration adds a new constraint `remaining_tasks_state_consistency` that will **FAIL ON EXISTING DATA** if not handled properly.
|
|
23
|
+
|
|
24
|
+
### Required Data Migration:
|
|
25
|
+
|
|
26
|
+
Before applying this migration to any environment with existing data, you MUST include:
|
|
27
|
+
|
|
28
|
+
```sql
|
|
29
|
+
-- CRITICAL: Update existing step_states to satisfy new constraint
|
|
30
|
+
UPDATE pgflow.step_states
|
|
31
|
+
SET remaining_tasks = NULL
|
|
32
|
+
WHERE status = 'created';
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
**Without this update, the migration WILL FAIL in production!** The new constraint requires that `remaining_tasks` can only be set when `status != 'created'`.
|
|
36
|
+
|
|
37
|
+
***
|
|
38
|
+
|
|
39
|
+
## Changes
|
|
40
|
+
|
|
41
|
+
This patch introduces the foundation for map step functionality in the SQL core layer:
|
|
42
|
+
|
|
43
|
+
### Schema Changes
|
|
44
|
+
|
|
45
|
+
- Added `step_type` column to `steps` table with constraint allowing 'single' or 'map' values
|
|
46
|
+
- Added `initial_tasks` column to `step_states` table (defaults to 1, stores planned task count)
|
|
47
|
+
- Modified `remaining_tasks` column to be nullable (NULL = not started, >0 = active countdown)
|
|
48
|
+
- Added constraint `remaining_tasks_state_consistency` to ensure `remaining_tasks` is only set when step has started
|
|
49
|
+
- Removed `only_single_task_per_step` constraint from `step_tasks` table to allow multiple tasks per step
|
|
50
|
+
|
|
51
|
+
### Function Updates
|
|
52
|
+
|
|
53
|
+
- **`add_step()`**: Now accepts `step_type` parameter (defaults to 'single') with validation that map steps can have at most 1 dependency
|
|
54
|
+
- **`start_flow()`**: Sets `initial_tasks = 1` for all steps (map step array handling will come in future phases)
|
|
55
|
+
- **`start_ready_steps()`**: Copies `initial_tasks` to `remaining_tasks` when starting a step, maintaining proper task counting semantics
|
|
56
|
+
|
|
57
|
+
### Testing
|
|
58
|
+
|
|
59
|
+
- Added comprehensive test coverage for map step creation and validation
|
|
60
|
+
- All existing tests pass with the new schema changes
|
|
61
|
+
- Tests validate the new step_type parameter and dependency constraints for map steps
|
|
62
|
+
|
|
63
|
+
This is Phase 2a of the map step implementation, establishing the SQL infrastructure needed for parallel task execution in future phases.
|
|
64
|
+
|
|
65
|
+
- Updated dependencies [6449647]
|
|
66
|
+
- Updated dependencies [fa05f56]
|
|
67
|
+
- @pgflow/dsl@0.0.0-array-map-steps-302d00a8-20250925065142
|
|
68
|
+
|
|
3
69
|
## 0.6.1
|
|
4
70
|
|
|
5
71
|
### 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.0.0-array-map-steps-302d00a8-
|
|
3
|
+
"version": "0.0.0-array-map-steps-302d00a8-20250925065142",
|
|
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.0.0-array-map-steps-302d00a8-
|
|
27
|
+
"@pgflow/dsl": "0.0.0-array-map-steps-302d00a8-20250925065142"
|
|
28
28
|
},
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"access": "public"
|