mattermost: update to 10.11 ESR and 11.x latest (#456362)
This commit is contained in:
@@ -377,6 +377,8 @@ and [release notes for v18](https://goteleport.com/docs/changelog/#1800-070325).
|
||||
|
||||
- `services.gitea` supports sending notifications with sendmail again. To do this, activate the parameter `services.gitea.mailerUseSendmail` and configure SMTP server.
|
||||
|
||||
- `services.mattermost` has been updated to use the 10.11 ESR instead of 10.5. While this shouldn't break anyone, we also now package Mattermost 11 as mattermostLatest. Note that Mattermost 11 drops support for MySQL. The Mattermost module will assertion fail if you try to use MySQL with Mattermost 11; support for using MySQL with Mattermost will fully be removed in NixOS 26.
|
||||
|
||||
- `simplesamlphp` has been removed since the package was severely outdated, unmaintained in nixpkgs and having known vulnerabilities.
|
||||
|
||||
- `networking.wireless.networks.<name>` now has an option to specify SSID, hence allowing duplicated SSID setup. The BSSID option is added along side with this.
|
||||
|
||||
@@ -966,6 +966,13 @@ in
|
||||
or hostname, and services.mattermost.port to specify the port separately.
|
||||
'';
|
||||
}
|
||||
{
|
||||
# Can't use MySQL on version 11.
|
||||
assertion = versionAtLeast cfg.package.version "11" -> cfg.database.driver == "postgres";
|
||||
message = ''
|
||||
Only Postgres is supported as the database driver in Mattermost 11 and later.
|
||||
'';
|
||||
}
|
||||
];
|
||||
})
|
||||
(mkIf cfg.matterircd.enable {
|
||||
|
||||
@@ -69,27 +69,11 @@ import ../make-test-python.nix (
|
||||
)
|
||||
extraConfig
|
||||
];
|
||||
|
||||
makeMysql =
|
||||
mattermostConfig: extraConfig:
|
||||
lib.mkMerge [
|
||||
mattermostConfig
|
||||
(
|
||||
{ pkgs, config, ... }:
|
||||
{
|
||||
services.mattermost.database = {
|
||||
driver = lib.mkForce "mysql";
|
||||
peerAuth = lib.mkForce true;
|
||||
};
|
||||
}
|
||||
)
|
||||
extraConfig
|
||||
];
|
||||
in
|
||||
{
|
||||
name = "mattermost";
|
||||
|
||||
nodes = rec {
|
||||
nodes = {
|
||||
postgresMutable = makeMattermost {
|
||||
mutableConfig = true;
|
||||
preferNixConfig = false;
|
||||
@@ -174,25 +158,6 @@ import ../make-test-python.nix (
|
||||
MM_SUPPORTSETTINGS_ABOUTLINK=https://nixos.org
|
||||
'';
|
||||
} { };
|
||||
|
||||
mysqlMutable = makeMysql postgresMutable { };
|
||||
mysqlMostlyMutable = makeMysql postgresMostlyMutable { };
|
||||
mysqlImmutable = makeMysql postgresImmutable {
|
||||
# Let's try to use this on MySQL.
|
||||
services.mattermost.database = {
|
||||
peerAuth = lib.mkForce true;
|
||||
user = lib.mkForce "mmuser";
|
||||
name = lib.mkForce "mmuser";
|
||||
};
|
||||
};
|
||||
mysqlEnvironmentFile = makeMysql postgresEnvironmentFile {
|
||||
services.mattermost.environmentFile = lib.mkForce (
|
||||
pkgs.writeText "mattermost-env" ''
|
||||
MM_SQLSETTINGS_DATASOURCE=mattermost@unix(/run/mysqld/mysqld.sock)/mattermost?charset=utf8mb4,utf8&writeTimeout=30s
|
||||
MM_SUPPORTSETTINGS_ABOUTLINK=https://nixos.org
|
||||
''
|
||||
);
|
||||
};
|
||||
};
|
||||
|
||||
testScript =
|
||||
@@ -567,22 +532,6 @@ import ../make-test-python.nix (
|
||||
shutdown_queue.task_done()
|
||||
threading.Thread(target=shutdown_worker, daemon=True).start()
|
||||
|
||||
${pkgs.lib.optionalString pkgs.stdenv.hostPlatform.isx86_64 ''
|
||||
# Only run the MySQL tests on x86_64 so we don't have to debug MySQL ARM issues.
|
||||
run_mattermost_tests(
|
||||
shutdown_queue,
|
||||
"${nodes.mysqlMutable.system.build.toplevel}",
|
||||
mysqlMutable,
|
||||
"${nodes.mysqlMostlyMutable.system.build.toplevel}",
|
||||
"${nodes.mysqlMostlyMutable.services.mattermost.pluginsBundle}",
|
||||
mysqlMostlyMutable,
|
||||
"${nodes.mysqlImmutable.system.build.toplevel}",
|
||||
mysqlImmutable,
|
||||
"${nodes.mysqlEnvironmentFile.system.build.toplevel}",
|
||||
mysqlEnvironmentFile
|
||||
)
|
||||
''}
|
||||
|
||||
run_mattermost_tests(
|
||||
shutdown_queue,
|
||||
"${nodes.postgresMutable.system.build.toplevel}",
|
||||
|
||||
@@ -18,11 +18,11 @@
|
||||
# the version regex here as well.
|
||||
#
|
||||
# Ensure you also check ../mattermostLatest/package.nix.
|
||||
regex = "^v(10\\.5\\.[0-9]+)$";
|
||||
version = "10.5.12";
|
||||
srcHash = "sha256-VaW+rA0UeIZhGU9BlYZgyznAOtLN+JI7UPbMRPCwTww=";
|
||||
vendorHash = "sha256-vxUxSkj1EwgMtPpCGJSA9jCDBeLrWhecdwq4KBThhj4=";
|
||||
npmDepsHash = "sha256-tIeuDUZbqgqooDm5TRfViiTT5OIyN0BPwvJdI+wf7p0=";
|
||||
regex = "^v(10\\.11\\.[0-9]+)$";
|
||||
version = "10.11.4";
|
||||
srcHash = "sha256-gSVoO0paAwvxEeZkcCP81oxMcSu/H8n3Tr+2OEXuFyM=";
|
||||
vendorHash = "sha256-DS4OC3eQffD/8yLE01gnTJXwV77G7rWk4kqA/rTCtJw=";
|
||||
npmDepsHash = "sha256-p9dq31qw0EZDQIl2ysKE38JgDyLA6XvSv+VtHuRh+8A=";
|
||||
lockfileOverlay = ''
|
||||
unlock(.; "@floating-ui/react"; "channels/node_modules/@floating-ui/react")
|
||||
'';
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
{
|
||||
lib,
|
||||
stdenv,
|
||||
mattermost,
|
||||
gotestsum,
|
||||
which,
|
||||
@@ -12,16 +11,10 @@
|
||||
runtimeShell,
|
||||
}:
|
||||
|
||||
let
|
||||
inherit (lib.lists) optionals;
|
||||
inherit (lib.strings) versionAtLeast;
|
||||
is10 = version: versionAtLeast version "10.0";
|
||||
in
|
||||
mattermost.overrideAttrs (
|
||||
final: prev: {
|
||||
doCheck = true;
|
||||
checkTargets = [
|
||||
"test-server"
|
||||
"test-mmctl"
|
||||
];
|
||||
nativeCheckInputs = [
|
||||
@@ -52,113 +45,17 @@ mattermost.overrideAttrs (
|
||||
# X TestFoo
|
||||
# X TestFoo/TestBar
|
||||
# -> TestFoo/TestBar/baz_test
|
||||
disabledTests = [
|
||||
disabledTests = lib.lists.uniqueStrings [
|
||||
# All these plugin tests for mmctl reach out to the marketplace, which is impossible in the sandbox
|
||||
"TestMmctlE2ESuite/TestPluginDeleteCmd/Delete_Plugin/SystemAdminClient"
|
||||
"TestMmctlE2ESuite/TestPluginDeleteCmd/Delete_Plugin/LocalClient"
|
||||
"TestMmctlE2ESuite/TestPluginDeleteCmd/Delete_a_Plugin_without_permissions"
|
||||
"TestMmctlE2ESuite/TestPluginDeleteCmd/Delete_Unknown_Plugin/SystemAdminClient"
|
||||
"TestMmctlE2ESuite/TestPluginDeleteCmd/Delete_Unknown_Plugin/LocalClient"
|
||||
"TestMmctlE2ESuite/TestPluginInstallURLCmd/install_new_plugins/SystemAdminClient"
|
||||
"TestMmctlE2ESuite/TestPluginInstallURLCmd/install_new_plugins/LocalClient"
|
||||
"TestMmctlE2ESuite/TestPluginInstallURLCmd/install_an_already_installed_plugin_without_force/SystemAdminClient"
|
||||
"TestMmctlE2ESuite/TestPluginInstallURLCmd/install_an_already_installed_plugin_without_force/LocalClient"
|
||||
"TestMmctlE2ESuite/TestPluginInstallURLCmd/install_an_already_installed_plugin_with_force/SystemAdminClient"
|
||||
"TestMmctlE2ESuite/TestPluginInstallURLCmd/install_an_already_installed_plugin_with_force/LocalClient"
|
||||
"TestMmctlE2ESuite/TestPluginMarketplaceInstallCmd/install_a_plugin/SystemAdminClient"
|
||||
"TestMmctlE2ESuite/TestPluginMarketplaceInstallCmd/install_a_plugin/LocalClient"
|
||||
"TestMmctlE2ESuite/TestPluginMarketplaceListCmd/List_Marketplace_Plugins_for_Admin_User/SystemAdminClient"
|
||||
"TestMmctlE2ESuite/TestPluginMarketplaceListCmd/List_Marketplace_Plugins_for_Admin_User/LocalClient"
|
||||
|
||||
# Seems to just be broken.
|
||||
"TestMmctlE2ESuite/TestPreferenceUpdateCmd"
|
||||
|
||||
# Has a hardcoded "google.com" test which also verifies that the address isn't loopback,
|
||||
# so we also can't just substituteInPlace to one that will resolve
|
||||
"TestDialContextFilter"
|
||||
|
||||
# No interfaces but loopback in the sandbox, so returns empty
|
||||
"TestGetServerIPAddress"
|
||||
|
||||
# S3 bucket tests (needs Minio)
|
||||
"TestInsecureMakeBucket"
|
||||
"TestMakeBucket"
|
||||
"TestListDirectory"
|
||||
"TestTimeout"
|
||||
"TestStartServerNoS3Bucket"
|
||||
"TestS3TestConnection"
|
||||
"TestS3FileBackendTestSuite"
|
||||
"TestS3FileBackendTestSuiteWithEncryption"
|
||||
"TestWriteFileVideoMimeTypes"
|
||||
|
||||
# Mail tests (needs a SMTP server)
|
||||
"TestSendMailUsingConfig"
|
||||
"TestSendMailUsingConfigAdvanced"
|
||||
"TestSendMailWithEmbeddedFilesUsingConfig"
|
||||
"TestSendCloudWelcomeEmail"
|
||||
"TestMailConnectionAdvanced"
|
||||
"TestMailConnectionFromConfig"
|
||||
"TestEmailTest"
|
||||
"TestBasicAPIPlugins/test_send_mail_plugin"
|
||||
|
||||
# Seems to be unreliable
|
||||
"TestPluginAPIUpdateUserPreferences"
|
||||
"TestPluginAPIGetUserPreferences"
|
||||
|
||||
# These invite tests try to send a welcome email and we don't have a SMTP server up.
|
||||
"TestInviteUsersToTeam"
|
||||
"TestInviteGuestsToTeam"
|
||||
"TestSendInviteEmails"
|
||||
"TestDeliver"
|
||||
|
||||
# https://github.com/mattermost/mattermost/issues/29184
|
||||
"TestUpAndDownMigrations/Should_be_reversible_for_mysql"
|
||||
]
|
||||
++ optionals (is10 final.version) [
|
||||
## mattermostLatest test ignores
|
||||
|
||||
# These bot related tests appear to be broken.
|
||||
"TestCreateBot"
|
||||
"TestPatchBot"
|
||||
"TestGetBot"
|
||||
"TestEnableBot"
|
||||
"TestDisableBot"
|
||||
"TestAssignBot"
|
||||
"TestConvertBotToUser"
|
||||
|
||||
# Need Elasticsearch or Opensearch
|
||||
"TestBlevePurgeIndexes"
|
||||
"TestOpensearchAggregation"
|
||||
"TestOpensearchInterfaceTestSuite"
|
||||
"TestOpenSearchIndexerJobIsEnabled"
|
||||
"TestOpenSearchIndexerPending"
|
||||
"TestBulkProcessor"
|
||||
"TestElasticsearchAggregation"
|
||||
"TestElasticsearchInterfaceTestSuite"
|
||||
"TestElasticSearchIndexerJobIsEnabled"
|
||||
"TestElasticSearchIndexerPending"
|
||||
|
||||
# Broken in the sandbox.
|
||||
"TestVersion"
|
||||
"TestRunServerNoSystemd"
|
||||
|
||||
# Appear to be broken.
|
||||
"TestSessionStore/MySQL"
|
||||
"TestAccessControlPolicyStore/MySQL"
|
||||
"TestAttributesStore/MySQL"
|
||||
"TestBasicAPIPlugins"
|
||||
|
||||
"TestRunExportJobE2EByType"
|
||||
"TestUpdateTeam"
|
||||
"TestSyncSyncableRoles"
|
||||
]
|
||||
++ optionals (!stdenv.hostPlatform.isx86_64) [
|
||||
# aarch64: invalid operating system or processor architecture
|
||||
"TestCanIUpgradeToE0"
|
||||
|
||||
# aarch64: thumbnail previews are nondeterministic
|
||||
"TestUploadFiles/multipart_Happy_image_thumbnail"
|
||||
"TestUploadFiles/simple_Happy_image_thumbnail"
|
||||
"TestMmctlE2ESuite/TestPluginInstallURLCmd"
|
||||
"TestMmctlE2ESuite/TestPluginMarketplaceInstallCmd"
|
||||
"TestMmctlE2ESuite/TestPluginMarketplaceInstallCmd"
|
||||
"TestMmctlE2ESuite/TestPluginMarketplaceListCmd"
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
@@ -378,7 +275,7 @@ mattermost.overrideAttrs (
|
||||
|
||||
# Ensure we parallelize the tests, and skip the correct ones.
|
||||
# Spaces are important here due to how the Makefile works.
|
||||
export GOFLAGS=" -parallel=$NIX_BUILD_CORES -skip='$(echo "$disabledTests" | tr ' ' '|')' "
|
||||
export GOFLAGS=" -p=$NIX_BUILD_CORES -parallel=$NIX_BUILD_CORES -skip='$(echo "$disabledTests" | tr ' ' '|')' "
|
||||
|
||||
# ce n'est pas un conteneur
|
||||
MMCTL_TESTFLAGS="$GOFLAGS" MM_NO_DOCKER=true make $checkTargets
|
||||
|
||||
@@ -10,11 +10,11 @@ mattermost.override {
|
||||
# See https://docs.mattermost.com/about/mattermost-server-releases.html
|
||||
# and make sure the version regex is up to date here.
|
||||
# Ensure you also check ../mattermost/package.nix for ESR releases.
|
||||
regex = "^v(10\\.[0-9]+\\.[0-9]+)$";
|
||||
version = "10.12.1";
|
||||
srcHash = "sha256-PL55NKypsLA+H19cS99iIsMI3IBb6vLvAbAVLZyg+sE=";
|
||||
vendorHash = "sha256-DS4OC3eQffD/8yLE01gnTJXwV77G7rWk4kqA/rTCtJw=";
|
||||
npmDepsHash = "sha256-O9iX6hnwkEHK0kkHqWD6RYXqoSEW6zs+utiYHnt54JY=";
|
||||
regex = "^v(11\\.[0-9]+\\.[0-9]+)$";
|
||||
version = "11.0.2";
|
||||
srcHash = "sha256-2w9v/ktmqSwzcylq8ayRDZD5BsHo9tBL+9X3GRNlvd0=";
|
||||
vendorHash = "sha256-JkQvj92q5FZjQWB5gGCsAz7EpHO+IckBSFoFEFi3v0A=";
|
||||
npmDepsHash = "sha256-YU6FDsMX0QIGFatUDRos/AkgwljIBeI5w/TJt/lglw0=";
|
||||
lockfileOverlay = ''
|
||||
unlock(.; "@floating-ui/react"; "channels/node_modules/@floating-ui/react")
|
||||
'';
|
||||
|
||||
Reference in New Issue
Block a user