Skip to content

haskellPackages.migrant-{core,sqlite-simple,hdbc,postgresql-simple}: unbreak#407430

Merged
wolfgangwalther merged 1 commit intoNixOS:haskell-updatesfrom
ozkutuk:unbreak-migrant-pkgs
May 18, 2025
Merged

haskellPackages.migrant-{core,sqlite-simple,hdbc,postgresql-simple}: unbreak#407430
wolfgangwalther merged 1 commit intoNixOS:haskell-updatesfrom
ozkutuk:unbreak-migrant-pkgs

Conversation

@ozkutuk
Copy link
Contributor

@ozkutuk ozkutuk commented May 15, 2025

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added the 6.topic: haskell General-purpose, statically typed, purely functional programming language label May 15, 2025
@ozkutuk ozkutuk force-pushed the unbreak-migrant-pkgs branch from 9a8979e to cb9aa08 Compare May 15, 2025 19:04
@github-actions github-actions bot added 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels May 15, 2025
@sternenseemann
Copy link
Member

I'm getting a test failure with migrant-postgresql-simple:

Running phase: checkPhase
initializing postgresql
The files belonging to this database system will be owned by user "nixbld".
This user must also own the server process.

The database cluster will be initialized with locale "en_US.UTF-8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".

Data page checksums are disabled.

creating directory /build/postgresql ... ok
creating subdirectories ... ok
selecting dynamic shared memory implementation ... posix
selecting default "max_connections" ... 100
selecting default "shared_buffers" ... 128MB
selecting default time zone ... UTC
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok

initdb: warning: enabling "trust" authentication for local connections
initdb: hint: You can change this by editing pg_hba.conf or using the option -A, or --auth-local and --auth-host, the next time you run initdb.

Success. You can now start the database server using:

    pg_ctl -D /build/postgresql -l logfile start

starting postgresql
waiting for server to start....2025-05-15 23:20:03.799 UTC [462] LOG:  starting PostgreSQL 17.5 on x86_64-pc-linux-gnu, compiled by clang version 19.1.7, 64-bit
2025-05-15 23:20:03.849 UTC [462] LOG:  listening on Unix socket "/build/run/postgresql/.s.PGSQL.5432"
2025-05-15 23:20:03.985 UTC [465] LOG:  database system was shut down at 2025-05-15 23:19:55 UTC
2025-05-15 23:20:04.044 UTC [462] LOG:  database system is ready to accept connections
 done
server started
setting up postgresql
CREATE ROLE
CREATE DATABASE
Running 1 test suites...
Test suite migrant-postgresql-simple-test: RUNNING...
2025-05-15 23:20:04.634 UTC [480] ERROR:  permission denied to create database
2025-05-15 23:20:04.634 UTC [480] STATEMENT:  CREATE DATABASE _migrant_test_3600528;
createdb: error: database creation failed: ERROR:  permission denied to create database
Migrant
  PostgreSQL
    Setup/init: 2025-05-15 23:20:04.639 UTC [482] ERROR:  permission denied to create database
2025-05-15 23:20:04.639 UTC [482] STATEMENT:  CREATE DATABASE _migrant_test_1488103;
createdb: error: database creation failed: ERROR:  permission denied to create database
2025-05-15 23:20:04.643 UTC [484] ERROR:  permission denied to create database
2025-05-15 23:20:04.643 UTC [484] STATEMENT:  CREATE DATABASE _migrant_test_5773761;
createdb: error: database creation failed: ERROR:  permission denied to create database
FAIL
      Exception: callProcess: createdb "_migrant_test_3600528" (exit 1): failed
      Use -p '/Setup\/init/' to rerun this test only.
    Up:         FAIL
      Exception: callProcess: createdb "_migrant_test_1488103" (exit 1): failed
      Use -p '/Up/' to rerun this test only.
    Down:       FAIL
      Exception: callProcess: createdb "_migrant_test_5773761" (exit 1): failed
      Use -p '/Down/' to rerun this test only.

3 out of 3 tests failed (0.01s)
Test suite migrant-postgresql-simple-test: FAIL
Test suite logged to:
dist/test/migrant-postgresql-simple-0.1.0.3-migrant-postgresql-simple-test.log
0 of 1 test suites (0 of 1 test cases) passed.
stopping postgresql
waiting for server to shut down....2025-05-15 23:20:04.649 UTC [462] LOG:  received fast shutdown request
2025-05-15 23:20:04.690 UTC [462] LOG:  aborting any active transactions
2025-05-15 23:20:04.692 UTC [462] LOG:  background worker "logical replication launcher" (PID 468) exited with exit code 1
2025-05-15 23:20:04.692 UTC [463] LOG:  shutting down
2025-05-15 23:20:04.741 UTC [463] LOG:  checkpoint starting: shutdown immediate
.......................2025-05-15 23:20:27.920 UTC [463] LOG:  checkpoint complete: wrote 964 buffers (5.9%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.136 s, sync=22.786 s, total=23.229 s; sync files=308, longest=4.104 s, average=0.074 s; distance=4467 kB, estimate=4467 kB; lsn=0/19AA5E8, redo lsn=0/19AA5E8
2025-05-15 23:20:27.925 UTC [462] LOG:  database system is shut down
 done
server stopped

@ozkutuk
Copy link
Contributor Author

ozkutuk commented May 16, 2025

I'm getting a test failure with migrant-postgresql-simple

@sternenseemann hmm, right. Looks like postgresqlTestHook provides a single database which it expects the tests to use, whereas migrant-postgresql-simple itself tries to create a new database (with a random name) for each test case in the suite. I don't think it is feasible to patch this on the Nix side here, and for the sake of unbreaking the package I propose dontChecking it. Sounds good?

@sternenseemann
Copy link
Member

Looks like postgresqlTestHook provides a single database which it expects the tests to use, whereas migrant-postgresql-simple itself tries to create a new database (with a random name) for each test case in the suite. I don't think it is feasible to patch this on the Nix side here, and for the sake of unbreaking the package I propose dontChecking it. Sounds good?

cc @wolfgangwalther

@ozkutuk ozkutuk force-pushed the unbreak-migrant-pkgs branch from cb9aa08 to ca0a681 Compare May 16, 2025 20:52
@wolfgangwalther
Copy link
Contributor

nixpkgs-review result

Generated using nixpkgs-review.

Command: nixpkgs-review pr 407430


x86_64-linux

✅ 8 packages built:
  • haskellPackages.migrant-core
  • haskellPackages.migrant-core.doc
  • haskellPackages.migrant-hdbc
  • haskellPackages.migrant-hdbc.doc
  • haskellPackages.migrant-postgresql-simple
  • haskellPackages.migrant-postgresql-simple.doc
  • haskellPackages.migrant-sqlite-simple
  • haskellPackages.migrant-sqlite-simple.doc

aarch64-linux

✅ 8 packages built:
  • haskellPackages.migrant-core
  • haskellPackages.migrant-core.doc
  • haskellPackages.migrant-hdbc
  • haskellPackages.migrant-hdbc.doc
  • haskellPackages.migrant-postgresql-simple
  • haskellPackages.migrant-postgresql-simple.doc
  • haskellPackages.migrant-sqlite-simple
  • haskellPackages.migrant-sqlite-simple.doc

aarch64-darwin

⏩ 2 packages marked as broken and skipped:
  • haskellPackages.migrant-postgresql-simple
  • haskellPackages.migrant-postgresql-simple.doc
✅ 6 packages built:
  • haskellPackages.migrant-core
  • haskellPackages.migrant-core.doc
  • haskellPackages.migrant-hdbc
  • haskellPackages.migrant-hdbc.doc
  • haskellPackages.migrant-sqlite-simple
  • haskellPackages.migrant-sqlite-simple.doc

@wolfgangwalther wolfgangwalther merged commit 642aa2e into NixOS:haskell-updates May 18, 2025
20 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: haskell General-purpose, statically typed, purely functional programming language 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants