diff --git a/.changeset/modernize-dependencies-0-8-0.md b/.changeset/modernize-dependencies-0-8-0.md new file mode 100644 index 000000000..7569224f7 --- /dev/null +++ b/.changeset/modernize-dependencies-0-8-0.md @@ -0,0 +1,21 @@ +--- +'@pgflow/core': minor +'@pgflow/client': minor +'@pgflow/edge-worker': minor +'@pgflow/website': minor +--- + +BREAKING CHANGE: pgflow 0.8.0 requires pgmq 1.5.0+, PostgreSQL 17, and Supabase CLI 2.34.3+ + +This version modernizes infrastructure dependencies and will NOT work with pgmq 1.4.x or earlier. The migration includes a compatibility check that aborts with a clear error message if requirements are not met. + +**Requirements:** +- pgmq 1.5.0 or higher (previously supported 1.4.x) +- PostgreSQL 17 (from 15) +- Supabase CLI 2.34.3 or higher (includes pgmq 1.5.0+) + +**For Supabase users:** Upgrade your Supabase CLI to 2.34.3+ which includes pgmq 1.5.0 by default. + +**For self-hosted users:** Upgrade pgmq to 1.5.0+ and PostgreSQL to 17 before upgrading pgflow. + +**If you cannot upgrade immediately:** Stay on pgflow 0.7.x until your infrastructure is ready. The migration safety check ensures you cannot accidentally upgrade to an incompatible version. diff --git a/.changeset/pgmq-version-bump.md b/.changeset/pgmq-version-bump.md deleted file mode 100644 index 8639eaef1..000000000 --- a/.changeset/pgmq-version-bump.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -'@pgflow/core': minor -'@pgflow/edge-worker': minor ---- - -BREAKING CHANGE: This version requires pgmq 1.5.0 or higher and will NOT work with pgmq 1.4.x. - -The code now depends on schema changes introduced in pgmq 1.5.0 (specifically the headers column in message_record type). The compatibility layer that allowed pgflow to work with pgmq 1.4.x has been removed. - -If you are using Supabase, pgmq 1.5.0+ is included by default in recent versions. If you are self-hosting, you must upgrade pgmq to version 1.5.0 or higher before upgrading pgflow. diff --git a/.changeset/upgrade-postgres-seventeen-supabase.md b/.changeset/upgrade-postgres-seventeen-supabase.md deleted file mode 100644 index 6e48db95a..000000000 --- a/.changeset/upgrade-postgres-seventeen-supabase.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -'@pgflow/core': minor -'@pgflow/client': minor -'@pgflow/edge-worker': minor -'@pgflow/website': minor ---- - -Upgrade PostgreSQL 17 and Supabase CLI 2.54.11. Removes strict version pins for Docker images and PGMQ extension to use latest compatible versions. diff --git a/pkgs/cli/README.md b/pkgs/cli/README.md index 02521b31b..54e30f409 100644 --- a/pkgs/cli/README.md +++ b/pkgs/cli/README.md @@ -15,7 +15,7 @@ This package provides essential tools for setting up, managing, and deploying pg ## Prerequisites -- Supabase CLI v2.0.2 or higher +- Supabase CLI v2.34.3 or higher - Deno v1.45.x or higher (for flow compilation) - Local Supabase project initialized diff --git a/pkgs/core/README.md b/pkgs/core/README.md index d046d4dac..f568809aa 100644 --- a/pkgs/core/README.md +++ b/pkgs/core/README.md @@ -47,6 +47,17 @@ This package focuses on: The actual execution of workflow tasks is handled by the [Edge Worker](../edge-worker/README.md), which calls back to the SQL Core to acknowledge task completion or failure. +## Requirements + +> [!IMPORTANT] +> **pgmq Version Requirement** (since v0.8.0) +> +> pgflow v0.8.0 and later requires **pgmq 1.5.0 or higher**. This version of pgflow will NOT work with pgmq 1.4.x or earlier. +> +> - **Supabase Cloud**: Recent versions include pgmq 1.5.0+ by default +> - **Self-hosted**: You must upgrade pgmq to version 1.5.0+ before upgrading pgflow +> - **Version Check**: Run `SELECT extversion FROM pg_extension WHERE extname = 'pgmq';` to verify your pgmq version + ## Key Features - **Declarative Workflows**: Define flows and steps via SQL tables diff --git a/pkgs/core/project.json b/pkgs/core/project.json index fe50593fe..413399d73 100644 --- a/pkgs/core/project.json +++ b/pkgs/core/project.json @@ -50,6 +50,7 @@ "options": { "cwd": "{projectRoot}", "commands": [ + "../../scripts/supabase-start-locked.sh .", "mkdir -p .nx-inputs", "scripts/atlas-verify-schemas-synced > .nx-inputs/verify-schemas-synced.txt 2>&1 || (cat .nx-inputs/verify-schemas-synced.txt && exit 1)" ], diff --git a/pkgs/core/supabase/migrations/20251104080523_pgflow_upgrade_pgmq_1_5_1.sql b/pkgs/core/supabase/migrations/20251104080523_pgflow_upgrade_pgmq_1_5_1.sql index ed67df611..f4f538fc7 100644 --- a/pkgs/core/supabase/migrations/20251104080523_pgflow_upgrade_pgmq_1_5_1.sql +++ b/pkgs/core/supabase/migrations/20251104080523_pgflow_upgrade_pgmq_1_5_1.sql @@ -1,5 +1,5 @@ -- Migration tested 2025-11-02: --- Successfully verified that this migration fails on pgmq 1.4.4 (Supabase CLI 2.0.2) +-- Successfully verified that this migration fails on pgmq 1.4.4 (Supabase CLI < 2.34.3) -- with clear error message guiding users to upgrade pgmq to 1.5.0+ -- -- Compatibility check: Ensure pgmq.message_record has headers column (pgmq 1.5.0+) diff --git a/pkgs/core/supabase/migrations/atlas.sum b/pkgs/core/supabase/migrations/atlas.sum index 5ac2fd2d8..3ea5f1e2d 100644 --- a/pkgs/core/supabase/migrations/atlas.sum +++ b/pkgs/core/supabase/migrations/atlas.sum @@ -1,4 +1,4 @@ -h1:SeEHqz8uDIqu6Px6f1IajB3NfXOYmetcSxFbp9PiYXY= +h1:GRevz5BG7qrdQxFbQ0XO9f21I5qaYocLc08bN3gVG50= 20250429164909_pgflow_initial.sql h1:I3n/tQIg5Q5nLg7RDoU3BzqHvFVjmumQxVNbXTPG15s= 20250517072017_pgflow_fix_poll_for_tasks_to_use_separate_statement_for_polling.sql h1:wTuXuwMxVniCr3ONCpodpVWJcHktoQZIbqMZ3sUHKMY= 20250609105135_pgflow_add_start_tasks_and_started_status.sql h1:ggGanW4Wyt8Kv6TWjnZ00/qVb3sm+/eFVDjGfT8qyPg= @@ -10,4 +10,4 @@ h1:SeEHqz8uDIqu6Px6f1IajB3NfXOYmetcSxFbp9PiYXY= 20250719205006_pgflow_worker_deprecation.sql h1:pL5cR1/Oag993yWN6sUpE/U3LmVSzAlnoRXJRBtErU8= 20251006073122_pgflow_add_map_step_type.sql h1:D/skgKpaVg5TM8bPovo9FUutQfg35/AzkxEcasYwytY= 20251103222045_pgflow_fix_broadcast_order_and_timestamp_handling.sql h1:K/XnZpOmxfelsaNoJbR5HxhBrs/oW4aYja222h5cps4= -20251104080523_pgflow_upgrade_pgmq_1_5_1.sql h1:xnbHNJkMGWoaIL5RH617CCjM9nX1Yde8TimHpHhk7fM= +20251104080523_pgflow_upgrade_pgmq_1_5_1.sql h1:t+Hu/rqP8b23S+JAjJ86Y8UlOTCfA+085/8RxD7gydA= diff --git a/pkgs/website/src/assets/cover-images/pgflow-0-8-0-modernizing-dependencies-pgmq-1-5-0-and-postgresql-17.png b/pkgs/website/src/assets/cover-images/pgflow-0-8-0-modernizing-dependencies-pgmq-1-5-0-and-postgresql-17.png new file mode 100644 index 000000000..567a9c77a Binary files /dev/null and b/pkgs/website/src/assets/cover-images/pgflow-0-8-0-modernizing-dependencies-pgmq-1-5-0-and-postgresql-17.png differ diff --git a/pkgs/website/src/content/docs/get-started/installation.mdx b/pkgs/website/src/content/docs/get-started/installation.mdx index 82da3a679..724d9dad6 100644 --- a/pkgs/website/src/content/docs/get-started/installation.mdx +++ b/pkgs/website/src/content/docs/get-started/installation.mdx @@ -13,7 +13,7 @@ import { FileTree } from '@astrojs/starlight/components'; Let's set up pgflow in your Supabase project. This setup needs to be done only once per project.