From 09c392bc4131deec2bf7f442e928b302e42a0c37 Mon Sep 17 00:00:00 2001 From: Dimitri Fontaine Date: Sun, 28 Jun 2026 22:41:27 +0200 Subject: [PATCH 1/5] build: bump BUNDLEDIST from 2022-02-20 to 2026-01-01 The 2022-02-20 Quicklisp dist snapshot shipped named-readtables-20220220-git, which is incompatible with SBCL 2.6.5: the readtable iterator yielded entries where the char-macro function is 0 (SBCL 2.6.5 changed from NIL to 0 for absent macro characters), causing an assertion failure in check-reader-macro-conflict. The 2026-01-01 dist ships named-readtables-20260101-git which contains the upstream fix (melisgl/named-readtables commit 6eea566744, 2025-11-09): the grovel-base-chars iterator now checks (and reader-fn (not (eql reader-fn 0))) before yielding, correctly skipping absent entries under both old and new SBCL. This is also the most recent Quicklisp dist available, picking up ~4 years of other dependency updates. Closes #1703. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 7fcc4140..5059e8bc 100644 --- a/Makefile +++ b/Makefile @@ -24,7 +24,7 @@ QLDIR = $(BUILDDIR)/quicklisp MANIFEST = $(BUILDDIR)/manifest.ql LATEST = $(BUILDDIR)/pgloader-latest.tgz -BUNDLEDIST = 2022-02-20 +BUNDLEDIST = 2026-01-01 BUNDLENAME = pgloader-bundle-$(VERSION) BUNDLEDIR = $(BUILDDIR)/bundle/$(BUNDLENAME) BUNDLE = $(BUILDDIR)/$(BUNDLENAME).tgz From 94010541c6944f889a2cae7ab2758207a260d95d Mon Sep 17 00:00:00 2001 From: Dimitri Fontaine Date: Sun, 28 Jun 2026 23:05:52 +0200 Subject: [PATCH 2/5] debian: pass full path to help2man instead of relying on PATH MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit help2man was called with 'pgloader' relying on a PATH prefix to locate the binary at debian/pgloader/usr/bin/. This intermittently failed on push-event CI runs (exit 127 — binary not found via PATH lookup). Pass the full path directly so help2man always finds the binary regardless of how PATH is inherited by its subprocess. --- debian/rules | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/debian/rules b/debian/rules index 5c4d8934..37c6bda1 100755 --- a/debian/rules +++ b/debian/rules @@ -74,11 +74,10 @@ override_dh_strip override_dh_dwz: override_dh_installman-arch: mkdir -p debian/pgloader/usr/share/man/man1/ - PATH=$(CURDIR)/debian/pgloader/usr/bin:$(PATH) \ help2man --version-string $(DEB_VERSION_UPSTREAM) \ --no-info \ --name "extract, transform and load data into PostgreSQL" \ - pgloader > \ + $(CURDIR)/debian/pgloader/usr/bin/pgloader > \ debian/pgloader/usr/share/man/man1/pgloader.1 override_dh_gencontrol: From fb866e59a3f80752b47e506486d340bddcd39f28 Mon Sep 17 00:00:00 2001 From: Dimitri Fontaine Date: Sun, 28 Jun 2026 23:20:35 +0200 Subject: [PATCH 3/5] ci: add bundle regression workflow; fix smoke-test trigger MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit bundle-ci.yml: New workflow that builds pgloader from the Quicklisp bundle and runs the full regression suite. Triggers on pull_request and push to main when Makefile, bundle/, or src/ change — exactly the files that affect the v3 bundle output. Uses pg_virtualenv (from postgresql-common) to spin up a throwaway PostgreSQL cluster for the regress tests, mirroring what debian/tests/testsuite does for autopkgtest. bundle/Makefile: Add 'prepare' before 'regress' in the test target. The prepare step creates the pgloader/stocks/ip4r databases and extensions; without it the regress targets fail immediately because the databases don't exist. smoke-test.yml: The previous trigger (release: prereleased) never fired because softprops/action-gh-release updates an existing pre-release rather than re-creating it, and GitHub only fires the prereleased event on initial publication. Switch to workflow_run so the smoke test runs automatically after every successful integration-tests run on main (which is when the v4-dev JAR is actually updated). Add an if condition so the job is skipped on workflow failure, not just on success. --- .github/workflows/bundle-ci.yml | 51 ++++++++++++++++++++++++++++++++ .github/workflows/smoke-test.yml | 11 +++++-- bundle/Makefile | 2 +- 3 files changed, 61 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/bundle-ci.yml diff --git a/.github/workflows/bundle-ci.yml b/.github/workflows/bundle-ci.yml new file mode 100644 index 00000000..efbb9a5e --- /dev/null +++ b/.github/workflows/bundle-ci.yml @@ -0,0 +1,51 @@ +name: Quicklisp bundle build & regression test + +# Runs when anything that affects the v3 bundle changes: the bundle +# machinery itself, the Makefile (which holds BUNDLEDIST), or the Lisp +# source that gets compiled into the bundle binary. +on: + pull_request: + paths: + - 'Makefile' + - 'bundle/**' + - 'src/**' + - '.github/workflows/bundle-ci.yml' + push: + branches: [main] + paths: + - 'Makefile' + - 'bundle/**' + - 'src/**' + - '.github/workflows/bundle-ci.yml' + +jobs: + bundle: + name: Build and test from Quicklisp bundle + runs-on: ubuntu-22.04 + + steps: + - name: Checkout + uses: actions/checkout@v5 + + - name: Install postgresql-common + run: sudo apt-get install -y postgresql-common + + - name: Install pgapt repository + run: sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y + + - name: Install build dependencies + run: sudo apt-get build-dep -y . + + - name: Build Quicklisp bundle + # Downloads the pinned Quicklisp dist (BUNDLEDIST in Makefile), + # creates the self-contained bundle tarball, extracts it, compiles + # pgloader from the bundled sources, and smoke-tests with --version. + run: make bundle + + - name: Run regression suite against bundle binary + # pg_virtualenv spins up a throwaway PostgreSQL cluster so the + # regress tests can create/drop databases freely. + run: | + PGSUPERUSER=postgres \ + pg_virtualenv -i'-Atrust' \ + make test-bundle diff --git a/.github/workflows/smoke-test.yml b/.github/workflows/smoke-test.yml index dd80f6cd..ffe5e9b1 100644 --- a/.github/workflows/smoke-test.yml +++ b/.github/workflows/smoke-test.yml @@ -3,14 +3,21 @@ name: Smoke test — published JAR # Runs whenever the v4-dev pre-release is updated (i.e. after every green CI # push that publishes a new JAR), and can also be triggered manually. on: - release: - types: [prereleased] + # Fires automatically after the integration-tests workflow publishes a new + # JAR to the v4-dev pre-release on main. Using workflow_run rather than + # release: prereleased because updating assets on an existing pre-release + # does not re-fire the release event. + workflow_run: + workflows: ["pgloader v4 Integration Tests"] + types: [completed] + branches: [main] workflow_dispatch: jobs: smoke: name: Download JAR & migrate Chinook SQLite → PostgreSQL runs-on: ubuntu-latest + if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }} services: postgres: diff --git a/bundle/Makefile b/bundle/Makefile index 630c5549..11edbea3 100644 --- a/bundle/Makefile +++ b/bundle/Makefile @@ -62,7 +62,7 @@ $(PGLOADER): $(BUILDAPP) mv $@.tmp $@ test: $(PGLOADER) - $(MAKE) PGLOADER=$(realpath $(PGLOADER)) -C $(SRCDIR)/test regress + $(MAKE) PGLOADER=$(realpath $(PGLOADER)) -C $(SRCDIR)/test prepare regress save: sbcl --no-userinit --load ./save.lisp From 6137ded41b7f0f1696c47848457423ab0171d12d Mon Sep 17 00:00:00 2001 From: Dimitri Fontaine Date: Sun, 28 Jun 2026 23:26:52 +0200 Subject: [PATCH 4/5] build: use HEAD instead of main in git archive for bundle 'git archive ... main' fails in CI where the checkout is a detached HEAD with no local 'main' ref. HEAD always resolves correctly whether building on main, a PR branch, or a detached HEAD. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5059e8bc..ead2bfd4 100644 --- a/Makefile +++ b/Makefile @@ -199,7 +199,7 @@ $(BUNDLE): $(BUNDLEDIR) $(BUNDLEDIR)/version.sexp cp bundle/README.md $(BUNDLEDIR) cp bundle/save.lisp $(BUNDLEDIR) sed -e s/%VERSION%/$(VERSION)/ < bundle/Makefile > $(BUNDLEDIR)/Makefile - git archive --format=tar --prefix=pgloader-$(VERSION)/ main \ + git archive --format=tar --prefix=pgloader-$(VERSION)/ HEAD \ | tar -C $(BUNDLEDIR)/local-projects/ -xf - make QLDIR=$(BUNDLEDIR) clones tar -C build/bundle \ From aad02abb5f2436e2582bccb500c4e168d0b88329 Mon Sep 17 00:00:00 2001 From: Dimitri Fontaine Date: Sun, 28 Jun 2026 23:35:01 +0200 Subject: [PATCH 5/5] ci(bundle): pass current user as PGSUPERUSER to test-bundle pg_virtualenv creates the cluster with the current OS user as superuser, not 'postgres'. The test Makefile defaults to PGSUPERUSER=postgres, so createdb -U postgres fails immediately. Pass PGSUPERUSER=$(id -un) to match what debian/tests/testsuite does. --- .github/workflows/bundle-ci.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/bundle-ci.yml b/.github/workflows/bundle-ci.yml index efbb9a5e..87b64f04 100644 --- a/.github/workflows/bundle-ci.yml +++ b/.github/workflows/bundle-ci.yml @@ -43,9 +43,10 @@ jobs: run: make bundle - name: Run regression suite against bundle binary - # pg_virtualenv spins up a throwaway PostgreSQL cluster so the - # regress tests can create/drop databases freely. + # pg_virtualenv spins up a throwaway PostgreSQL cluster whose + # superuser is the current OS user (not 'postgres'). Pass that + # name via PGSUPERUSER so the test Makefile's createdb/psql calls + # use the right role — mirroring what debian/tests/testsuite does. run: | - PGSUPERUSER=postgres \ pg_virtualenv -i'-Atrust' \ - make test-bundle + env PGSUPERUSER="$(id -un)" make test-bundle