From 1a1c53c271b385705d7d98fbff37f820565a7f32 Mon Sep 17 00:00:00 2001 From: Yureka Date: Fri, 12 Jan 2024 02:03:23 +0100 Subject: [PATCH] Revert "nixos/gitlab: Add CI database connection for >=15.9" (#280395) --- nixos/modules/services/misc/gitlab.nix | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/nixos/modules/services/misc/gitlab.nix b/nixos/modules/services/misc/gitlab.nix index ca6910b795d8..6756d59cf367 100644 --- a/nixos/modules/services/misc/gitlab.nix +++ b/nixos/modules/services/misc/gitlab.nix @@ -27,13 +27,7 @@ let encoding = "utf8"; pool = cfg.databasePool; } // cfg.extraDatabaseConfig; - in if lib.versionAtLeast (lib.getVersion cfg.packages.gitlab) "15.9" then { - production.main = val; - # Starting with GitLab 15.9, single connections were deprecated and will be - # removed in GitLab 17.0. The CI connection however requires database_tasks set - # to false. - production.ci = val // { database_tasks = false; }; - } else if lib.versionAtLeast (lib.getVersion cfg.packages.gitlab) "15.0" then { + in if lib.versionAtLeast (lib.getVersion cfg.packages.gitlab) "15.0" then { production.main = val; } else { production = val; @@ -1354,7 +1348,7 @@ in { fi jq <${pkgs.writeText "database.yml" (builtins.toJSON databaseConfig)} \ - '.${if lib.versionAtLeast (lib.getVersion cfg.packages.gitlab) "15.0" then "production.main" else "production"}.password = $ENV.db_password ${if lib.versionAtLeast (lib.getVersion cfg.packages.gitlab) "15.9" then "| .production.ci.password = $ENV.db_password | .production.main as $main | del(.production.main) | .production |= {main: $main} + ." else ""}' \ + '.${if lib.versionAtLeast (lib.getVersion cfg.packages.gitlab) "15.0" then "production.main" else "production"}.password = $ENV.db_password' \ >'${cfg.statePath}/config/database.yml' '' else ''