-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
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/mattermost: Clean up, modernize, support MySQL, support mmctl, and support plugin building #208181
Conversation
6b42e85
to
0228f5c
Compare
See the tests for an example of how to add and enable a plugin. |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/prs-ready-for-review/3032/1619 |
To have a truly immutable plugins install & enable functionality we will need to patch Mattermost's source code. But for now this is fine I guess... |
Haven't forgotten about this. I think the strategy will be to use the current Mattermost module as a reference to re-add the missing features. |
0228f5c
to
fac011b
Compare
fac011b
to
52fc542
Compare
Progress update on this: I've locally rebased against #373113, and made the tests take both ESR and latest into account. Once that PR closes, I'll rebase again and undraft, because it's looking like it's time. I'm happy to report that all {unit,integration} tests on {patched,unpatched} webapps for {mutable,mostly mutable,immutable,environment file} configs work for Mattermost {ESR,latest} on {MySQL,Postgres}, including plugin builds and migrations from ESR to latest. Have to test on ARM64 a little more, but it's pretty promising. The tests that we have to disable are fairly consistently the ones that use SMTP and Elasticsearch, plus a handful that seem plain broken. |
2edb4aa
to
7ad1bce
Compare
Going to make sure there are no more ARM issues and then undraft. |
Add the following passthrus: - mattermost.withTests (builds with tests but takes a while) - mattermost.withoutTests (builds without tests but is shorter) - mattermost.tests.mattermostWithTests - mattermost.buildPlugin (builds a plugin from source) Enable the mmctl build, and its tests, if selected.
We don't have to run the full Mattermost/mmctl e2e test suite for this derivation.
Based on NixOS#198040. Prioritizes backwards compatibility, including database and plugin compatibility, while adding more sensible defaults like database peer authentication. Expand the scope of tests to include plugins (including building from source) and testing that a piece of media uploads and downloads to make sure the storage directory doesn't vanish.
7ad1bce
to
be25f66
Compare
We're good. All builds and tests, including NixOS tests, pass on both my Zen 4 EPYC box and the aarch64 community builder. |
🎊 2 years in the making, thanks for the merge! |
@numinit thanks a lot for sticking with it. Contributors like you are the true heroes of NixOS. |
Very kind words @fricklerhandwerk - thank YOU for your tireless work on all things Nix too! This merging meant that we were able to squash a Critical severity security bug in 48 hours thanks to the update script and a clean backport: #376561 |
Description of changes
nixpkgs deserves a Mattermost module that uses more up to date best practices!
Taking ideas from #198040, we should support more complex database configurations and better defaults like peer authentication.
Enable mmctl and the Mattermost test suite (~17000 tests).
Support building Mattermost plugins in the sandbox (couple examples are in the test suite).
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)nixos/doc/manual/md-to-db.sh
to update generated release notes