Repository navigation
docs(website): prepare pgflow 0.18.0 release notes #714
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
pkgs/website/src/content/docs/news/pgflow-0-18-0-worker-reliability.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| --- | ||
| title: 'pgflow 0.18.0: Worker Reliability and Stalled Task Recovery' | ||
| description: 'pgflow 0.18.0 prevents duplicate pending Supabase worker starts, preserves task outcomes, and applies the exhaustion policy when stalled task recovery gives up.' | ||
| date: 2026-11-24 | ||
| authors: | ||
| - jumski | ||
| tags: | ||
| - release | ||
| - bugfix | ||
| featured: false | ||
| draft: false | ||
|
jumski marked this conversation as resolved.
Resolved
|
||
| --- | ||
|
|
||
| import { Aside } from '@astrojs/starlight/components'; | ||
|
|
||
| pgflow 0.18.0 prevents cron from requesting another Supabase worker start while the first is pending. Flow workers on Supabase, Node, and Bun now report a failed result write separately from a failed step handler. Tasks that run out of recovery requeues now follow their step's `whenExhausted` policy. | ||
|
|
||
| <Aside | ||
| type="caution" | ||
| title="Apply the SQL migration before deploying new workers" | ||
| > | ||
| Follow the [worker rollout | ||
| guide](/deploy/worker-management/#upgrade-existing-sql-and-workers) for | ||
| existing Supabase Edge Function workers. New HTTP workers cannot start against | ||
| the old SQL. Older workers can run against the new SQL, but they ignore the | ||
| startup handshake. | ||
| </Aside> | ||
|
|
||
| ## Fewer duplicate worker starts | ||
|
|
||
| Cron could send another HTTP request while a worker was still initializing. The [startup handshake](https://github.com/pgflow-dev/pgflow/pull/711) reserves one pending start per Supabase Edge Function in PostgreSQL. A worker claims the reservation when it registers as ready, not when it receives the request. If the request gets lost or startup hangs, the reservation expires after 60 seconds so pgflow can try again. The same check covers authenticated manual starts in production and HTTP starts in local development. Node and Bun process workers do not use it. | ||
|
|
||
| ## A reporting error is not a handler failure | ||
|
|
||
| A failed database write could make a successful step handler look like it failed. With the [result reporting fix](https://github.com/pgflow-dev/pgflow/pull/708), the worker makes one attempt to save a successful result, even during shutdown or if logging the result fails. If that write returns an error, pgflow reports it without marking the task as failed or sending the write again: PostgreSQL might already have committed it. | ||
|
|
||
| The fix also preserves `0`, `false`, and `""` as task outputs. Null and missing outputs become JSON `null` rather than SQL `NULL`. | ||
|
|
||
| ## Permanently stalled tasks follow the exhaustion policy | ||
|
|
||
| If a task stalls again after three recovery requeues, pgflow archives its message. Previously, the task stayed active and could block the run indefinitely. A [separate cron job](https://github.com/pgflow-dev/pgflow/pull/713) now applies the step's `whenExhausted` policy: `fail`, `skip`, or `skip-cascade`. The stall timestamp and task claim count stay unchanged. | ||
|
|
||
| When scheduled recovery is active, escalation also handles eligible tasks that stalled before the upgrade. [Check for existing stalls](/deploy/troubleshooting-stalled-tasks/#upgrade-with-existing-stamped-tasks) before you apply the migration: `skip` can start work that those tasks previously blocked. | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.