]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
ci(crdb): enable back crdb 25.1 tests
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Thu, 13 Feb 2025 17:44:32 +0000 (18:44 +0100)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Thu, 13 Feb 2025 18:31:29 +0000 (19:31 +0100)
Test were failing because of the setting 'autocommit_before_ddl' now
defaulting to 'on'. After exchanging with CRDB developer, this seems the
correct behaviour for their database moving on.

.github/workflows/tests.yml

index 3ebf8b6647b1e9bf92705640e845d5b467ef8135..9e702c46627dc7464a7e149a797a0a29e363fdc1 100644 (file)
@@ -380,8 +380,8 @@ jobs:
           #   https://us-docker.pkg.dev/v2/cockroach-cloud-images/cockroachdb/cockroach/tags/list \
           #   | jq .tags | egrep 'latest-[^-]+-build' | sort
           # Suspended as currently failing
-          - {impl: c, crdb: "latest-master-build", python: "3.13"}
-          - {impl: c, crdb: "latest-v25.1-build", python: "3.13", libpq: newest}
+          - {impl: c, crdb: "latest-master-build", python: "3.13"}
+          - {impl: c, crdb: "latest-v25.1-build", python: "3.13", libpq: newest}
           - {impl: c, crdb: "latest-v24.3-build", python: "3.9", libpq: newest}
           - {impl: python, crdb: "latest-v23.2-build", python: "3.12"}
     env:
@@ -389,6 +389,10 @@ jobs:
       DEPS: ./psycopg[test] ./psycopg_pool
       PSYCOPG_TEST_DSN: "host=127.0.0.1 port=26257 user=root dbname=defaultdb"
       CRDB_REPO: us-docker.pkg.dev/cockroach-cloud-images/cockroachdb/cockroach
+      # Since CRDB 25.1, 'on' should become the default, which will break
+      # the test suite assumption.
+      # https://www.cockroachlabs.com/docs/stable/online-schema-changes#enable-automatic-commit-before-running-schema-changes-inside-transactions
+      PGOPTIONS: "-c autocommit_before_ddl=off"
 
     steps:
       - uses: actions/checkout@v4