Update nixpkgs / simplify static build#3865
Conversation
0e6e965 to
84ac6ca
Compare
|
Hm, the docs-related jobs fail in CI, but pass locally for me. |
c52f2e4 to
377a3a7
Compare
Should be working now, had to fix some non-ascii single and double quotes. A bit sad, that our tooling doesn't support those, but ultimately it's good for consistency. |
@wolfgangwalther Since we already announced dropping support only until v11 (here), could we leave this for a next major?
I saw you were doing some great work on Nix to allow the above. Would we lose that simplification if we keep pg 12? Or would it be possible to reuse those Nix expressions and accommodate a build of pg12 on our own repo? |
|
TLDR: There is no need to hurry with this, however we should stick to our policies. And we really need to follow through with OpenAPI / Template Haskell, because that starts to block essentially every other update we are going to make.
Well, that's exactly what I am proposing, right? We are overdue with a new release for quite some time and whatever we release from the main branch now is the next major. But yes, we need to update the docs: PostgreSQL 12 is now deprecated as well, because it is EOL already - which is our rule according to the docs you cited.
That simplification is only about the static build, which is not affected by another import of an earlier version of nixpkgs, so no, we would not lose that. We don't need to update nixpkgs immediately, but:
We agreed on the policy of "remove everything that is EOL", because that's the same policy that nixpkgs uses and we don't want to import older versions of nixpkgs at the same time, due to closure size for CI. So we agreed on a policy regarding old versions - but whenever I remove them, you are not really happy about it :). Do we actually have agreement, then? :D In any case, it seems like we are currently blocked by Nix on MacOS. It can't bootstrap GHC - I'm not sure whether that will fix itself, once we update to GHC 9.6 / 9.8 or not. |
My bad. It's just a knee-jerk reaction since I know some local government installations that are on old pg versions and refuse to upgrade since PostgreSQL upgrades are hard. I always think that it's best to support older pg versions as long as we can. But I forget that we can document that for older pg versions you can also use an older PostgREST version.
Cool, I agree. Let's drop pg 12 then. |
Yes, it would be great to have some kind of "support matrix", where you can easily see which version of PostgREST supports which versions of PostgreSQL. Maybe in the README. |
This has been EOL since November and has been dropped from nixpkgs.
377a3a7 to
e4c518c
Compare
fa17489 to
647a661
Compare
Instead of rolling our own, we can use some tooling from nix / nixpkgs. We drop the "statically linked" check, because our goal is to compile mostly-static executables to darwin, too. However, those will never be fully static, because they always link to the platform's libc.
We have fixed the static build of PostgreSQL upstream, so we don't need our separate overlay anymore. One more step towards building a static executable on other platforms.
This way we benefit from NixOS' binary cache to deliver GHC for us and don't need to cache it ourselves. This will become relevant once we do that for more platforms.
This allows building aarch64-darwin derivations on a remote builder and then pushing them to cachix before triggering CI.
647a661 to
47d419c
Compare
There have been multiple minor released since then, I think - and we should really update by now.
This is fixed and works now, so no blockers anymore. |
|
For some reason, I still get this failing IO test frequently: |
|
After a few retries CI passes now for all IO tests. This still needs to be looked into if it keeps occurring, but will merge now. |
|
Sometime after this PR, I sometimes get the following error on It doesn't interfere with anything, but makes me question if something is wrong with my setup. |
|
Interesting, I see something similar: This does interfere with building the tests for me, though. After doing a |
|
For now, I'd probably just wait and see whether this remains to be the case after upgrading GHC eventually. |
Updating to a more recent nixpkgs version allows us to significantly simplify the static build expression - almost all required changes have been upstreamed by now.
Upstream nixpkgs has removed PostgreSQL 12, so according to our policy we drop support for it as well. Put that into the first commit. @steve-chavez would you like us to cut a new release first or are we OK to drop support for PG12 with the next release as well?