From 0be28b787389b7baa0b9a552ea139d93f9e26668 Mon Sep 17 00:00:00 2001 From: Adam Hendel Date: Sat, 15 Jun 2024 12:06:32 -0500 Subject: [PATCH 1/9] move extension to ./extension --- .cargo/config.toml | 3 --- .github/workflows/extension_ci.yml | 16 +++++++--------- .github/workflows/extension_upgrade.yml | 14 +++++++------- UPDATING.md | 4 ++-- META.json.in => extension/META.json.in | 0 Makefile => extension/Makefile | 0 Trunk.toml.in => extension/Trunk.toml.in | 0 .../integration_test}/Cargo.lock | 2 +- .../integration_test}/Cargo.toml | 0 .../integration_test}/tests/integration_tests.rs | 0 pgmq.control => extension/pgmq.control | 0 {sql => extension/sql}/pgmq--0.10.2--0.11.1.sql | 0 {sql => extension/sql}/pgmq--0.11.1--0.11.2.sql | 0 {sql => extension/sql}/pgmq--0.11.2--0.12.0.sql | 0 {sql => extension/sql}/pgmq--0.12.0--0.12.1.sql | 0 {sql => extension/sql}/pgmq--0.12.1--0.13.0.sql | 0 {sql => extension/sql}/pgmq--0.13.0--0.13.1.sql | 0 {sql => extension/sql}/pgmq--0.13.1--0.14.0.sql | 0 {sql => extension/sql}/pgmq--0.14.0--0.14.1.sql | 0 {sql => extension/sql}/pgmq--0.14.1--0.14.2.sql | 0 {sql => extension/sql}/pgmq--0.14.2--0.14.3.sql | 0 {sql => extension/sql}/pgmq--0.14.3--0.15.0.sql | 0 {sql => extension/sql}/pgmq--0.15.0--0.15.1.sql | 0 {sql => extension/sql}/pgmq--0.15.1--0.16.0.sql | 0 {sql => extension/sql}/pgmq--0.16.0--0.17.0.sql | 0 {sql => extension/sql}/pgmq--0.17.0--0.18.0.sql | 0 {sql => extension/sql}/pgmq--0.18.0--0.19.0.sql | 0 {sql => extension/sql}/pgmq--0.19.0--0.20.0.sql | 0 {sql => extension/sql}/pgmq--0.20.0--0.21.0.sql | 0 {sql => extension/sql}/pgmq--0.21.0--0.22.0.sql | 0 {sql => extension/sql}/pgmq--0.22.0--0.23.0.sql | 0 {sql => extension/sql}/pgmq--0.23.0--0.24.0.sql | 0 {sql => extension/sql}/pgmq--0.24.0--0.25.0.sql | 0 {sql => extension/sql}/pgmq--0.25.0--0.26.0.sql | 0 {sql => extension/sql}/pgmq--0.26.0--0.27.0.sql | 0 {sql => extension/sql}/pgmq--0.27.0--0.28.0.sql | 0 {sql => extension/sql}/pgmq--0.28.0--0.29.0.sql | 0 {sql => extension/sql}/pgmq--0.29.0--0.30.0.sql | 0 {sql => extension/sql}/pgmq--0.30.0--0.31.0.sql | 0 {sql => extension/sql}/pgmq--0.31.0--0.31.1.sql | 0 {sql => extension/sql}/pgmq--0.31.1--0.32.0.sql | 0 {sql => extension/sql}/pgmq--0.32.0--0.32.1.sql | 0 {sql => extension/sql}/pgmq--0.32.1--0.32.2.sql | 0 {sql => extension/sql}/pgmq--0.32.2--0.32.3.sql | 0 {sql => extension/sql}/pgmq--0.32.3--0.33.0.sql | 0 {sql => extension/sql}/pgmq--0.33.0--0.33.1.sql | 0 {sql => extension/sql}/pgmq--0.33.1--0.33.2.sql | 0 {sql => extension/sql}/pgmq--0.33.2--0.33.3.sql | 0 {sql => extension/sql}/pgmq--0.33.3--1.0.0.sql | 0 {sql => extension/sql}/pgmq--0.7.3--0.7.4.sql | 0 {sql => extension/sql}/pgmq--0.7.4--0.7.5.sql | 0 {sql => extension/sql}/pgmq--0.7.5--0.8.0.sql | 0 {sql => extension/sql}/pgmq--0.8.0--0.8.1.sql | 0 {sql => extension/sql}/pgmq--0.8.1--0.9.0.sql | 0 {sql => extension/sql}/pgmq--0.9.0--0.10.2.sql | 0 {sql => extension/sql}/pgmq--1.0.0--1.1.0.sql | 0 {sql => extension/sql}/pgmq--1.1.0--1.1.1.sql | 0 {sql => extension/sql}/pgmq--1.1.1--1.2.0.sql | 0 {sql => extension/sql}/pgmq--1.2.0--1.2.1.sql | 0 {sql => extension/sql}/pgmq--1.2.1--1.3.0.sql | 0 {sql => extension/sql}/pgmq--1.3.0--1.3.1.sql | 0 {sql => extension/sql}/pgmq--1.3.1--1.3.2.sql | 0 {sql => extension/sql}/pgmq--1.3.2--1.3.3.sql | 0 {sql => extension/sql}/pgmq.sql | 0 64 files changed, 17 insertions(+), 22 deletions(-) delete mode 100644 .cargo/config.toml rename META.json.in => extension/META.json.in (100%) rename Makefile => extension/Makefile (100%) rename Trunk.toml.in => extension/Trunk.toml.in (100%) rename {integration_test => extension/integration_test}/Cargo.lock (99%) rename {integration_test => extension/integration_test}/Cargo.toml (100%) rename {integration_test => extension/integration_test}/tests/integration_tests.rs (100%) rename pgmq.control => extension/pgmq.control (100%) rename {sql => extension/sql}/pgmq--0.10.2--0.11.1.sql (100%) rename {sql => extension/sql}/pgmq--0.11.1--0.11.2.sql (100%) rename {sql => extension/sql}/pgmq--0.11.2--0.12.0.sql (100%) rename {sql => extension/sql}/pgmq--0.12.0--0.12.1.sql (100%) rename {sql => extension/sql}/pgmq--0.12.1--0.13.0.sql (100%) rename {sql => extension/sql}/pgmq--0.13.0--0.13.1.sql (100%) rename {sql => extension/sql}/pgmq--0.13.1--0.14.0.sql (100%) rename {sql => extension/sql}/pgmq--0.14.0--0.14.1.sql (100%) rename {sql => extension/sql}/pgmq--0.14.1--0.14.2.sql (100%) rename {sql => extension/sql}/pgmq--0.14.2--0.14.3.sql (100%) rename {sql => extension/sql}/pgmq--0.14.3--0.15.0.sql (100%) rename {sql => extension/sql}/pgmq--0.15.0--0.15.1.sql (100%) rename {sql => extension/sql}/pgmq--0.15.1--0.16.0.sql (100%) rename {sql => extension/sql}/pgmq--0.16.0--0.17.0.sql (100%) rename {sql => extension/sql}/pgmq--0.17.0--0.18.0.sql (100%) rename {sql => extension/sql}/pgmq--0.18.0--0.19.0.sql (100%) rename {sql => extension/sql}/pgmq--0.19.0--0.20.0.sql (100%) rename {sql => extension/sql}/pgmq--0.20.0--0.21.0.sql (100%) rename {sql => extension/sql}/pgmq--0.21.0--0.22.0.sql (100%) rename {sql => extension/sql}/pgmq--0.22.0--0.23.0.sql (100%) rename {sql => extension/sql}/pgmq--0.23.0--0.24.0.sql (100%) rename {sql => extension/sql}/pgmq--0.24.0--0.25.0.sql (100%) rename {sql => extension/sql}/pgmq--0.25.0--0.26.0.sql (100%) rename {sql => extension/sql}/pgmq--0.26.0--0.27.0.sql (100%) rename {sql => extension/sql}/pgmq--0.27.0--0.28.0.sql (100%) rename {sql => extension/sql}/pgmq--0.28.0--0.29.0.sql (100%) rename {sql => extension/sql}/pgmq--0.29.0--0.30.0.sql (100%) rename {sql => extension/sql}/pgmq--0.30.0--0.31.0.sql (100%) rename {sql => extension/sql}/pgmq--0.31.0--0.31.1.sql (100%) rename {sql => extension/sql}/pgmq--0.31.1--0.32.0.sql (100%) rename {sql => extension/sql}/pgmq--0.32.0--0.32.1.sql (100%) rename {sql => extension/sql}/pgmq--0.32.1--0.32.2.sql (100%) rename {sql => extension/sql}/pgmq--0.32.2--0.32.3.sql (100%) rename {sql => extension/sql}/pgmq--0.32.3--0.33.0.sql (100%) rename {sql => extension/sql}/pgmq--0.33.0--0.33.1.sql (100%) rename {sql => extension/sql}/pgmq--0.33.1--0.33.2.sql (100%) rename {sql => extension/sql}/pgmq--0.33.2--0.33.3.sql (100%) rename {sql => extension/sql}/pgmq--0.33.3--1.0.0.sql (100%) rename {sql => extension/sql}/pgmq--0.7.3--0.7.4.sql (100%) rename {sql => extension/sql}/pgmq--0.7.4--0.7.5.sql (100%) rename {sql => extension/sql}/pgmq--0.7.5--0.8.0.sql (100%) rename {sql => extension/sql}/pgmq--0.8.0--0.8.1.sql (100%) rename {sql => extension/sql}/pgmq--0.8.1--0.9.0.sql (100%) rename {sql => extension/sql}/pgmq--0.9.0--0.10.2.sql (100%) rename {sql => extension/sql}/pgmq--1.0.0--1.1.0.sql (100%) rename {sql => extension/sql}/pgmq--1.1.0--1.1.1.sql (100%) rename {sql => extension/sql}/pgmq--1.1.1--1.2.0.sql (100%) rename {sql => extension/sql}/pgmq--1.2.0--1.2.1.sql (100%) rename {sql => extension/sql}/pgmq--1.2.1--1.3.0.sql (100%) rename {sql => extension/sql}/pgmq--1.3.0--1.3.1.sql (100%) rename {sql => extension/sql}/pgmq--1.3.1--1.3.2.sql (100%) rename {sql => extension/sql}/pgmq--1.3.2--1.3.3.sql (100%) rename {sql => extension/sql}/pgmq.sql (100%) diff --git a/.cargo/config.toml b/.cargo/config.toml deleted file mode 100644 index 13c456b5..00000000 --- a/.cargo/config.toml +++ /dev/null @@ -1,3 +0,0 @@ -[target.'cfg(target_os="macos")'] -# Postgres symbols won't be available until runtime -rustflags = ["-Clink-arg=-Wl,-undefined,dynamic_lookup"] diff --git a/.github/workflows/extension_ci.yml b/.github/workflows/extension_ci.yml index 4cc1c3ad..e75e05a5 100644 --- a/.github/workflows/extension_ci.yml +++ b/.github/workflows/extension_ci.yml @@ -3,21 +3,21 @@ name: PGMQ Extension defaults: run: shell: bash - working-directory: ./ + working-directory: ./extension on: pull_request: branches: - main - paths-ignore: - - "pgmq-rs/**" - - "tembo-pgmq-python/**" + paths: + - "extension/**" + - ".github/workflows/extension_ci.yml" push: branches: - main - paths-ignore: - - "pgmq-rs/**" - - "tembo-pgmq-python/**" + paths: + - "extension/**" + - ".github/workflows/extension_ci.yml" release: types: - created @@ -118,8 +118,6 @@ jobs: trunk publish pgmq --version ${pgmq_ver} --description "A lightweight message queue. Like AWS SQS and RSMQ, on Postgres." --homepage "https://github.com/tembo-io/pgmq" --repository "https://github.com/tembo-io/pgmq" --license "PostgreSQL" --category featured --category orchestration build_and_push: name: Build and push images - # needs: - # - publish runs-on: - self-hosted - dind diff --git a/.github/workflows/extension_upgrade.yml b/.github/workflows/extension_upgrade.yml index fa6b72bd..b77a8585 100644 --- a/.github/workflows/extension_upgrade.yml +++ b/.github/workflows/extension_upgrade.yml @@ -3,21 +3,21 @@ name: PGMQ Extension Upgrade defaults: run: shell: bash - working-directory: ./ + working-directory: ./extension on: pull_request: branches: - main - paths-ignore: - - "pgmq-rs/**" - - "tembo-pgmq-python/**" + paths: + - "extension/**" + - ".github/workflows/extension_upgrade.yml" push: branches: - main - paths-ignore: - - "pgmq-rs/**" - - "tembo-pgmq-python/**" + paths: + - "extension/**" + - ".github/workflows/extension_upgrade.yml" release: types: - created diff --git a/UPDATING.md b/UPDATING.md index 33b6e883..3b7d0253 100644 --- a/UPDATING.md +++ b/UPDATING.md @@ -28,7 +28,7 @@ Now, connect to postgres and run: ALTER EXTENSION pgmq UPDATE ``` -If successfull, pgmq is updated! +If successful, pgmq is updated! #### When building from source (pre-1.3.0) @@ -55,4 +55,4 @@ Now, connect to postgres and run: ALTER EXTENSION pgmq UPDATE ``` -If successfull, pgmq is updated! +If successful, pgmq is updated! diff --git a/META.json.in b/extension/META.json.in similarity index 100% rename from META.json.in rename to extension/META.json.in diff --git a/Makefile b/extension/Makefile similarity index 100% rename from Makefile rename to extension/Makefile diff --git a/Trunk.toml.in b/extension/Trunk.toml.in similarity index 100% rename from Trunk.toml.in rename to extension/Trunk.toml.in diff --git a/integration_test/Cargo.lock b/extension/integration_test/Cargo.lock similarity index 99% rename from integration_test/Cargo.lock rename to extension/integration_test/Cargo.lock index 9b7162e1..6275731b 100644 --- a/integration_test/Cargo.lock +++ b/extension/integration_test/Cargo.lock @@ -847,7 +847,7 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pgmq" -version = "0.28.1" +version = "0.28.2" dependencies = [ "chrono", "log", diff --git a/integration_test/Cargo.toml b/extension/integration_test/Cargo.toml similarity index 100% rename from integration_test/Cargo.toml rename to extension/integration_test/Cargo.toml diff --git a/integration_test/tests/integration_tests.rs b/extension/integration_test/tests/integration_tests.rs similarity index 100% rename from integration_test/tests/integration_tests.rs rename to extension/integration_test/tests/integration_tests.rs diff --git a/pgmq.control b/extension/pgmq.control similarity index 100% rename from pgmq.control rename to extension/pgmq.control diff --git a/sql/pgmq--0.10.2--0.11.1.sql b/extension/sql/pgmq--0.10.2--0.11.1.sql similarity index 100% rename from sql/pgmq--0.10.2--0.11.1.sql rename to extension/sql/pgmq--0.10.2--0.11.1.sql diff --git a/sql/pgmq--0.11.1--0.11.2.sql b/extension/sql/pgmq--0.11.1--0.11.2.sql similarity index 100% rename from sql/pgmq--0.11.1--0.11.2.sql rename to extension/sql/pgmq--0.11.1--0.11.2.sql diff --git a/sql/pgmq--0.11.2--0.12.0.sql b/extension/sql/pgmq--0.11.2--0.12.0.sql similarity index 100% rename from sql/pgmq--0.11.2--0.12.0.sql rename to extension/sql/pgmq--0.11.2--0.12.0.sql diff --git a/sql/pgmq--0.12.0--0.12.1.sql b/extension/sql/pgmq--0.12.0--0.12.1.sql similarity index 100% rename from sql/pgmq--0.12.0--0.12.1.sql rename to extension/sql/pgmq--0.12.0--0.12.1.sql diff --git a/sql/pgmq--0.12.1--0.13.0.sql b/extension/sql/pgmq--0.12.1--0.13.0.sql similarity index 100% rename from sql/pgmq--0.12.1--0.13.0.sql rename to extension/sql/pgmq--0.12.1--0.13.0.sql diff --git a/sql/pgmq--0.13.0--0.13.1.sql b/extension/sql/pgmq--0.13.0--0.13.1.sql similarity index 100% rename from sql/pgmq--0.13.0--0.13.1.sql rename to extension/sql/pgmq--0.13.0--0.13.1.sql diff --git a/sql/pgmq--0.13.1--0.14.0.sql b/extension/sql/pgmq--0.13.1--0.14.0.sql similarity index 100% rename from sql/pgmq--0.13.1--0.14.0.sql rename to extension/sql/pgmq--0.13.1--0.14.0.sql diff --git a/sql/pgmq--0.14.0--0.14.1.sql b/extension/sql/pgmq--0.14.0--0.14.1.sql similarity index 100% rename from sql/pgmq--0.14.0--0.14.1.sql rename to extension/sql/pgmq--0.14.0--0.14.1.sql diff --git a/sql/pgmq--0.14.1--0.14.2.sql b/extension/sql/pgmq--0.14.1--0.14.2.sql similarity index 100% rename from sql/pgmq--0.14.1--0.14.2.sql rename to extension/sql/pgmq--0.14.1--0.14.2.sql diff --git a/sql/pgmq--0.14.2--0.14.3.sql b/extension/sql/pgmq--0.14.2--0.14.3.sql similarity index 100% rename from sql/pgmq--0.14.2--0.14.3.sql rename to extension/sql/pgmq--0.14.2--0.14.3.sql diff --git a/sql/pgmq--0.14.3--0.15.0.sql b/extension/sql/pgmq--0.14.3--0.15.0.sql similarity index 100% rename from sql/pgmq--0.14.3--0.15.0.sql rename to extension/sql/pgmq--0.14.3--0.15.0.sql diff --git a/sql/pgmq--0.15.0--0.15.1.sql b/extension/sql/pgmq--0.15.0--0.15.1.sql similarity index 100% rename from sql/pgmq--0.15.0--0.15.1.sql rename to extension/sql/pgmq--0.15.0--0.15.1.sql diff --git a/sql/pgmq--0.15.1--0.16.0.sql b/extension/sql/pgmq--0.15.1--0.16.0.sql similarity index 100% rename from sql/pgmq--0.15.1--0.16.0.sql rename to extension/sql/pgmq--0.15.1--0.16.0.sql diff --git a/sql/pgmq--0.16.0--0.17.0.sql b/extension/sql/pgmq--0.16.0--0.17.0.sql similarity index 100% rename from sql/pgmq--0.16.0--0.17.0.sql rename to extension/sql/pgmq--0.16.0--0.17.0.sql diff --git a/sql/pgmq--0.17.0--0.18.0.sql b/extension/sql/pgmq--0.17.0--0.18.0.sql similarity index 100% rename from sql/pgmq--0.17.0--0.18.0.sql rename to extension/sql/pgmq--0.17.0--0.18.0.sql diff --git a/sql/pgmq--0.18.0--0.19.0.sql b/extension/sql/pgmq--0.18.0--0.19.0.sql similarity index 100% rename from sql/pgmq--0.18.0--0.19.0.sql rename to extension/sql/pgmq--0.18.0--0.19.0.sql diff --git a/sql/pgmq--0.19.0--0.20.0.sql b/extension/sql/pgmq--0.19.0--0.20.0.sql similarity index 100% rename from sql/pgmq--0.19.0--0.20.0.sql rename to extension/sql/pgmq--0.19.0--0.20.0.sql diff --git a/sql/pgmq--0.20.0--0.21.0.sql b/extension/sql/pgmq--0.20.0--0.21.0.sql similarity index 100% rename from sql/pgmq--0.20.0--0.21.0.sql rename to extension/sql/pgmq--0.20.0--0.21.0.sql diff --git a/sql/pgmq--0.21.0--0.22.0.sql b/extension/sql/pgmq--0.21.0--0.22.0.sql similarity index 100% rename from sql/pgmq--0.21.0--0.22.0.sql rename to extension/sql/pgmq--0.21.0--0.22.0.sql diff --git a/sql/pgmq--0.22.0--0.23.0.sql b/extension/sql/pgmq--0.22.0--0.23.0.sql similarity index 100% rename from sql/pgmq--0.22.0--0.23.0.sql rename to extension/sql/pgmq--0.22.0--0.23.0.sql diff --git a/sql/pgmq--0.23.0--0.24.0.sql b/extension/sql/pgmq--0.23.0--0.24.0.sql similarity index 100% rename from sql/pgmq--0.23.0--0.24.0.sql rename to extension/sql/pgmq--0.23.0--0.24.0.sql diff --git a/sql/pgmq--0.24.0--0.25.0.sql b/extension/sql/pgmq--0.24.0--0.25.0.sql similarity index 100% rename from sql/pgmq--0.24.0--0.25.0.sql rename to extension/sql/pgmq--0.24.0--0.25.0.sql diff --git a/sql/pgmq--0.25.0--0.26.0.sql b/extension/sql/pgmq--0.25.0--0.26.0.sql similarity index 100% rename from sql/pgmq--0.25.0--0.26.0.sql rename to extension/sql/pgmq--0.25.0--0.26.0.sql diff --git a/sql/pgmq--0.26.0--0.27.0.sql b/extension/sql/pgmq--0.26.0--0.27.0.sql similarity index 100% rename from sql/pgmq--0.26.0--0.27.0.sql rename to extension/sql/pgmq--0.26.0--0.27.0.sql diff --git a/sql/pgmq--0.27.0--0.28.0.sql b/extension/sql/pgmq--0.27.0--0.28.0.sql similarity index 100% rename from sql/pgmq--0.27.0--0.28.0.sql rename to extension/sql/pgmq--0.27.0--0.28.0.sql diff --git a/sql/pgmq--0.28.0--0.29.0.sql b/extension/sql/pgmq--0.28.0--0.29.0.sql similarity index 100% rename from sql/pgmq--0.28.0--0.29.0.sql rename to extension/sql/pgmq--0.28.0--0.29.0.sql diff --git a/sql/pgmq--0.29.0--0.30.0.sql b/extension/sql/pgmq--0.29.0--0.30.0.sql similarity index 100% rename from sql/pgmq--0.29.0--0.30.0.sql rename to extension/sql/pgmq--0.29.0--0.30.0.sql diff --git a/sql/pgmq--0.30.0--0.31.0.sql b/extension/sql/pgmq--0.30.0--0.31.0.sql similarity index 100% rename from sql/pgmq--0.30.0--0.31.0.sql rename to extension/sql/pgmq--0.30.0--0.31.0.sql diff --git a/sql/pgmq--0.31.0--0.31.1.sql b/extension/sql/pgmq--0.31.0--0.31.1.sql similarity index 100% rename from sql/pgmq--0.31.0--0.31.1.sql rename to extension/sql/pgmq--0.31.0--0.31.1.sql diff --git a/sql/pgmq--0.31.1--0.32.0.sql b/extension/sql/pgmq--0.31.1--0.32.0.sql similarity index 100% rename from sql/pgmq--0.31.1--0.32.0.sql rename to extension/sql/pgmq--0.31.1--0.32.0.sql diff --git a/sql/pgmq--0.32.0--0.32.1.sql b/extension/sql/pgmq--0.32.0--0.32.1.sql similarity index 100% rename from sql/pgmq--0.32.0--0.32.1.sql rename to extension/sql/pgmq--0.32.0--0.32.1.sql diff --git a/sql/pgmq--0.32.1--0.32.2.sql b/extension/sql/pgmq--0.32.1--0.32.2.sql similarity index 100% rename from sql/pgmq--0.32.1--0.32.2.sql rename to extension/sql/pgmq--0.32.1--0.32.2.sql diff --git a/sql/pgmq--0.32.2--0.32.3.sql b/extension/sql/pgmq--0.32.2--0.32.3.sql similarity index 100% rename from sql/pgmq--0.32.2--0.32.3.sql rename to extension/sql/pgmq--0.32.2--0.32.3.sql diff --git a/sql/pgmq--0.32.3--0.33.0.sql b/extension/sql/pgmq--0.32.3--0.33.0.sql similarity index 100% rename from sql/pgmq--0.32.3--0.33.0.sql rename to extension/sql/pgmq--0.32.3--0.33.0.sql diff --git a/sql/pgmq--0.33.0--0.33.1.sql b/extension/sql/pgmq--0.33.0--0.33.1.sql similarity index 100% rename from sql/pgmq--0.33.0--0.33.1.sql rename to extension/sql/pgmq--0.33.0--0.33.1.sql diff --git a/sql/pgmq--0.33.1--0.33.2.sql b/extension/sql/pgmq--0.33.1--0.33.2.sql similarity index 100% rename from sql/pgmq--0.33.1--0.33.2.sql rename to extension/sql/pgmq--0.33.1--0.33.2.sql diff --git a/sql/pgmq--0.33.2--0.33.3.sql b/extension/sql/pgmq--0.33.2--0.33.3.sql similarity index 100% rename from sql/pgmq--0.33.2--0.33.3.sql rename to extension/sql/pgmq--0.33.2--0.33.3.sql diff --git a/sql/pgmq--0.33.3--1.0.0.sql b/extension/sql/pgmq--0.33.3--1.0.0.sql similarity index 100% rename from sql/pgmq--0.33.3--1.0.0.sql rename to extension/sql/pgmq--0.33.3--1.0.0.sql diff --git a/sql/pgmq--0.7.3--0.7.4.sql b/extension/sql/pgmq--0.7.3--0.7.4.sql similarity index 100% rename from sql/pgmq--0.7.3--0.7.4.sql rename to extension/sql/pgmq--0.7.3--0.7.4.sql diff --git a/sql/pgmq--0.7.4--0.7.5.sql b/extension/sql/pgmq--0.7.4--0.7.5.sql similarity index 100% rename from sql/pgmq--0.7.4--0.7.5.sql rename to extension/sql/pgmq--0.7.4--0.7.5.sql diff --git a/sql/pgmq--0.7.5--0.8.0.sql b/extension/sql/pgmq--0.7.5--0.8.0.sql similarity index 100% rename from sql/pgmq--0.7.5--0.8.0.sql rename to extension/sql/pgmq--0.7.5--0.8.0.sql diff --git a/sql/pgmq--0.8.0--0.8.1.sql b/extension/sql/pgmq--0.8.0--0.8.1.sql similarity index 100% rename from sql/pgmq--0.8.0--0.8.1.sql rename to extension/sql/pgmq--0.8.0--0.8.1.sql diff --git a/sql/pgmq--0.8.1--0.9.0.sql b/extension/sql/pgmq--0.8.1--0.9.0.sql similarity index 100% rename from sql/pgmq--0.8.1--0.9.0.sql rename to extension/sql/pgmq--0.8.1--0.9.0.sql diff --git a/sql/pgmq--0.9.0--0.10.2.sql b/extension/sql/pgmq--0.9.0--0.10.2.sql similarity index 100% rename from sql/pgmq--0.9.0--0.10.2.sql rename to extension/sql/pgmq--0.9.0--0.10.2.sql diff --git a/sql/pgmq--1.0.0--1.1.0.sql b/extension/sql/pgmq--1.0.0--1.1.0.sql similarity index 100% rename from sql/pgmq--1.0.0--1.1.0.sql rename to extension/sql/pgmq--1.0.0--1.1.0.sql diff --git a/sql/pgmq--1.1.0--1.1.1.sql b/extension/sql/pgmq--1.1.0--1.1.1.sql similarity index 100% rename from sql/pgmq--1.1.0--1.1.1.sql rename to extension/sql/pgmq--1.1.0--1.1.1.sql diff --git a/sql/pgmq--1.1.1--1.2.0.sql b/extension/sql/pgmq--1.1.1--1.2.0.sql similarity index 100% rename from sql/pgmq--1.1.1--1.2.0.sql rename to extension/sql/pgmq--1.1.1--1.2.0.sql diff --git a/sql/pgmq--1.2.0--1.2.1.sql b/extension/sql/pgmq--1.2.0--1.2.1.sql similarity index 100% rename from sql/pgmq--1.2.0--1.2.1.sql rename to extension/sql/pgmq--1.2.0--1.2.1.sql diff --git a/sql/pgmq--1.2.1--1.3.0.sql b/extension/sql/pgmq--1.2.1--1.3.0.sql similarity index 100% rename from sql/pgmq--1.2.1--1.3.0.sql rename to extension/sql/pgmq--1.2.1--1.3.0.sql diff --git a/sql/pgmq--1.3.0--1.3.1.sql b/extension/sql/pgmq--1.3.0--1.3.1.sql similarity index 100% rename from sql/pgmq--1.3.0--1.3.1.sql rename to extension/sql/pgmq--1.3.0--1.3.1.sql diff --git a/sql/pgmq--1.3.1--1.3.2.sql b/extension/sql/pgmq--1.3.1--1.3.2.sql similarity index 100% rename from sql/pgmq--1.3.1--1.3.2.sql rename to extension/sql/pgmq--1.3.1--1.3.2.sql diff --git a/sql/pgmq--1.3.2--1.3.3.sql b/extension/sql/pgmq--1.3.2--1.3.3.sql similarity index 100% rename from sql/pgmq--1.3.2--1.3.3.sql rename to extension/sql/pgmq--1.3.2--1.3.3.sql diff --git a/sql/pgmq.sql b/extension/sql/pgmq.sql similarity index 100% rename from sql/pgmq.sql rename to extension/sql/pgmq.sql From 206663a778948834180a3a14aac6c7386f4b853d Mon Sep 17 00:00:00 2001 From: Adam Hendel Date: Sat, 15 Jun 2024 12:32:45 -0500 Subject: [PATCH 2/9] fix working dir --- .github/workflows/extension_ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/extension_ci.yml b/.github/workflows/extension_ci.yml index e75e05a5..2bf8f268 100644 --- a/.github/workflows/extension_ci.yml +++ b/.github/workflows/extension_ci.yml @@ -103,12 +103,10 @@ jobs: - name: Make trunk run: make Trunk.toml - name: trunk build - working-directory: ./ run: trunk build --pg-version ${{ matrix.pg-version }} - name: trunk publish # only publish release events if: github.event_name == 'release' - working-directory: ./ env: TRUNK_API_TOKEN: ${{ secrets.TRUNK_AUTH_TOKEN }} run: | From f5fd8c2d7df9c09bdfab351725a050915bf1a274 Mon Sep 17 00:00:00 2001 From: Adam Hendel Date: Sat, 15 Jun 2024 12:35:51 -0500 Subject: [PATCH 3/9] fix path to pgmq-rs --- extension/integration_test/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extension/integration_test/Cargo.toml b/extension/integration_test/Cargo.toml index ca1d79bc..e65bba96 100644 --- a/extension/integration_test/Cargo.toml +++ b/extension/integration_test/Cargo.toml @@ -15,7 +15,7 @@ serde = "1.0.152" serde_json = "1.0.91" thiserror = "1.0.38" url = "2.3.1" -pgmq = {path = "../pgmq-rs"} +pgmq = {path = "../../pgmq-rs"} log = "0.4.17" [dev-dependencies] From 405f2d5dc75d21a5d64830739233426f657ddc50 Mon Sep 17 00:00:00 2001 From: Adam Hendel Date: Sat, 15 Jun 2024 12:41:16 -0500 Subject: [PATCH 4/9] fix image builds --- .github/workflows/extension_ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/extension_ci.yml b/.github/workflows/extension_ci.yml index 2bf8f268..3ab5f2e4 100644 --- a/.github/workflows/extension_ci.yml +++ b/.github/workflows/extension_ci.yml @@ -156,6 +156,7 @@ jobs: password: ${{ secrets.QUAY_PASSWORD_TEMBO }} - name: Generate dockerfile from template file + working-directory: ./ run: ./images/pgmq-pg/replace-pg-version.sh ${{ matrix.pg }} ./images/pgmq-pg/Dockerfile.in ./images/pgmq-pg/Dockerfile - name: Build and push -- Commit @@ -163,6 +164,7 @@ jobs: if: github.event_name != 'release' uses: docker/build-push-action@v5 with: + working-directory: ./ file: ./images/pgmq-pg/Dockerfile context: . platforms: linux/amd64, linux/arm64 @@ -175,6 +177,7 @@ jobs: if: github.event_name == 'release' uses: docker/build-push-action@v5 with: + working-directory: ./ file: ./images/pgmq-pg/Dockerfile context: . platforms: linux/amd64, linux/arm64 From 23a8b57bee9fa954e7af43e42d27b5a6b8dda4f4 Mon Sep 17 00:00:00 2001 From: Adam Hendel Date: Sat, 15 Jun 2024 12:53:36 -0500 Subject: [PATCH 5/9] update path and install cmd in pg dockerfile --- images/pgmq-pg/Dockerfile.in | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/images/pgmq-pg/Dockerfile.in b/images/pgmq-pg/Dockerfile.in index 61e29f6f..beab91d0 100644 --- a/images/pgmq-pg/Dockerfile.in +++ b/images/pgmq-pg/Dockerfile.in @@ -12,15 +12,13 @@ RUN apt-get update \ pkg-config \ postgresql-server-dev-@@PG_VERSION@@ + # Install pgmq -COPY . pgmq -RUN cd pgmq && make && make install -RUN cd .. +COPY ./extension extension +RUN cd extension && make && make install # install pg_partman -RUN git clone https://github.com/pgpartman/pg_partman.git && \ - cd pg_partman && \ - git checkout v4.7.4 && make && make install +RUN cd extension && make install-pg-partman FROM postgres:@@PG_VERSION@@-bookworm From 600a6f004e803a7c9d2fd12d20989926940d4aeb Mon Sep 17 00:00:00 2001 From: Adam Hendel Date: Sat, 15 Jun 2024 13:31:22 -0500 Subject: [PATCH 6/9] try other wd for pg-start --- .github/workflows/extension_ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/extension_ci.yml b/.github/workflows/extension_ci.yml index 3ab5f2e4..f46ca26e 100644 --- a/.github/workflows/extension_ci.yml +++ b/.github/workflows/extension_ci.yml @@ -54,6 +54,7 @@ jobs: container: pgxn/pgxn-tools steps: - run: pg-start ${{ matrix.pg }} + working-directory: ./ - uses: actions/checkout@v4 - run: apt install -y pkg-config - name: Install Rust stable toolchain From a2a0cd39814db346a90542ab8edbbb02e4627dd5 Mon Sep 17 00:00:00 2001 From: Adam Hendel Date: Sun, 16 Jun 2024 13:44:41 -0500 Subject: [PATCH 7/9] rename to pgmq-extension --- {extension => pgmq-extension}/META.json.in | 0 {extension => pgmq-extension}/Makefile | 0 {extension => pgmq-extension}/Trunk.toml.in | 0 {extension => pgmq-extension}/integration_test/Cargo.lock | 0 {extension => pgmq-extension}/integration_test/Cargo.toml | 0 .../integration_test/tests/integration_tests.rs | 0 {extension => pgmq-extension}/pgmq.control | 0 {extension => pgmq-extension}/sql/pgmq--0.10.2--0.11.1.sql | 0 {extension => pgmq-extension}/sql/pgmq--0.11.1--0.11.2.sql | 0 {extension => pgmq-extension}/sql/pgmq--0.11.2--0.12.0.sql | 0 {extension => pgmq-extension}/sql/pgmq--0.12.0--0.12.1.sql | 0 {extension => pgmq-extension}/sql/pgmq--0.12.1--0.13.0.sql | 0 {extension => pgmq-extension}/sql/pgmq--0.13.0--0.13.1.sql | 0 {extension => pgmq-extension}/sql/pgmq--0.13.1--0.14.0.sql | 0 {extension => pgmq-extension}/sql/pgmq--0.14.0--0.14.1.sql | 0 {extension => pgmq-extension}/sql/pgmq--0.14.1--0.14.2.sql | 0 {extension => pgmq-extension}/sql/pgmq--0.14.2--0.14.3.sql | 0 {extension => pgmq-extension}/sql/pgmq--0.14.3--0.15.0.sql | 0 {extension => pgmq-extension}/sql/pgmq--0.15.0--0.15.1.sql | 0 {extension => pgmq-extension}/sql/pgmq--0.15.1--0.16.0.sql | 0 {extension => pgmq-extension}/sql/pgmq--0.16.0--0.17.0.sql | 0 {extension => pgmq-extension}/sql/pgmq--0.17.0--0.18.0.sql | 0 {extension => pgmq-extension}/sql/pgmq--0.18.0--0.19.0.sql | 0 {extension => pgmq-extension}/sql/pgmq--0.19.0--0.20.0.sql | 0 {extension => pgmq-extension}/sql/pgmq--0.20.0--0.21.0.sql | 0 {extension => pgmq-extension}/sql/pgmq--0.21.0--0.22.0.sql | 0 {extension => pgmq-extension}/sql/pgmq--0.22.0--0.23.0.sql | 0 {extension => pgmq-extension}/sql/pgmq--0.23.0--0.24.0.sql | 0 {extension => pgmq-extension}/sql/pgmq--0.24.0--0.25.0.sql | 0 {extension => pgmq-extension}/sql/pgmq--0.25.0--0.26.0.sql | 0 {extension => pgmq-extension}/sql/pgmq--0.26.0--0.27.0.sql | 0 {extension => pgmq-extension}/sql/pgmq--0.27.0--0.28.0.sql | 0 {extension => pgmq-extension}/sql/pgmq--0.28.0--0.29.0.sql | 0 {extension => pgmq-extension}/sql/pgmq--0.29.0--0.30.0.sql | 0 {extension => pgmq-extension}/sql/pgmq--0.30.0--0.31.0.sql | 0 {extension => pgmq-extension}/sql/pgmq--0.31.0--0.31.1.sql | 0 {extension => pgmq-extension}/sql/pgmq--0.31.1--0.32.0.sql | 0 {extension => pgmq-extension}/sql/pgmq--0.32.0--0.32.1.sql | 0 {extension => pgmq-extension}/sql/pgmq--0.32.1--0.32.2.sql | 0 {extension => pgmq-extension}/sql/pgmq--0.32.2--0.32.3.sql | 0 {extension => pgmq-extension}/sql/pgmq--0.32.3--0.33.0.sql | 0 {extension => pgmq-extension}/sql/pgmq--0.33.0--0.33.1.sql | 0 {extension => pgmq-extension}/sql/pgmq--0.33.1--0.33.2.sql | 0 {extension => pgmq-extension}/sql/pgmq--0.33.2--0.33.3.sql | 0 {extension => pgmq-extension}/sql/pgmq--0.33.3--1.0.0.sql | 0 {extension => pgmq-extension}/sql/pgmq--0.7.3--0.7.4.sql | 0 {extension => pgmq-extension}/sql/pgmq--0.7.4--0.7.5.sql | 0 {extension => pgmq-extension}/sql/pgmq--0.7.5--0.8.0.sql | 0 {extension => pgmq-extension}/sql/pgmq--0.8.0--0.8.1.sql | 0 {extension => pgmq-extension}/sql/pgmq--0.8.1--0.9.0.sql | 0 {extension => pgmq-extension}/sql/pgmq--0.9.0--0.10.2.sql | 0 {extension => pgmq-extension}/sql/pgmq--1.0.0--1.1.0.sql | 0 {extension => pgmq-extension}/sql/pgmq--1.1.0--1.1.1.sql | 0 {extension => pgmq-extension}/sql/pgmq--1.1.1--1.2.0.sql | 0 {extension => pgmq-extension}/sql/pgmq--1.2.0--1.2.1.sql | 0 {extension => pgmq-extension}/sql/pgmq--1.2.1--1.3.0.sql | 0 {extension => pgmq-extension}/sql/pgmq--1.3.0--1.3.1.sql | 0 {extension => pgmq-extension}/sql/pgmq--1.3.1--1.3.2.sql | 0 {extension => pgmq-extension}/sql/pgmq--1.3.2--1.3.3.sql | 0 {extension => pgmq-extension}/sql/pgmq.sql | 0 60 files changed, 0 insertions(+), 0 deletions(-) rename {extension => pgmq-extension}/META.json.in (100%) rename {extension => pgmq-extension}/Makefile (100%) rename {extension => pgmq-extension}/Trunk.toml.in (100%) rename {extension => pgmq-extension}/integration_test/Cargo.lock (100%) rename {extension => pgmq-extension}/integration_test/Cargo.toml (100%) rename {extension => pgmq-extension}/integration_test/tests/integration_tests.rs (100%) rename {extension => pgmq-extension}/pgmq.control (100%) rename {extension => pgmq-extension}/sql/pgmq--0.10.2--0.11.1.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--0.11.1--0.11.2.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--0.11.2--0.12.0.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--0.12.0--0.12.1.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--0.12.1--0.13.0.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--0.13.0--0.13.1.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--0.13.1--0.14.0.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--0.14.0--0.14.1.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--0.14.1--0.14.2.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--0.14.2--0.14.3.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--0.14.3--0.15.0.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--0.15.0--0.15.1.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--0.15.1--0.16.0.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--0.16.0--0.17.0.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--0.17.0--0.18.0.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--0.18.0--0.19.0.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--0.19.0--0.20.0.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--0.20.0--0.21.0.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--0.21.0--0.22.0.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--0.22.0--0.23.0.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--0.23.0--0.24.0.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--0.24.0--0.25.0.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--0.25.0--0.26.0.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--0.26.0--0.27.0.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--0.27.0--0.28.0.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--0.28.0--0.29.0.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--0.29.0--0.30.0.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--0.30.0--0.31.0.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--0.31.0--0.31.1.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--0.31.1--0.32.0.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--0.32.0--0.32.1.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--0.32.1--0.32.2.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--0.32.2--0.32.3.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--0.32.3--0.33.0.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--0.33.0--0.33.1.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--0.33.1--0.33.2.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--0.33.2--0.33.3.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--0.33.3--1.0.0.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--0.7.3--0.7.4.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--0.7.4--0.7.5.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--0.7.5--0.8.0.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--0.8.0--0.8.1.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--0.8.1--0.9.0.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--0.9.0--0.10.2.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--1.0.0--1.1.0.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--1.1.0--1.1.1.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--1.1.1--1.2.0.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--1.2.0--1.2.1.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--1.2.1--1.3.0.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--1.3.0--1.3.1.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--1.3.1--1.3.2.sql (100%) rename {extension => pgmq-extension}/sql/pgmq--1.3.2--1.3.3.sql (100%) rename {extension => pgmq-extension}/sql/pgmq.sql (100%) diff --git a/extension/META.json.in b/pgmq-extension/META.json.in similarity index 100% rename from extension/META.json.in rename to pgmq-extension/META.json.in diff --git a/extension/Makefile b/pgmq-extension/Makefile similarity index 100% rename from extension/Makefile rename to pgmq-extension/Makefile diff --git a/extension/Trunk.toml.in b/pgmq-extension/Trunk.toml.in similarity index 100% rename from extension/Trunk.toml.in rename to pgmq-extension/Trunk.toml.in diff --git a/extension/integration_test/Cargo.lock b/pgmq-extension/integration_test/Cargo.lock similarity index 100% rename from extension/integration_test/Cargo.lock rename to pgmq-extension/integration_test/Cargo.lock diff --git a/extension/integration_test/Cargo.toml b/pgmq-extension/integration_test/Cargo.toml similarity index 100% rename from extension/integration_test/Cargo.toml rename to pgmq-extension/integration_test/Cargo.toml diff --git a/extension/integration_test/tests/integration_tests.rs b/pgmq-extension/integration_test/tests/integration_tests.rs similarity index 100% rename from extension/integration_test/tests/integration_tests.rs rename to pgmq-extension/integration_test/tests/integration_tests.rs diff --git a/extension/pgmq.control b/pgmq-extension/pgmq.control similarity index 100% rename from extension/pgmq.control rename to pgmq-extension/pgmq.control diff --git a/extension/sql/pgmq--0.10.2--0.11.1.sql b/pgmq-extension/sql/pgmq--0.10.2--0.11.1.sql similarity index 100% rename from extension/sql/pgmq--0.10.2--0.11.1.sql rename to pgmq-extension/sql/pgmq--0.10.2--0.11.1.sql diff --git a/extension/sql/pgmq--0.11.1--0.11.2.sql b/pgmq-extension/sql/pgmq--0.11.1--0.11.2.sql similarity index 100% rename from extension/sql/pgmq--0.11.1--0.11.2.sql rename to pgmq-extension/sql/pgmq--0.11.1--0.11.2.sql diff --git a/extension/sql/pgmq--0.11.2--0.12.0.sql b/pgmq-extension/sql/pgmq--0.11.2--0.12.0.sql similarity index 100% rename from extension/sql/pgmq--0.11.2--0.12.0.sql rename to pgmq-extension/sql/pgmq--0.11.2--0.12.0.sql diff --git a/extension/sql/pgmq--0.12.0--0.12.1.sql b/pgmq-extension/sql/pgmq--0.12.0--0.12.1.sql similarity index 100% rename from extension/sql/pgmq--0.12.0--0.12.1.sql rename to pgmq-extension/sql/pgmq--0.12.0--0.12.1.sql diff --git a/extension/sql/pgmq--0.12.1--0.13.0.sql b/pgmq-extension/sql/pgmq--0.12.1--0.13.0.sql similarity index 100% rename from extension/sql/pgmq--0.12.1--0.13.0.sql rename to pgmq-extension/sql/pgmq--0.12.1--0.13.0.sql diff --git a/extension/sql/pgmq--0.13.0--0.13.1.sql b/pgmq-extension/sql/pgmq--0.13.0--0.13.1.sql similarity index 100% rename from extension/sql/pgmq--0.13.0--0.13.1.sql rename to pgmq-extension/sql/pgmq--0.13.0--0.13.1.sql diff --git a/extension/sql/pgmq--0.13.1--0.14.0.sql b/pgmq-extension/sql/pgmq--0.13.1--0.14.0.sql similarity index 100% rename from extension/sql/pgmq--0.13.1--0.14.0.sql rename to pgmq-extension/sql/pgmq--0.13.1--0.14.0.sql diff --git a/extension/sql/pgmq--0.14.0--0.14.1.sql b/pgmq-extension/sql/pgmq--0.14.0--0.14.1.sql similarity index 100% rename from extension/sql/pgmq--0.14.0--0.14.1.sql rename to pgmq-extension/sql/pgmq--0.14.0--0.14.1.sql diff --git a/extension/sql/pgmq--0.14.1--0.14.2.sql b/pgmq-extension/sql/pgmq--0.14.1--0.14.2.sql similarity index 100% rename from extension/sql/pgmq--0.14.1--0.14.2.sql rename to pgmq-extension/sql/pgmq--0.14.1--0.14.2.sql diff --git a/extension/sql/pgmq--0.14.2--0.14.3.sql b/pgmq-extension/sql/pgmq--0.14.2--0.14.3.sql similarity index 100% rename from extension/sql/pgmq--0.14.2--0.14.3.sql rename to pgmq-extension/sql/pgmq--0.14.2--0.14.3.sql diff --git a/extension/sql/pgmq--0.14.3--0.15.0.sql b/pgmq-extension/sql/pgmq--0.14.3--0.15.0.sql similarity index 100% rename from extension/sql/pgmq--0.14.3--0.15.0.sql rename to pgmq-extension/sql/pgmq--0.14.3--0.15.0.sql diff --git a/extension/sql/pgmq--0.15.0--0.15.1.sql b/pgmq-extension/sql/pgmq--0.15.0--0.15.1.sql similarity index 100% rename from extension/sql/pgmq--0.15.0--0.15.1.sql rename to pgmq-extension/sql/pgmq--0.15.0--0.15.1.sql diff --git a/extension/sql/pgmq--0.15.1--0.16.0.sql b/pgmq-extension/sql/pgmq--0.15.1--0.16.0.sql similarity index 100% rename from extension/sql/pgmq--0.15.1--0.16.0.sql rename to pgmq-extension/sql/pgmq--0.15.1--0.16.0.sql diff --git a/extension/sql/pgmq--0.16.0--0.17.0.sql b/pgmq-extension/sql/pgmq--0.16.0--0.17.0.sql similarity index 100% rename from extension/sql/pgmq--0.16.0--0.17.0.sql rename to pgmq-extension/sql/pgmq--0.16.0--0.17.0.sql diff --git a/extension/sql/pgmq--0.17.0--0.18.0.sql b/pgmq-extension/sql/pgmq--0.17.0--0.18.0.sql similarity index 100% rename from extension/sql/pgmq--0.17.0--0.18.0.sql rename to pgmq-extension/sql/pgmq--0.17.0--0.18.0.sql diff --git a/extension/sql/pgmq--0.18.0--0.19.0.sql b/pgmq-extension/sql/pgmq--0.18.0--0.19.0.sql similarity index 100% rename from extension/sql/pgmq--0.18.0--0.19.0.sql rename to pgmq-extension/sql/pgmq--0.18.0--0.19.0.sql diff --git a/extension/sql/pgmq--0.19.0--0.20.0.sql b/pgmq-extension/sql/pgmq--0.19.0--0.20.0.sql similarity index 100% rename from extension/sql/pgmq--0.19.0--0.20.0.sql rename to pgmq-extension/sql/pgmq--0.19.0--0.20.0.sql diff --git a/extension/sql/pgmq--0.20.0--0.21.0.sql b/pgmq-extension/sql/pgmq--0.20.0--0.21.0.sql similarity index 100% rename from extension/sql/pgmq--0.20.0--0.21.0.sql rename to pgmq-extension/sql/pgmq--0.20.0--0.21.0.sql diff --git a/extension/sql/pgmq--0.21.0--0.22.0.sql b/pgmq-extension/sql/pgmq--0.21.0--0.22.0.sql similarity index 100% rename from extension/sql/pgmq--0.21.0--0.22.0.sql rename to pgmq-extension/sql/pgmq--0.21.0--0.22.0.sql diff --git a/extension/sql/pgmq--0.22.0--0.23.0.sql b/pgmq-extension/sql/pgmq--0.22.0--0.23.0.sql similarity index 100% rename from extension/sql/pgmq--0.22.0--0.23.0.sql rename to pgmq-extension/sql/pgmq--0.22.0--0.23.0.sql diff --git a/extension/sql/pgmq--0.23.0--0.24.0.sql b/pgmq-extension/sql/pgmq--0.23.0--0.24.0.sql similarity index 100% rename from extension/sql/pgmq--0.23.0--0.24.0.sql rename to pgmq-extension/sql/pgmq--0.23.0--0.24.0.sql diff --git a/extension/sql/pgmq--0.24.0--0.25.0.sql b/pgmq-extension/sql/pgmq--0.24.0--0.25.0.sql similarity index 100% rename from extension/sql/pgmq--0.24.0--0.25.0.sql rename to pgmq-extension/sql/pgmq--0.24.0--0.25.0.sql diff --git a/extension/sql/pgmq--0.25.0--0.26.0.sql b/pgmq-extension/sql/pgmq--0.25.0--0.26.0.sql similarity index 100% rename from extension/sql/pgmq--0.25.0--0.26.0.sql rename to pgmq-extension/sql/pgmq--0.25.0--0.26.0.sql diff --git a/extension/sql/pgmq--0.26.0--0.27.0.sql b/pgmq-extension/sql/pgmq--0.26.0--0.27.0.sql similarity index 100% rename from extension/sql/pgmq--0.26.0--0.27.0.sql rename to pgmq-extension/sql/pgmq--0.26.0--0.27.0.sql diff --git a/extension/sql/pgmq--0.27.0--0.28.0.sql b/pgmq-extension/sql/pgmq--0.27.0--0.28.0.sql similarity index 100% rename from extension/sql/pgmq--0.27.0--0.28.0.sql rename to pgmq-extension/sql/pgmq--0.27.0--0.28.0.sql diff --git a/extension/sql/pgmq--0.28.0--0.29.0.sql b/pgmq-extension/sql/pgmq--0.28.0--0.29.0.sql similarity index 100% rename from extension/sql/pgmq--0.28.0--0.29.0.sql rename to pgmq-extension/sql/pgmq--0.28.0--0.29.0.sql diff --git a/extension/sql/pgmq--0.29.0--0.30.0.sql b/pgmq-extension/sql/pgmq--0.29.0--0.30.0.sql similarity index 100% rename from extension/sql/pgmq--0.29.0--0.30.0.sql rename to pgmq-extension/sql/pgmq--0.29.0--0.30.0.sql diff --git a/extension/sql/pgmq--0.30.0--0.31.0.sql b/pgmq-extension/sql/pgmq--0.30.0--0.31.0.sql similarity index 100% rename from extension/sql/pgmq--0.30.0--0.31.0.sql rename to pgmq-extension/sql/pgmq--0.30.0--0.31.0.sql diff --git a/extension/sql/pgmq--0.31.0--0.31.1.sql b/pgmq-extension/sql/pgmq--0.31.0--0.31.1.sql similarity index 100% rename from extension/sql/pgmq--0.31.0--0.31.1.sql rename to pgmq-extension/sql/pgmq--0.31.0--0.31.1.sql diff --git a/extension/sql/pgmq--0.31.1--0.32.0.sql b/pgmq-extension/sql/pgmq--0.31.1--0.32.0.sql similarity index 100% rename from extension/sql/pgmq--0.31.1--0.32.0.sql rename to pgmq-extension/sql/pgmq--0.31.1--0.32.0.sql diff --git a/extension/sql/pgmq--0.32.0--0.32.1.sql b/pgmq-extension/sql/pgmq--0.32.0--0.32.1.sql similarity index 100% rename from extension/sql/pgmq--0.32.0--0.32.1.sql rename to pgmq-extension/sql/pgmq--0.32.0--0.32.1.sql diff --git a/extension/sql/pgmq--0.32.1--0.32.2.sql b/pgmq-extension/sql/pgmq--0.32.1--0.32.2.sql similarity index 100% rename from extension/sql/pgmq--0.32.1--0.32.2.sql rename to pgmq-extension/sql/pgmq--0.32.1--0.32.2.sql diff --git a/extension/sql/pgmq--0.32.2--0.32.3.sql b/pgmq-extension/sql/pgmq--0.32.2--0.32.3.sql similarity index 100% rename from extension/sql/pgmq--0.32.2--0.32.3.sql rename to pgmq-extension/sql/pgmq--0.32.2--0.32.3.sql diff --git a/extension/sql/pgmq--0.32.3--0.33.0.sql b/pgmq-extension/sql/pgmq--0.32.3--0.33.0.sql similarity index 100% rename from extension/sql/pgmq--0.32.3--0.33.0.sql rename to pgmq-extension/sql/pgmq--0.32.3--0.33.0.sql diff --git a/extension/sql/pgmq--0.33.0--0.33.1.sql b/pgmq-extension/sql/pgmq--0.33.0--0.33.1.sql similarity index 100% rename from extension/sql/pgmq--0.33.0--0.33.1.sql rename to pgmq-extension/sql/pgmq--0.33.0--0.33.1.sql diff --git a/extension/sql/pgmq--0.33.1--0.33.2.sql b/pgmq-extension/sql/pgmq--0.33.1--0.33.2.sql similarity index 100% rename from extension/sql/pgmq--0.33.1--0.33.2.sql rename to pgmq-extension/sql/pgmq--0.33.1--0.33.2.sql diff --git a/extension/sql/pgmq--0.33.2--0.33.3.sql b/pgmq-extension/sql/pgmq--0.33.2--0.33.3.sql similarity index 100% rename from extension/sql/pgmq--0.33.2--0.33.3.sql rename to pgmq-extension/sql/pgmq--0.33.2--0.33.3.sql diff --git a/extension/sql/pgmq--0.33.3--1.0.0.sql b/pgmq-extension/sql/pgmq--0.33.3--1.0.0.sql similarity index 100% rename from extension/sql/pgmq--0.33.3--1.0.0.sql rename to pgmq-extension/sql/pgmq--0.33.3--1.0.0.sql diff --git a/extension/sql/pgmq--0.7.3--0.7.4.sql b/pgmq-extension/sql/pgmq--0.7.3--0.7.4.sql similarity index 100% rename from extension/sql/pgmq--0.7.3--0.7.4.sql rename to pgmq-extension/sql/pgmq--0.7.3--0.7.4.sql diff --git a/extension/sql/pgmq--0.7.4--0.7.5.sql b/pgmq-extension/sql/pgmq--0.7.4--0.7.5.sql similarity index 100% rename from extension/sql/pgmq--0.7.4--0.7.5.sql rename to pgmq-extension/sql/pgmq--0.7.4--0.7.5.sql diff --git a/extension/sql/pgmq--0.7.5--0.8.0.sql b/pgmq-extension/sql/pgmq--0.7.5--0.8.0.sql similarity index 100% rename from extension/sql/pgmq--0.7.5--0.8.0.sql rename to pgmq-extension/sql/pgmq--0.7.5--0.8.0.sql diff --git a/extension/sql/pgmq--0.8.0--0.8.1.sql b/pgmq-extension/sql/pgmq--0.8.0--0.8.1.sql similarity index 100% rename from extension/sql/pgmq--0.8.0--0.8.1.sql rename to pgmq-extension/sql/pgmq--0.8.0--0.8.1.sql diff --git a/extension/sql/pgmq--0.8.1--0.9.0.sql b/pgmq-extension/sql/pgmq--0.8.1--0.9.0.sql similarity index 100% rename from extension/sql/pgmq--0.8.1--0.9.0.sql rename to pgmq-extension/sql/pgmq--0.8.1--0.9.0.sql diff --git a/extension/sql/pgmq--0.9.0--0.10.2.sql b/pgmq-extension/sql/pgmq--0.9.0--0.10.2.sql similarity index 100% rename from extension/sql/pgmq--0.9.0--0.10.2.sql rename to pgmq-extension/sql/pgmq--0.9.0--0.10.2.sql diff --git a/extension/sql/pgmq--1.0.0--1.1.0.sql b/pgmq-extension/sql/pgmq--1.0.0--1.1.0.sql similarity index 100% rename from extension/sql/pgmq--1.0.0--1.1.0.sql rename to pgmq-extension/sql/pgmq--1.0.0--1.1.0.sql diff --git a/extension/sql/pgmq--1.1.0--1.1.1.sql b/pgmq-extension/sql/pgmq--1.1.0--1.1.1.sql similarity index 100% rename from extension/sql/pgmq--1.1.0--1.1.1.sql rename to pgmq-extension/sql/pgmq--1.1.0--1.1.1.sql diff --git a/extension/sql/pgmq--1.1.1--1.2.0.sql b/pgmq-extension/sql/pgmq--1.1.1--1.2.0.sql similarity index 100% rename from extension/sql/pgmq--1.1.1--1.2.0.sql rename to pgmq-extension/sql/pgmq--1.1.1--1.2.0.sql diff --git a/extension/sql/pgmq--1.2.0--1.2.1.sql b/pgmq-extension/sql/pgmq--1.2.0--1.2.1.sql similarity index 100% rename from extension/sql/pgmq--1.2.0--1.2.1.sql rename to pgmq-extension/sql/pgmq--1.2.0--1.2.1.sql diff --git a/extension/sql/pgmq--1.2.1--1.3.0.sql b/pgmq-extension/sql/pgmq--1.2.1--1.3.0.sql similarity index 100% rename from extension/sql/pgmq--1.2.1--1.3.0.sql rename to pgmq-extension/sql/pgmq--1.2.1--1.3.0.sql diff --git a/extension/sql/pgmq--1.3.0--1.3.1.sql b/pgmq-extension/sql/pgmq--1.3.0--1.3.1.sql similarity index 100% rename from extension/sql/pgmq--1.3.0--1.3.1.sql rename to pgmq-extension/sql/pgmq--1.3.0--1.3.1.sql diff --git a/extension/sql/pgmq--1.3.1--1.3.2.sql b/pgmq-extension/sql/pgmq--1.3.1--1.3.2.sql similarity index 100% rename from extension/sql/pgmq--1.3.1--1.3.2.sql rename to pgmq-extension/sql/pgmq--1.3.1--1.3.2.sql diff --git a/extension/sql/pgmq--1.3.2--1.3.3.sql b/pgmq-extension/sql/pgmq--1.3.2--1.3.3.sql similarity index 100% rename from extension/sql/pgmq--1.3.2--1.3.3.sql rename to pgmq-extension/sql/pgmq--1.3.2--1.3.3.sql diff --git a/extension/sql/pgmq.sql b/pgmq-extension/sql/pgmq.sql similarity index 100% rename from extension/sql/pgmq.sql rename to pgmq-extension/sql/pgmq.sql From 260baa02d676c284a833697a6c1d033763785d72 Mon Sep 17 00:00:00 2001 From: Adam Hendel Date: Sun, 16 Jun 2024 13:47:52 -0500 Subject: [PATCH 8/9] fix paths --- .github/workflows/extension_ci.yml | 8 ++++---- .github/workflows/extension_upgrade.yml | 6 +++--- images/pgmq-pg/Dockerfile.in | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/extension_ci.yml b/.github/workflows/extension_ci.yml index f46ca26e..2cccb33b 100644 --- a/.github/workflows/extension_ci.yml +++ b/.github/workflows/extension_ci.yml @@ -3,20 +3,20 @@ name: PGMQ Extension defaults: run: shell: bash - working-directory: ./extension + working-directory: ./pgmq-extension on: pull_request: branches: - main paths: - - "extension/**" + - "pgmq-extension/**" - ".github/workflows/extension_ci.yml" push: branches: - main paths: - - "extension/**" + - "pgmq-extension/**" - ".github/workflows/extension_ci.yml" release: types: @@ -91,7 +91,7 @@ jobs: with: prefix-key: "pgmq-extension-test" workspaces: | - pgmq/extension + pgmq/pgmq-extension - name: Install stoml and pg-trunk shell: bash run: | diff --git a/.github/workflows/extension_upgrade.yml b/.github/workflows/extension_upgrade.yml index b77a8585..07251b6c 100644 --- a/.github/workflows/extension_upgrade.yml +++ b/.github/workflows/extension_upgrade.yml @@ -3,20 +3,20 @@ name: PGMQ Extension Upgrade defaults: run: shell: bash - working-directory: ./extension + working-directory: ./pgmq-extension on: pull_request: branches: - main paths: - - "extension/**" + - "pgmq-extension/**" - ".github/workflows/extension_upgrade.yml" push: branches: - main paths: - - "extension/**" + - "pgmq-extension/**" - ".github/workflows/extension_upgrade.yml" release: types: diff --git a/images/pgmq-pg/Dockerfile.in b/images/pgmq-pg/Dockerfile.in index beab91d0..1159301f 100644 --- a/images/pgmq-pg/Dockerfile.in +++ b/images/pgmq-pg/Dockerfile.in @@ -14,11 +14,11 @@ RUN apt-get update \ # Install pgmq -COPY ./extension extension -RUN cd extension && make && make install +COPY ./pgmq-extension pgmq-extension +RUN cd pgmq-extension && make && make install # install pg_partman -RUN cd extension && make install-pg-partman +RUN cd pgmq-extension && make install-pg-partman FROM postgres:@@PG_VERSION@@-bookworm From 824365aed74cbb850858f5317a1e12b536747614 Mon Sep 17 00:00:00 2001 From: Adam Hendel Date: Mon, 17 Jun 2024 18:19:16 -0500 Subject: [PATCH 9/9] remove rust test dir --- pgmq-extension/integration_test/Cargo.lock | 1885 ----------------- pgmq-extension/integration_test/Cargo.toml | 40 - .../tests/integration_tests.rs | 858 -------- 3 files changed, 2783 deletions(-) delete mode 100644 pgmq-extension/integration_test/Cargo.lock delete mode 100644 pgmq-extension/integration_test/Cargo.toml delete mode 100644 pgmq-extension/integration_test/tests/integration_tests.rs diff --git a/pgmq-extension/integration_test/Cargo.lock b/pgmq-extension/integration_test/Cargo.lock deleted file mode 100644 index 6275731b..00000000 --- a/pgmq-extension/integration_test/Cargo.lock +++ /dev/null @@ -1,1885 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "addr2line" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "ahash" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" -dependencies = [ - "cfg-if", - "getrandom", - "once_cell", - "version_check", - "zerocopy", -] - -[[package]] -name = "allocator-api2" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" - -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - -[[package]] -name = "atoi" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28d99ec8bfea296261ca1af174f24225171fea9664ba9003cbebee704810528" -dependencies = [ - "num-traits", -] - -[[package]] -name = "autocfg" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" - -[[package]] -name = "backtrace" -version = "0.3.72" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17c6a35df3749d2e8bb1b7b21a976d82b15548788d2735b9d82f329268f71a11" -dependencies = [ - "addr2line", - "cc", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", -] - -[[package]] -name = "base64" -version = "0.21.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" - -[[package]] -name = "base64ct" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" -dependencies = [ - "serde", -] - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] - -[[package]] -name = "bumpalo" -version = "3.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "bytes" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" - -[[package]] -name = "cc" -version = "1.0.99" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96c51067fd44124faa7f870b4b1c969379ad32b2ba805aa959430ceaa384f695" - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "chrono" -version = "0.4.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" -dependencies = [ - "android-tzdata", - "iana-time-zone", - "js-sys", - "num-traits", - "serde", - "wasm-bindgen", - "windows-targets 0.52.5", -] - -[[package]] -name = "const-oid" -version = "0.9.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" - -[[package]] -name = "core-foundation" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" - -[[package]] -name = "cpufeatures" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" -dependencies = [ - "libc", -] - -[[package]] -name = "crc" -version = "3.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69e6e4d7b33a94f0991c26729976b10ebde1d34c3ee82408fb536164fa10d636" -dependencies = [ - "crc-catalog", -] - -[[package]] -name = "crc-catalog" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" - -[[package]] -name = "crossbeam-queue" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" - -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "der" -version = "0.7.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" -dependencies = [ - "const-oid", - "pem-rfc7468", - "zeroize", -] - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer", - "const-oid", - "crypto-common", - "subtle", -] - -[[package]] -name = "dotenvy" -version = "0.15.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" - -[[package]] -name = "either" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" -dependencies = [ - "serde", -] - -[[package]] -name = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - -[[package]] -name = "errno" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "etcetera" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "136d1b5283a1ab77bd9257427ffd09d8667ced0570b6f938942bc7568ed5b943" -dependencies = [ - "cfg-if", - "home", - "windows-sys 0.48.0", -] - -[[package]] -name = "event-listener" -version = "2.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" - -[[package]] -name = "fastrand" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" - -[[package]] -name = "flume" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55ac459de2512911e4b674ce33cf20befaba382d05b62b008afc1c8b57cbf181" -dependencies = [ - "futures-core", - "futures-sink", - "spin 0.9.8", -] - -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - -[[package]] -name = "form_urlencoded" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "futures-channel" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" -dependencies = [ - "futures-core", - "futures-sink", -] - -[[package]] -name = "futures-core" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" - -[[package]] -name = "futures-executor" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-intrusive" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d930c203dd0b6ff06e0201a4a2fe9149b43c684fd4420555b26d21b1a02956f" -dependencies = [ - "futures-core", - "lock_api", - "parking_lot", -] - -[[package]] -name = "futures-io" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" - -[[package]] -name = "futures-sink" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" - -[[package]] -name = "futures-task" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" - -[[package]] -name = "futures-util" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" -dependencies = [ - "futures-core", - "futures-io", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "getrandom" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" -dependencies = [ - "cfg-if", - "libc", - "wasi", -] - -[[package]] -name = "gimli" -version = "0.29.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" - -[[package]] -name = "hashbrown" -version = "0.14.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" -dependencies = [ - "ahash", - "allocator-api2", -] - -[[package]] -name = "hashlink" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" -dependencies = [ - "hashbrown", -] - -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" -dependencies = [ - "unicode-segmentation", -] - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - -[[package]] -name = "hkdf" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" -dependencies = [ - "hmac", -] - -[[package]] -name = "hmac" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" -dependencies = [ - "digest", -] - -[[package]] -name = "home" -version = "0.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "iana-time-zone" -version = "0.1.60" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "windows-core", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - -[[package]] -name = "idna" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "indexmap" -version = "2.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" -dependencies = [ - "equivalent", - "hashbrown", -] - -[[package]] -name = "itertools" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" - -[[package]] -name = "js-sys" -version = "0.3.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -dependencies = [ - "spin 0.5.2", -] - -[[package]] -name = "libc" -version = "0.2.155" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" - -[[package]] -name = "libm" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" - -[[package]] -name = "libsqlite3-sys" -version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4e226dcd58b4be396f7bd3c20da8fdee2911400705297ba7d2d7cc2c30f716" -dependencies = [ - "cc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "linux-raw-sys" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" - -[[package]] -name = "lock_api" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" - -[[package]] -name = "md-5" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" -dependencies = [ - "cfg-if", - "digest", -] - -[[package]] -name = "memchr" -version = "2.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" - -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - -[[package]] -name = "miniz_oxide" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87dfd01fe195c66b572b37921ad8803d010623c0aca821bea2302239d155cdae" -dependencies = [ - "adler", -] - -[[package]] -name = "mio" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" -dependencies = [ - "libc", - "wasi", - "windows-sys 0.48.0", -] - -[[package]] -name = "native-tls" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" -dependencies = [ - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", -] - -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - -[[package]] -name = "num-bigint-dig" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc84195820f291c7697304f3cbdadd1cb7199c0efc917ff5eafd71225c136151" -dependencies = [ - "byteorder", - "lazy_static", - "libm", - "num-integer", - "num-iter", - "num-traits", - "rand", - "smallvec", - "zeroize", -] - -[[package]] -name = "num-integer" -version = "0.1.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" -dependencies = [ - "num-traits", -] - -[[package]] -name = "num-iter" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" -dependencies = [ - "autocfg", - "libm", -] - -[[package]] -name = "object" -version = "0.35.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8ec7ab813848ba4522158d5517a6093db1ded27575b070f4177b8d12b41db5e" -dependencies = [ - "memchr", -] - -[[package]] -name = "once_cell" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" - -[[package]] -name = "openssl" -version = "0.10.64" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" -dependencies = [ - "bitflags 2.5.0", - "cfg-if", - "foreign-types", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - -[[package]] -name = "openssl-probe" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" - -[[package]] -name = "openssl-sys" -version = "0.9.102" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "parking_lot" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall 0.5.1", - "smallvec", - "windows-targets 0.52.5", -] - -[[package]] -name = "paste" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" - -[[package]] -name = "pem-rfc7468" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412" -dependencies = [ - "base64ct", -] - -[[package]] -name = "percent-encoding" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" - -[[package]] -name = "pgmq" -version = "0.28.2" -dependencies = [ - "chrono", - "log", - "serde", - "serde_json", - "sqlx", - "thiserror", - "tokio", - "url", -] - -[[package]] -name = "pgmq-integration-tests" -version = "0.1.0" -dependencies = [ - "chrono", - "log", - "pgmq", - "rand", - "serde", - "serde_json", - "sqlx", - "thiserror", - "tokio", - "url", - "whoami", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "pkcs1" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f" -dependencies = [ - "der", - "pkcs8", - "spki", -] - -[[package]] -name = "pkcs8" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" -dependencies = [ - "der", - "spki", -] - -[[package]] -name = "pkg-config" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" - -[[package]] -name = "ppv-lite86" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" - -[[package]] -name = "proc-macro2" -version = "1.0.85" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22244ce15aa966053a896d1accb3a6e68469b97c7f33f284b99f0d576879fc23" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha", - "rand_core", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom", -] - -[[package]] -name = "redox_syscall" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_syscall" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" -dependencies = [ - "bitflags 2.5.0", -] - -[[package]] -name = "rsa" -version = "0.9.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d0e5124fcb30e76a7e79bfee683a2746db83784b86289f6251b54b7950a0dfc" -dependencies = [ - "const-oid", - "digest", - "num-bigint-dig", - "num-integer", - "num-traits", - "pkcs1", - "pkcs8", - "rand_core", - "signature", - "spki", - "subtle", - "zeroize", -] - -[[package]] -name = "rustc-demangle" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" - -[[package]] -name = "rustix" -version = "0.38.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" -dependencies = [ - "bitflags 2.5.0", - "errno", - "libc", - "linux-raw-sys", - "windows-sys 0.52.0", -] - -[[package]] -name = "ryu" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" - -[[package]] -name = "schannel" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "security-framework" -version = "2.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" -dependencies = [ - "bitflags 2.5.0", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "2.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "serde" -version = "1.0.203" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.203" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - -[[package]] -name = "serde_json" -version = "1.0.117" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "sha1" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - -[[package]] -name = "sha2" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - -[[package]] -name = "signature" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" -dependencies = [ - "digest", - "rand_core", -] - -[[package]] -name = "slab" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] - -[[package]] -name = "smallvec" -version = "1.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" - -[[package]] -name = "socket2" -version = "0.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "spin" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" - -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" -dependencies = [ - "lock_api", -] - -[[package]] -name = "spki" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" -dependencies = [ - "base64ct", - "der", -] - -[[package]] -name = "sqlformat" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce81b7bd7c4493975347ef60d8c7e8b742d4694f4c49f93e0a12ea263938176c" -dependencies = [ - "itertools", - "nom", - "unicode_categories", -] - -[[package]] -name = "sqlx" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9a2ccff1a000a5a59cd33da541d9f2fdcd9e6e8229cc200565942bff36d0aaa" -dependencies = [ - "sqlx-core", - "sqlx-macros", - "sqlx-mysql", - "sqlx-postgres", - "sqlx-sqlite", -] - -[[package]] -name = "sqlx-core" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24ba59a9342a3d9bab6c56c118be528b27c9b60e490080e9711a04dccac83ef6" -dependencies = [ - "ahash", - "atoi", - "byteorder", - "bytes", - "chrono", - "crc", - "crossbeam-queue", - "either", - "event-listener", - "futures-channel", - "futures-core", - "futures-intrusive", - "futures-io", - "futures-util", - "hashlink", - "hex", - "indexmap", - "log", - "memchr", - "native-tls", - "once_cell", - "paste", - "percent-encoding", - "serde", - "serde_json", - "sha2", - "smallvec", - "sqlformat", - "thiserror", - "tokio", - "tokio-stream", - "tracing", - "url", -] - -[[package]] -name = "sqlx-macros" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ea40e2345eb2faa9e1e5e326db8c34711317d2b5e08d0d5741619048a803127" -dependencies = [ - "proc-macro2", - "quote", - "sqlx-core", - "sqlx-macros-core", - "syn 1.0.109", -] - -[[package]] -name = "sqlx-macros-core" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5833ef53aaa16d860e92123292f1f6a3d53c34ba8b1969f152ef1a7bb803f3c8" -dependencies = [ - "dotenvy", - "either", - "heck", - "hex", - "once_cell", - "proc-macro2", - "quote", - "serde", - "serde_json", - "sha2", - "sqlx-core", - "sqlx-mysql", - "sqlx-postgres", - "sqlx-sqlite", - "syn 1.0.109", - "tempfile", - "tokio", - "url", -] - -[[package]] -name = "sqlx-mysql" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ed31390216d20e538e447a7a9b959e06ed9fc51c37b514b46eb758016ecd418" -dependencies = [ - "atoi", - "base64", - "bitflags 2.5.0", - "byteorder", - "bytes", - "chrono", - "crc", - "digest", - "dotenvy", - "either", - "futures-channel", - "futures-core", - "futures-io", - "futures-util", - "generic-array", - "hex", - "hkdf", - "hmac", - "itoa", - "log", - "md-5", - "memchr", - "once_cell", - "percent-encoding", - "rand", - "rsa", - "serde", - "sha1", - "sha2", - "smallvec", - "sqlx-core", - "stringprep", - "thiserror", - "tracing", - "whoami", -] - -[[package]] -name = "sqlx-postgres" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c824eb80b894f926f89a0b9da0c7f435d27cdd35b8c655b114e58223918577e" -dependencies = [ - "atoi", - "base64", - "bitflags 2.5.0", - "byteorder", - "chrono", - "crc", - "dotenvy", - "etcetera", - "futures-channel", - "futures-core", - "futures-io", - "futures-util", - "hex", - "hkdf", - "hmac", - "home", - "itoa", - "log", - "md-5", - "memchr", - "once_cell", - "rand", - "serde", - "serde_json", - "sha2", - "smallvec", - "sqlx-core", - "stringprep", - "thiserror", - "tracing", - "whoami", -] - -[[package]] -name = "sqlx-sqlite" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b244ef0a8414da0bed4bb1910426e890b19e5e9bccc27ada6b797d05c55ae0aa" -dependencies = [ - "atoi", - "chrono", - "flume", - "futures-channel", - "futures-core", - "futures-executor", - "futures-intrusive", - "futures-util", - "libsqlite3-sys", - "log", - "percent-encoding", - "serde", - "sqlx-core", - "tracing", - "url", - "urlencoding", -] - -[[package]] -name = "stringprep" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b4df3d392d81bd458a8a621b8bffbd2302a12ffe288a9d931670948749463b1" -dependencies = [ - "unicode-bidi", - "unicode-normalization", - "unicode-properties", -] - -[[package]] -name = "subtle" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.66" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "tempfile" -version = "3.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" -dependencies = [ - "cfg-if", - "fastrand", - "rustix", - "windows-sys 0.52.0", -] - -[[package]] -name = "thiserror" -version = "1.0.61" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.61" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - -[[package]] -name = "tinyvec" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - -[[package]] -name = "tokio" -version = "1.38.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" -dependencies = [ - "backtrace", - "bytes", - "libc", - "mio", - "pin-project-lite", - "socket2", - "tokio-macros", - "windows-sys 0.48.0", -] - -[[package]] -name = "tokio-macros" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - -[[package]] -name = "tokio-stream" -version = "0.1.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" -dependencies = [ - "futures-core", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "tracing" -version = "0.1.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" -dependencies = [ - "log", - "pin-project-lite", - "tracing-attributes", - "tracing-core", -] - -[[package]] -name = "tracing-attributes" -version = "0.1.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - -[[package]] -name = "tracing-core" -version = "0.1.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" -dependencies = [ - "once_cell", -] - -[[package]] -name = "typenum" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" - -[[package]] -name = "unicode-bidi" -version = "0.3.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" - -[[package]] -name = "unicode-ident" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "unicode-normalization" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "unicode-properties" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4259d9d4425d9f0661581b804cb85fe66a4c631cadd8f490d1c13a35d5d9291" - -[[package]] -name = "unicode-segmentation" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" - -[[package]] -name = "unicode_categories" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" - -[[package]] -name = "url" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", -] - -[[package]] -name = "urlencoding" -version = "2.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" - -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasite" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b" - -[[package]] -name = "wasm-bindgen" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" -dependencies = [ - "cfg-if", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn 2.0.66", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" - -[[package]] -name = "web-sys" -version = "0.3.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "whoami" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44ab49fad634e88f55bf8f9bb3abd2f27d7204172a112c7c9987e01c1c94ea9" -dependencies = [ - "redox_syscall 0.4.1", - "wasite", - "web-sys", -] - -[[package]] -name = "windows-core" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" -dependencies = [ - "windows-targets 0.52.5", -] - -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", -] - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets 0.52.5", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - -[[package]] -name = "windows-targets" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" -dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", - "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" - -[[package]] -name = "zerocopy" -version = "0.7.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087" -dependencies = [ - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.7.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - -[[package]] -name = "zeroize" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" diff --git a/pgmq-extension/integration_test/Cargo.toml b/pgmq-extension/integration_test/Cargo.toml deleted file mode 100644 index e65bba96..00000000 --- a/pgmq-extension/integration_test/Cargo.toml +++ /dev/null @@ -1,40 +0,0 @@ -[package] -name = "pgmq-integration-tests" -version = "0.1.0" -edition = "2021" -authors = ["Tembo.io"] -description = "Integration tests for PGMQ" -homepage = "https://www.tembo.io" -license = "PostgreSQL" -readme = "README.md" -repository = "https://github.com/tembo-io/pgmq/" -publish = false - -[dependencies] -serde = "1.0.152" -serde_json = "1.0.91" -thiserror = "1.0.38" -url = "2.3.1" -pgmq = {path = "../../pgmq-rs"} -log = "0.4.17" - -[dev-dependencies] -chrono = { version = "0.4.23", features = ["serde"] } -rand = "0.8.5" -sqlx = { version = "0.7.2", features = [ - "runtime-tokio-native-tls", - "postgres", - "chrono", -] } -tokio = { version = "1", features = ["macros"] } -whoami = "1.4.0" - -[profile.dev] -panic = "unwind" -lto = "thin" - -[profile.release] -panic = "unwind" -opt-level = 3 -lto = "fat" -codegen-units = 1 diff --git a/pgmq-extension/integration_test/tests/integration_tests.rs b/pgmq-extension/integration_test/tests/integration_tests.rs deleted file mode 100644 index 637c44d4..00000000 --- a/pgmq-extension/integration_test/tests/integration_tests.rs +++ /dev/null @@ -1,858 +0,0 @@ -use pgmq::{ - types::{ARCHIVE_PREFIX, PGMQ_SCHEMA, QUEUE_PREFIX}, - util::{conn_options, fetch_one_message}, -}; -use rand::Rng; - -use sqlx::postgres::PgPoolOptions; -use sqlx::FromRow; -use sqlx::Row; -use sqlx::{Pool, Postgres}; -use url::Url; - -#[allow(dead_code)] -#[derive(FromRow)] -struct MetricsRow { - queue_name: String, - queue_length: i64, - newest_msg_age_sec: Option, - oldest_msg_age_sec: Option, - total_messages: i64, - scrape_time: chrono::DateTime, -} - -#[allow(dead_code)] -#[derive(FromRow, Debug)] -struct QueueMeta { - queue_name: String, -} - -#[allow(dead_code)] -#[derive(FromRow)] -struct ResultSet { - num_partmans: i64, -} - -async fn do_connect(options: sqlx::postgres::PgConnectOptions) -> Pool { - PgPoolOptions::new() - .acquire_timeout(std::time::Duration::from_secs(10)) - .max_connections(5) - .connect_with(options) - .await - .expect("failed to connect to pg") -} - -async fn connect(url: &str) -> Pool { - let options = conn_options(url).expect("failed to parse url"); - do_connect(options).await -} - -async fn connect_with_db(url: &str, db_name: &str) -> Pool { - let options = conn_options(url) - .expect("failed to parse url") - .database(db_name); - do_connect(options).await -} - -async fn init_database() -> Pool { - let database_url = database_url(); - let conn00 = connect_with_db(&database_url, "postgres").await; - let database_name = database_name(&database_url); - - // ignore the error if the db already exists! - let _ = sqlx::query(&format!("CREATE DATABASE {database_name};")) - .execute(&conn00) - .await; - conn00.close().await; - - let conn = connect(&database_url).await; - - // DROP EXTENSION - // requires pg_partman to already be installed in the instance - let _ = sqlx::query("DROP EXTENSION IF EXISTS pgmq CASCADE") - .execute(&conn) - .await - .expect("failed to drop extension"); - - // CREATE EXTENSION - let _ = sqlx::query("CREATE EXTENSION pgmq") - .execute(&conn) - .await - .expect("failed to create extension"); - - // CREATE EXTENSION - let _ = sqlx::query("CREATE EXTENSION IF NOT EXISTS pg_partman") - .execute(&conn) - .await - .expect("failed to create extension"); - - conn -} - -#[tokio::test] -async fn test_unlogged() { - let conn = init_database().await; - let mut rng = rand::thread_rng(); - let test_num = rng.gen_range(0..100000); - - // CREATE with default retention and partition strategy - let test_queue = format!("test_unlogged_{test_num}"); - let _ = sqlx::query(&format!( - "SELECT {PGMQ_SCHEMA}.create_unlogged('{test_queue}');" - )) - .execute(&conn) - .await - .expect("failed to create queue"); - - let msg_id = sqlx::query(&format!( - "SELECT * from {PGMQ_SCHEMA}.send('{test_queue}', '{{\"hello\": \"world\"}}');" - )) - .fetch_one(&conn) - .await - .expect("failed send") - .get::(0); - assert_eq!(msg_id, 1); - - let query = &format!("SELECT * from {PGMQ_SCHEMA}.read('{test_queue}', 2, 1);"); - - let message = fetch_one_message::(query, &conn) - .await - .expect("failed reading message") - .expect("expected message"); - assert_eq!(message.msg_id, msg_id); -} - -#[tokio::test] -async fn test_max_queue_name_size() { - let conn = init_database().await; - - // CREATE with default retention and partition strategy - let too_big = &"a".repeat(48); - let result1 = sqlx::query(&format!("SELECT {PGMQ_SCHEMA}.create('{too_big}');")) - .execute(&conn) - .await; - - assert!(result1.is_err()); - - let okay = &"a".repeat(47); - let result2 = sqlx::query(&format!("SELECT {PGMQ_SCHEMA}.create('{okay}');")) - .execute(&conn) - .await; - - assert!(result2.is_ok()); -} - -#[tokio::test] -async fn test_lifecycle() { - let conn = init_database().await; - let mut rng = rand::thread_rng(); - let test_num = rng.gen_range(0..100000); - - // CREATE with default retention and partition strategy - let test_default_queue = format!("test_default_{test_num}"); - let _ = sqlx::query(&format!( - "SELECT {PGMQ_SCHEMA}.create('{test_default_queue}');" - )) - .execute(&conn) - .await - .expect("failed to create queue"); - - // creating a queue must be idempotent - // create with same name again, must be no error - let _ = sqlx::query(&format!( - "SELECT {PGMQ_SCHEMA}.create('{test_default_queue}');" - )) - .execute(&conn) - .await - .expect("failed to create queue"); - - let msg_id = sqlx::query(&format!( - "SELECT * from {PGMQ_SCHEMA}.send('{test_default_queue}', '{{\"hello\": \"world\"}}');" - )) - .fetch_one(&conn) - .await - .expect("failed send") - .get::(0); - assert_eq!(msg_id, 1); - - // read message - // vt=2, limit=1 - let query = &format!("SELECT * from {PGMQ_SCHEMA}.read('{test_default_queue}', 2, 1);"); - - let message = fetch_one_message::(query, &conn) - .await - .expect("failed reading message") - .expect("expected message"); - assert_eq!(message.msg_id, 1); - - // set VT to in 10 seconds - let query = - &format!("SELECT * from {PGMQ_SCHEMA}.set_vt('{test_default_queue}', {msg_id}, 5);"); - let message = fetch_one_message::(query, &conn) - .await - .expect("failed reading message") - .expect("expected message"); - assert_eq!(message.msg_id, 1); - let now = chrono::offset::Utc::now(); - // closish to 10 seconds from now - assert!(message.vt > now + chrono::Duration::seconds(4)); - - // read again, assert no messages because we just set VT to the future - let query = &format!("SELECT * from {PGMQ_SCHEMA}.read('{test_default_queue}', 2, 1);"); - let message = fetch_one_message::(query, &conn) - .await - .expect("failed reading message"); - assert!(message.is_none()); - - // read again, now using poll to block until message is ready - let query = - &format!("SELECT * from {PGMQ_SCHEMA}.read_with_poll('{test_default_queue}', 10, 1, 10);"); - let message = fetch_one_message::(query, &conn) - .await - .expect("failed reading message") - .expect("expected message"); - assert_eq!(message.msg_id, 1); - - // after reading it, set VT to now - let query = - &format!("SELECT * from {PGMQ_SCHEMA}.set_vt('{test_default_queue}', {msg_id}, 0);"); - let message = fetch_one_message::(query, &conn) - .await - .expect("failed reading message") - .expect("expected message"); - assert_eq!(message.msg_id, 1); - - // read again, should have msg_id 1 again - let query = &format!("SELECT * from {PGMQ_SCHEMA}.read('{test_default_queue}', 2, 1);"); - let message = fetch_one_message::(query, &conn) - .await - .expect("failed reading message") - .expect("expected message"); - assert_eq!(message.msg_id, 1); - - // send a batch of 2 messages - let batch_queue = format!("test_batch_{test_num}"); - create_queue(&batch_queue.to_string(), &conn).await; - - let msg_ids = sqlx::query( - &format!("select {PGMQ_SCHEMA}.send_batch('{batch_queue}', ARRAY['{{\"hello\": \"world_0\"}}'::jsonb, '{{\"hello\": \"world_1\"}}'::jsonb])") - ) - .fetch_all(&conn).await.expect("failed to send batch"); - assert_eq!(msg_ids.len(), 2); - assert_eq!(msg_ids[0].get::(0), 1); - assert_eq!(msg_ids[1].get::(0), 2); - assert_eq!(get_queue_size(&batch_queue, &conn).await, 2); - - let _ = sqlx::query("CREATE EXTENSION IF NOT EXISTS pg_partman") - .execute(&conn) - .await - .expect("failed to create extension"); - - // CREATE with 5 seconds per partition, 10 seconds retention - let test_duration_queue = format!("test_duration_{test_num}"); - let q = format!("SELECT {PGMQ_SCHEMA}.create_partitioned('{test_duration_queue}'::text, '5 seconds'::text, '10 seconds'::text);"); - let _ = sqlx::query(&q) - .execute(&conn) - .await - .expect("failed creating duration queue"); - - // CREATE with 10 messages per partition, 20 messages retention - let test_numeric_queue = format!("test_numeric_{test_num}"); - let _ = sqlx::query(&format!( - "SELECT {PGMQ_SCHEMA}.create_partitioned('{test_numeric_queue}'::text, '10'::text, '20'::text);" - )) - .execute(&conn) - .await - .expect("failed creating numeric interval queue"); - - // get metrics - let rows = sqlx::query_as::<_, MetricsRow>(&format!( - "SELECT * from {PGMQ_SCHEMA}.metrics('{test_duration_queue}'::text);" - )) - .fetch_all(&conn) - .await - .expect("failed creating numeric interval queue"); - assert_eq!(rows.len(), 1); - - // get metrics all - let rows = - sqlx::query_as::<_, MetricsRow>(&format!("SELECT * from {PGMQ_SCHEMA}.metrics_all();")) - .fetch_all(&conn) - .await - .expect("failed creating numeric interval queue"); - assert!(rows.len() > 1); - - // delete all the queues - // delete partitioned queues - for queue in [test_duration_queue, test_numeric_queue].iter() { - sqlx::query(&format!( - "select {PGMQ_SCHEMA}.drop_queue('{}', true);", - &queue - )) - .execute(&conn) - .await - .expect("failed to drop partitioned queues"); - } - - let queues = sqlx::query_as::<_, QueueMeta>(&format!( - "select queue_name from {PGMQ_SCHEMA}.list_queues();" - )) - .fetch_all(&conn) - .await - .expect("failed to list queues"); - - // drop the rest of the queues - for queue in queues { - let q = queue.queue_name; - sqlx::query(&format!("select {PGMQ_SCHEMA}.drop_queue('{}');", &q)) - .execute(&conn) - .await - .expect("failed to drop standard queues"); - } - - let queues = sqlx::query_as::<_, QueueMeta>(&format!( - "select queue_name from {PGMQ_SCHEMA}.list_queues();" - )) - .fetch_all(&conn) - .await - .expect("failed to list queues"); - assert!(queues.is_empty()); -} - -#[tokio::test] -async fn test_archive() { - let conn = init_database().await; - let mut rng = rand::thread_rng(); - let test_num = rng.gen_range(0..100000); - - let queue_name = format!("test_archive_{test_num}"); - - create_queue(&queue_name.to_string(), &conn).await; - - // no messages in the queue - assert_eq!(get_queue_size(&queue_name, &conn).await, 0); - - // no messages in queue archive - assert_eq!(get_archive_size(&queue_name, &conn).await, 0); - - // put messages on the queue - let msg_id1 = send_sample_message(&queue_name, &conn).await; - let msg_id2 = send_sample_message(&queue_name, &conn).await; - - // two messages in the queue - assert_eq!(get_queue_size(&queue_name, &conn).await, 2); - - // archive the message. The first two exist so the id should be returned, the - // last one doesn't - let archived = sqlx::query(&format!( - "SELECT * FROM {PGMQ_SCHEMA}.archive('{queue_name}', ARRAY[{msg_id1}, {msg_id2}])" - )) - .fetch_all(&conn) - .await - .expect("failed to archive"); - - assert_eq!(archived.len(), 2); - assert_eq!(archived[0].get::(0), 1); - assert_eq!(archived[1].get::(0), 2); - - // should be no messages left on the queue table - assert_eq!(get_queue_size(&queue_name, &conn).await, 0); - - // should be two messages in archive - assert_eq!(get_archive_size(&queue_name, &conn).await, 2); - - let msg_id3 = send_sample_message(&queue_name, &conn).await; - - assert_eq!(get_queue_size(&queue_name, &conn).await, 1); - - let archived_single = sqlx::query(&format!( - "SELECT * FROM {PGMQ_SCHEMA}.archive('{queue_name}', {msg_id3})" - )) - .fetch_one(&conn) - .await - .expect("failed to archive") - .get::(0); - - assert_eq!(archived_single, true); - - assert_eq!(get_queue_size(&queue_name, &conn).await, 0); - assert_eq!(get_archive_size(&queue_name, &conn).await, 3); -} - -#[tokio::test] -async fn test_read_read_with_poll() { - let conn = init_database().await; - let mut rng = rand::thread_rng(); - let test_num = rng.gen_range(0..100000); - - let queue_name = format!("test_read_{test_num}"); - - // Creating queue - create_queue(&queue_name.to_string(), &conn).await; - - // Sending 3 messages to the queue - let msg_id1 = send_sample_message(&queue_name, &conn).await; - let msg_id2 = send_sample_message(&queue_name, &conn).await; - let msg_id3 = send_sample_message(&queue_name, &conn).await; - - // Reading with limit respects the limit - let read_batch = sqlx::query(&format!( - "SELECT * FROM {PGMQ_SCHEMA}.read('{queue_name}', 5, 1)" - )) - .fetch_all(&conn) - .await - .expect("failed to read"); - - assert_eq!(read_batch.len(), 1); - assert_eq!(read_batch[0].get::(0), msg_id1); - - // Reading respects the VT - let read_batch2 = sqlx::query(&format!( - "SELECT * FROM {PGMQ_SCHEMA}.read('{queue_name}', 10, 5)" - )) - .fetch_all(&conn) - .await - .expect("failed to read"); - - assert_eq!(read_batch2.len(), 2); - assert_eq!(read_batch2[0].get::(0), msg_id2); - assert_eq!(read_batch2[1].get::(0), msg_id3); - - // Read with poll will poll until the first message is available - let start = std::time::Instant::now(); - - let read_batch3 = sqlx::query(&format!( - "SELECT * FROM {PGMQ_SCHEMA}.read_with_poll('{queue_name}', 10, 5, 5, 100)" - )) - .fetch_all(&conn) - .await - .expect("failed to read"); - - // Asserting it took more than 3 seconds: - assert!(start.elapsed().as_secs() > 3); - assert_eq!(read_batch3.len(), 1); - assert_eq!(read_batch3[0].get::(0), msg_id1); -} - -#[tokio::test] -async fn test_purge_queue() { - let conn = init_database().await; - let mut rng = rand::thread_rng(); - let test_num = rng.gen_range(0..100000); - - let queue_name = format!("test_purge_{test_num}"); - create_queue(&queue_name.to_string(), &conn).await; - - send_sample_message(&queue_name, &conn).await; - send_sample_message(&queue_name, &conn).await; - send_sample_message(&queue_name, &conn).await; - send_sample_message(&queue_name, &conn).await; - send_sample_message(&queue_name, &conn).await; - - let deleted_count = sqlx::query(&format!( - "SELECT * FROM {PGMQ_SCHEMA}.purge_queue('{queue_name}')" - )) - .fetch_one(&conn) - .await - .expect("failed get deleted_count") - .get::(0); - - assert_eq!(deleted_count, 5); - assert_eq!(get_queue_size(&queue_name, &conn).await, 0); -} - -#[tokio::test] -async fn test_pop() { - let conn = init_database().await; - let mut rng = rand::thread_rng(); - let test_num = rng.gen_range(0..100000); - - let queue_name = format!("test_pop_{test_num}"); - create_queue(&queue_name.to_string(), &conn).await; - - let none_popped = sqlx::query(&format!("SELECT * FROM {PGMQ_SCHEMA}.pop('{queue_name}')")) - .fetch_optional(&conn) - .await - .expect("failed to get pop result"); - assert!(none_popped.is_none()); - - let first_msg_id = send_sample_message(&queue_name, &conn).await; - send_sample_message(&queue_name, &conn).await; - send_sample_message(&queue_name, &conn).await; - - let popped_id = sqlx::query(&format!("SELECT * FROM {PGMQ_SCHEMA}.pop('{queue_name}')")) - .fetch_one(&conn) - .await - .expect("failed to get pop result") - .get::(0); - - assert_eq!(popped_id, first_msg_id); - assert_eq!(get_queue_size(&queue_name, &conn).await, 2); -} - -#[tokio::test] -async fn test_set_vt() { - let conn = init_database().await; - let mut rng = rand::thread_rng(); - let test_num = rng.gen_range(0..100000); - - let queue_name = format!("test_set_vt_{test_num}"); - create_queue(&queue_name.to_string(), &conn).await; - - // set a non-existing message must return no records - let none_set = sqlx::query(&format!( - "SELECT * FROM {PGMQ_SCHEMA}.set_vt('{queue_name}', 9999, 0)" - )) - .fetch_optional(&conn) - .await - .expect("failed to execute set command"); - assert!(none_set.is_none()); - - let first_msg_id = send_sample_message(&queue_name, &conn).await; - - // set message invisible for 100 seconds - let set_first_id = sqlx::query(&format!( - "SELECT * FROM {PGMQ_SCHEMA}.set_vt('{queue_name}', {first_msg_id}, 100)" - )) - .fetch_one(&conn) - .await - .expect("failed to execute set command"); - let set_first_id = set_first_id.get::(0); - assert_eq!(set_first_id, first_msg_id); - - // read message, it should not be visible - let query = &format!("SELECT * from {PGMQ_SCHEMA}.read('{queue_name}', 1, 1);"); - let none_message = fetch_one_message::(query, &conn) - .await - .expect("failed reading message"); - assert!(none_message.is_none()); - - // make it visible - let _set_first_id = sqlx::query(&format!( - "SELECT * FROM {PGMQ_SCHEMA}.set_vt('{queue_name}', {first_msg_id}, 0)" - )) - .fetch_one(&conn) - .await - .expect("failed to execute set command"); - - // set vt works if message is readable - let some_message = fetch_one_message::(query, &conn) - .await - .expect("failed reading message") - .expect("no messages returned"); - assert_eq!(some_message.msg_id, first_msg_id); -} - -#[tokio::test] -async fn test_partitioned_delete() { - let conn = init_database().await; - let mut rng = rand::thread_rng(); - let test_num = rng.gen_range(0..100000); - - let queue_name = format!("test_partitioned_{test_num}"); - let partition_interval = 2; - let retention_interval = 2; - - // We first will drop pg_partman and assert that create fails without the - // extension installed - let _ = sqlx::query("DROP EXTENSION IF EXISTS pg_partman") - .execute(&conn) - .await - .unwrap(); - - let create_result = sqlx::query(&format!( - "select * - from {PGMQ_SCHEMA}.create_partitioned( - '{queue_name}', - '{partition_interval}', - '{retention_interval}' - )" - )) - .execute(&conn) - .await; - - assert!(create_result.is_err()); - - // With the extension existing, the queue is created successfully - let _ = sqlx::query("CREATE EXTENSION pg_partman") - .execute(&conn) - .await - .unwrap(); - - let create_result = sqlx::query(&format!( - "select * - from {PGMQ_SCHEMA}.create_partitioned( - '{queue_name}', - '{partition_interval}', - '{retention_interval}' - )" - )) - .execute(&conn) - .await; - - assert!(create_result.is_ok()); - - // queue shows up in list queues - let list_queues_result = sqlx::query_as::<_, QueueMeta>(&format!( - "select queue_name from {PGMQ_SCHEMA}.list_queues();" - )) - .fetch_all(&conn) - .await; - - match list_queues_result { - Ok(qm) => { - let q = qm.iter().find(|m| m.queue_name == queue_name); - assert!(q.is_some()); - } - Err(err) => panic!("{}", err), - } - - // Sending 3 messages to the queue - let msg_id1 = send_sample_message(&queue_name, &conn).await; - let msg_id2 = send_sample_message(&queue_name, &conn).await; - let msg_id3 = send_sample_message(&queue_name, &conn).await; - - assert_eq!(get_queue_size(&queue_name, &conn).await, 3); - - // Deleting message 3 - let deleted_single = sqlx::query(&format!( - "SELECT * FROM {PGMQ_SCHEMA}.delete('{queue_name}', {msg_id3})" - )) - .fetch_one(&conn) - .await - .expect("failed to delete") - .get::(0); - - assert_eq!(deleted_single, true); - assert_eq!(get_queue_size(&queue_name, &conn).await, 2); - - // Deleting batch - let deleted_batch = sqlx::query(&format!( - "SELECT * FROM {PGMQ_SCHEMA}.archive('{queue_name}', ARRAY[{msg_id1}, {msg_id2}, {msg_id3}, -3])" - )) - .fetch_all(&conn) - .await - .expect("failed to archive"); - - assert_eq!(deleted_batch.len(), 2); - assert_eq!(deleted_batch[0].get::(0), 1); - assert_eq!(deleted_batch[1].get::(0), 2); -} - -#[tokio::test] -async fn test_transaction_create() { - // Queue creation is reverted if transaction is rolled back - let _ = init_database().await; - let queue_name = "transaction_test_queue"; - let conn1 = connect(&database_url()).await; - let mut tx1 = conn1.begin().await.unwrap(); - - sqlx::query(&format!("select from {PGMQ_SCHEMA}.create('{queue_name}')")) - .fetch_one(&mut *tx1) - .await - .unwrap(); - - tx1.rollback().await.unwrap(); - - let table_exists = sqlx::query(&format!( - "select from pg_tables where schemaname = 'pgmq' and tablename = 'q_{queue_name}'" - )) - .fetch_optional(&conn1) - .await - .unwrap(); - - assert!(table_exists.is_none()); -} - -#[tokio::test] -async fn test_transaction_send() { - // This aims to test that a message won't be visible for other transactions - // until the transaction that published it commits - let _ = init_database().await; - let queue_name = "transaction_send_test_queue"; - let conn1 = connect(&database_url()).await; - let conn2 = connect(&database_url()).await; - - create_queue(&queue_name.to_string(), &conn1).await; - - // Message can't be read for pending transaction - let mut tx = conn1.begin().await.unwrap(); - - sqlx::query(&format!( - "select from {PGMQ_SCHEMA}.send('{queue_name}', '1')" - )) - .fetch_one(&mut *tx) - .await - .unwrap(); - - let read_msg = sqlx::query(&format!( - "select from {PGMQ_SCHEMA}.read('{queue_name}', 0, 1)" - )) - .fetch_optional(&conn2) - .await - .unwrap(); - - assert!(read_msg.is_none()); - - // After commiting the transaction, the message can be read - tx.commit().await.unwrap(); - - let read_msg2 = sqlx::query(&format!( - "select from {PGMQ_SCHEMA}.read('{queue_name}', 0, 1)" - )) - .fetch_optional(&conn2) - .await - .unwrap(); - - assert!(read_msg2.is_some()); -} - -#[tokio::test] -async fn test_transaction_read() { - // A message read by one transaction can't be read by other concurrent transaction, - // even if VT expired, until the other transaction is committed or rolled back. - let _ = init_database().await; - let queue_name = "transaction_read_test_queue"; - let conn1 = connect(&database_url()).await; - let conn2 = connect(&database_url()).await; - - create_queue(&queue_name.to_string(), &conn1).await; - - sqlx::query(&format!( - "select from {PGMQ_SCHEMA}.send('{queue_name}', '1')" - )) - .fetch_one(&conn1) - .await - .unwrap(); - - let mut tx1 = conn1.begin().await.unwrap(); - let mut tx2 = conn2.begin().await.unwrap(); - - let read_msg1 = sqlx::query(&format!( - "select from {PGMQ_SCHEMA}.read('{queue_name}', 1, 1)" - )) - .fetch_optional(&mut *tx1) - .await - .unwrap(); - - assert!(read_msg1.is_some()); - - tokio::time::sleep(std::time::Duration::from_millis(2000)).await; - - let read_msg2 = sqlx::query(&format!( - "select from {PGMQ_SCHEMA}.read('{queue_name}', 1, 1)" - )) - .fetch_optional(&mut *tx2) - .await - .unwrap(); - - assert!(read_msg2.is_none()); - - tx1.rollback().await.unwrap(); - - let read_msg3 = sqlx::query(&format!( - "select from {PGMQ_SCHEMA}.read('{queue_name}', 1, 1)" - )) - .fetch_optional(&mut *tx2) - .await - .unwrap(); - - assert!(read_msg3.is_some()); -} - -#[tokio::test] -async fn test_detach_archive() { - let conn = init_database().await; - let queue_name = "detach_archive_queue"; - create_queue(&queue_name.to_string(), &conn).await; - - // Without detach, archive is dropped with the extension - let _ = sqlx::query(&format!("DROP EXTENSION pgmq CASCADE")) - .fetch_one(&conn) - .await; - - let table_exists = sqlx::query(&format!( - "select from pg_tables where schemaname = 'pgmq' and tablename = 'a_{queue_name}'" - )) - .fetch_optional(&conn) - .await - .unwrap(); - - assert!(table_exists.is_none()); - - // With detach, archive remains - let _ = sqlx::query(&format!("CREATE EXTENSION pgmq")) - .fetch_one(&conn) - .await; - - create_queue(&queue_name.to_string(), &conn).await; - - sqlx::query(&format!( - "select from {PGMQ_SCHEMA}.detach_archive('{queue_name}')" - )) - .fetch_one(&conn) - .await - .unwrap(); - - let _ = sqlx::query(&format!("DROP EXTENSION pgmq CASCADE")) - .fetch_one(&conn) - .await; - - let table_exists = sqlx::query(&format!( - "select from pg_tables where schemaname = 'pgmq' and tablename = 'a_{queue_name}'" - )) - .fetch_optional(&conn) - .await - .unwrap(); - - assert!(table_exists.is_some()); -} - -async fn create_queue(queue_name: &String, conn: &Pool) { - sqlx::query(&format!("select from {PGMQ_SCHEMA}.create('{queue_name}')")) - .fetch_one(conn) - .await - .unwrap(); -} - -async fn get_queue_size(queue_name: &String, conn: &Pool) -> i64 { - sqlx::query(&format!( - "SELECT count(*) FROM {PGMQ_SCHEMA}.{QUEUE_PREFIX}_{queue_name}" - )) - .fetch_one(conn) - .await - .expect("failed get queue size") - .get::(0) -} - -async fn get_archive_size(queue_name: &String, conn: &Pool) -> i64 { - sqlx::query(&format!( - "SELECT count(*) FROM {PGMQ_SCHEMA}.{ARCHIVE_PREFIX}_{queue_name}" - )) - .fetch_one(conn) - .await - .expect("failed get queue size") - .get::(0) -} - -async fn send_sample_message(queue_name: &String, conn: &Pool) -> i64 { - sqlx::query(&format!( - "SELECT * FROM {PGMQ_SCHEMA}.send('{queue_name}', '0')" - )) - .fetch_one(conn) - .await - .expect("failed to push message") - .get::(0) -} - -fn database_url() -> String { - match std::env::var("DATABASE_URL") { - Ok(val) => val, - Err(_) => "postgres://postgres:postgres@localhost:5432/pgmq_test".to_string(), - } -} - -fn database_name(url: &str) -> String { - let parsed = Url::parse(url).unwrap(); - parsed.path().trim_start_matches('/').to_string() -}