Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

postgresql: enable tests on darwin #358248

Merged
merged 1 commit into from
Nov 23, 2024

Conversation

wolfgangwalther
Copy link
Contributor

The tests were disabled in #62752. The problem is System Integrity Protection on macOS, which resets DYDL_LIBRARY_PATH and thus breaks the temporary installation of PostgreSQL. By running the checks after the installPhase, the libraries will already be available in the default locations.

Last time I tried this, it didn't work. It does this time, so let's make sure to enable the tests on darwin and never let them break again :)

Supersedes #318383

Make sure to test this with System Integrity Protection enabled. If it's disabled, the tests will work anyway. You can check with csrutil status.

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.

@wolfgangwalther
Copy link
Contributor Author

Seems like the installCheck phase gets stuck for me on darwin for v13 and v14. It works for v15 and up, though. Can anyone confirm that? Or is that a me-problem only?

@wolfgangwalther
Copy link
Contributor Author

Seems like the installCheck phase gets stuck for me on darwin for v13 and v14. It works for v15 and up, though. Can anyone confirm that? Or is that a me-problem only?

This happened very repeatable. I assume there is some error, but I can't see it.

I also found #357879, which could describe the same thing happen elsewhere.

Even if we can only enable tests for 15+ on darwin, that would already be a big +.

@ofborg ofborg bot added the 6.topic: darwin Running or building packages on Darwin label Nov 23, 2024
Copy link
Member

@Ma27 Ma27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fwiw postgresql 13 to 17 build fine for me on this branch with system integrity protection enabled on macos 15.1.1.

I have no way to test macos <15 though.
If this only happens with pg <15, I'd say let's skip the tests for darwin on <15, the issue will resolve itself in two years then ;-)

@wolfgangwalther
Copy link
Contributor Author

fwiw postgresql 13 to 17 build fine for me on this branch with system integrity protection enabled on macos 15.1.1.

I have no way to test macos <15 though.

Interesting. I'm testing on the community builder with macos 14.7.1.

I'll test it again to rule out the builder being overloaded or so as the reason.... yeah - still times out at some point.

I'll play a bit with different options for running the tests in parallel or not.

The tests were disabled in NixOS#62752.  The problem is System Integrity
Protection on macOS, which resets DYDL_LIBRARY_PATH and thus breaks the
temporary installation of PostgreSQL.  By running the checks *after* the
installPhase, the libraries will already be available in the default
locations.
@wolfgangwalther wolfgangwalther force-pushed the postgresql-darwin-check-staging branch from e57c22e to 9869d7f Compare November 23, 2024 18:58
@wolfgangwalther wolfgangwalther marked this pull request as ready for review November 23, 2024 18:59
@wolfgangwalther
Copy link
Contributor Author

I'll play a bit with different options for running the tests in parallel or not.

No success. I disabled the tests for v13 and v14 on darwin.

I did not build any JIT variants, yet, did you already, @Ma27?

@wolfgangwalther
Copy link
Contributor Author

I did not build any JIT variants, yet

Did so, those worked as well.

@Ma27
Copy link
Member

Ma27 commented Nov 23, 2024

Did the same in the meantime, also looking good.

@Ma27 Ma27 merged commit 5ec5cda into NixOS:staging Nov 23, 2024
18 of 19 checks passed
@wolfgangwalther wolfgangwalther deleted the postgresql-darwin-check-staging branch November 23, 2024 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants