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

nixos/conduwuit: init #353651

Merged
merged 1 commit into from
Dec 15, 2024
Merged

nixos/conduwuit: init #353651

merged 1 commit into from
Dec 15, 2024

Conversation

niklaskorz
Copy link
Contributor

@niklaskorz niklaskorz commented Nov 4, 2024

As conduwuit deviates more and more from its conduit origins, it makes sense to give conduwuit its own module.
A custom module has been wished by upstream maintainers (@girlbossceo) as well as fellow nixpkgs maintainers (@nyabinary).

This allows us to cover breaking changes such as:

  • conduwuit does not support sqlite as database backend (unlike conduit)
  • conduwuit supports listening to unix sockets (unlike conduit)

Also includes the conduwuit-specific(?) fix from #353634.

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/)
  • 24.11 Release Notes (or backporting 23.11 and 24.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 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` labels Nov 4, 2024
@niklaskorz niklaskorz force-pushed the nixos-module-conduwuit branch from d6ec162 to 01d2f08 Compare November 4, 2024 14:24
@h7x4 h7x4 added 8.has: module (new) This PR adds a module in `nixos/` 8.has: tests This PR has tests labels Nov 4, 2024
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10 labels Nov 5, 2024
@nyabinary
Copy link
Contributor

girlbossceo/conduwuit@08365bf

The option database_backend has been removed.

@niklaskorz niklaskorz force-pushed the nixos-module-conduwuit branch 2 times, most recently from 39284e2 to 658a62f Compare November 17, 2024 11:13
@nyabinary
Copy link
Contributor

Maybe a release note should be added as well? Other than that it looks good to undraft?

@niklaskorz niklaskorz force-pushed the nixos-module-conduwuit branch 4 times, most recently from 9c78297 to 5660296 Compare November 17, 2024 18:59
@niklaskorz
Copy link
Contributor Author

niklaskorz commented Nov 17, 2024

Maybe a release note should be added as well? Other than that it looks good to undraft?

I'm still trying to get the nixosTests to pass, currently getting:

conduwuit # [   14.639198] nginx[842]: 2024/11/17 19:18:45 [error] 842#842: *2 connect() failed (111: Connection refused) while connecting to upstream, client: 2001:db8:1::1, server: conduwuit, request: "POST /_matrix/client/v3/register HTTP/1.1", upstream: "http://[::1]:6167/_matrix/client/v3/register", host: "conduwuit"
client # Error validating response: 'user_id' is a required property

Edit: The "connection refused" simply came from the tests running before conduwuit was listening. Still getting this error though:

client # Error validating response: 'flows' is a required property
client # Error validating response: 'user_id' is a required property
client # Traceback (most recent call last):
client #   File "/run/current-system/sw/bin/do_test", line 51, in <module>
client #     asyncio.get_event_loop().run_until_complete(main())
client #   File "/nix/store/px2nj16i5gc3d4mnw5l1nclfdxhry61p-python3-3.12.7/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete
client #     return future.result()
client #            ^^^^^^^^^^^^^^^
client #   File "/run/current-system/sw/bin/do_test", line 22, in main
client #     response = await client.room_create(federate=False)
client #                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
client #   File "/nix/store/gaqh8hck8134gf95ikccqbx4zmp313p9-python3-3.12.7-env/lib/python3.12/site-packages/nio/client/base_client.py", line 115, in wrapper
client #     self._assert_logged_in()
client #   File "/nix/store/gaqh8hck8134gf95ikccqbx4zmp313p9-python3-3.12.7-env/lib/python3.12/site-packages/nio/client/base_client.py", line 357, in _assert_logged_in
client #     raise LocalProtocolError("Not logged in.")
client # nio.exceptions.LocalProtocolError: Not logged in.

@niklaskorz niklaskorz force-pushed the nixos-module-conduwuit branch 3 times, most recently from 8a1fbd5 to 2b01471 Compare November 17, 2024 20:20
@github-actions github-actions bot added 8.has: documentation This PR adds or changes documentation 8.has: changelog labels Nov 17, 2024
@niklaskorz niklaskorz force-pushed the nixos-module-conduwuit branch 2 times, most recently from 74ac045 to 5eac3e9 Compare November 17, 2024 21:21
@niklaskorz
Copy link
Contributor Author

Tests are passing now 🎊

@niklaskorz niklaskorz marked this pull request as ready for review November 17, 2024 21:23
@niklaskorz niklaskorz force-pushed the nixos-module-conduwuit branch from 03e0111 to 887e1fe Compare December 5, 2024 16:03
pkgs/by-name/co/conduwuit/package.nix Outdated Show resolved Hide resolved
nixos/modules/services/matrix/conduwuit.nix Outdated Show resolved Hide resolved
nixos/modules/services/matrix/conduwuit.nix Outdated Show resolved Hide resolved
@niklaskorz niklaskorz force-pushed the nixos-module-conduwuit branch from 887e1fe to fef2e5d Compare December 5, 2024 16:46
@wegank wegank removed the 12.approvals: 2 This PR was reviewed and approved by two reputable people label Dec 5, 2024
@niklaskorz niklaskorz force-pushed the nixos-module-conduwuit branch from fef2e5d to ee4ff8c Compare December 7, 2024 11:08
Copy link
Member

@cafkafk cafkafk left a comment

Choose a reason for hiding this comment

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

Great work, thanks for the effort :3

@wegank wegank added the 12.approvals: 2 This PR was reviewed and approved by two reputable people label Dec 8, 2024
@niklaskorz niklaskorz force-pushed the nixos-module-conduwuit branch 5 times, most recently from dfa6fa9 to 4f2084c Compare December 9, 2024 10:13
@niklaskorz
Copy link
Contributor Author

niklaskorz commented Dec 9, 2024

Done addressing all feedback, fixing the tests right now, then we're good to go.

Edit: Tests are ready as well.

@niklaskorz niklaskorz force-pushed the nixos-module-conduwuit branch from 4f2084c to d4bee27 Compare December 9, 2024 12:25
@wegank wegank removed the 12.approvals: 2 This PR was reviewed and approved by two reputable people label Dec 9, 2024
@niklaskorz niklaskorz force-pushed the nixos-module-conduwuit branch from d4bee27 to f6c47f0 Compare December 13, 2024 18:02
@niklaskorz
Copy link
Contributor Author

Resolved merge conflicts in release notes

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/prs-already-reviewed/2617/2147

nixos/modules/services/matrix/conduwuit.nix Outdated Show resolved Hide resolved
nixos/modules/services/matrix/conduwuit.nix Show resolved Hide resolved
nixos/modules/services/matrix/conduwuit.nix Outdated Show resolved Hide resolved
nixos/modules/services/matrix/conduwuit.nix Outdated Show resolved Hide resolved
nixos/tests/matrix/conduwuit.nix Outdated Show resolved Hide resolved
pkgs/by-name/co/conduwuit/package.nix Outdated Show resolved Hide resolved
@niklaskorz niklaskorz force-pushed the nixos-module-conduwuit branch 3 times, most recently from 3c65ad3 to 48f0651 Compare December 14, 2024 10:02
@niklaskorz niklaskorz requested a review from getchoo December 14, 2024 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: changelog 8.has: documentation This PR adds or changes documentation 8.has: module (new) This PR adds a module in `nixos/` 8.has: module (update) This PR changes an existing module in `nixos/` 8.has: tests This PR has tests 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 1-10
Projects
None yet
Development

Successfully merging this pull request may close these issues.