postgresqlTestHook: shutdown on failure#389938
Conversation
130a3f6 to
96263a2
Compare
f984365 to
beff5a9
Compare
|
beff5a9 to
a375e25
Compare
There was a problem hiding this comment.
I'm sympathetic to the cause, and I will support this workaround, but ultimately we should fix these kinds of problems with more granular builds, where tests run in separate derivations, reusing previous builds.
For the current solution, I have these requests:
- rename
postgresqlForTestingtopostgresqlForNixpkgsInternalTesting- out-of-tree users should use the normal postgres (otherwise, we make them test with a version that's not the default version they may use in production)
- avoid input propagation so that users can pick the right postgresql version. Hiding this dependency creates extra complexity and problems:
- unclear which postgres is used
- need to learn about the hook before someone can change the postgres version
- (possibly?) conflict between the propagated postgres and the directly provided postgres
|
Given that this only triggered ~180 rebuilds, it won't be enough on its own to reduce the number of rebuilds for PostgreSQL to allow direct updates to master, yet. Putting this on draft, until:
|
|
In #404572, we merged the last set of minor updates for PostgreSQL straight into master. Thus, for now, we don't need this anymore. |
|
Ah, not true: There is more in here than just the |
a375e25 to
805bec8
Compare
Thanks, deadnix.
Previously, the user of postgresqlTestHook would have needed to set failureHook accordingly. However, this was not a clean solution, because postgresqlStop would also run for configure or build failures, before the server was even started. This gave odd errors from a failed shutdown in the log. Now postgresqlStop is only called when it makes sense - and whenever postgresqlTestHook is used.
805bec8 to
065fefd
Compare
This improves postgresqlTestHook in two aspects:One is, that postgresql doesn't need to be added manually to everynativeCheckInputs list anymore.
The other is, that all those tests now run with a specially pinnedPostgreSQL version, which can be updated independently via staging.
This allows us to ship updates to PostgreSQL faster by going to masterdirectly. In the normal case, the latest version and the test version
evaluate to the exact same derivation, so no duplicate builds. Only
while a minor update for the test version is going through staging, the
two versions differ temporarily.
Change of plans: Only some small improvements to
postgresqlTestHookleft.Things done
Hopefully the number of rebuilds is low enough for master 🤔
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usageAdd a 👍 reaction to pull requests you find important.