summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2020-09-27 23:27:51 +0200
committerMaximilian Bosch <maximilian@mbosch.me>2020-10-21 18:03:04 +0200
commit1308817e057eda7b27e33d24a79c050ed8faabb1 (patch)
treebdd3cbbe8e534c24fbad7ed1fef3ca27cc3ae8b7 /nixos/modules
parent1bb8808e1a2679df18ca1ce3822272901064bfb1 (diff)
downloadnixpkgs-1308817e057eda7b27e33d24a79c050ed8faabb1.tar
nixpkgs-1308817e057eda7b27e33d24a79c050ed8faabb1.tar.gz
nixpkgs-1308817e057eda7b27e33d24a79c050ed8faabb1.tar.bz2
nixpkgs-1308817e057eda7b27e33d24a79c050ed8faabb1.tar.lz
nixpkgs-1308817e057eda7b27e33d24a79c050ed8faabb1.tar.xz
nixpkgs-1308817e057eda7b27e33d24a79c050ed8faabb1.tar.zst
nixpkgs-1308817e057eda7b27e33d24a79c050ed8faabb1.zip
nixos/hydra: remove hydra-migration upgrade path
This should NOT be backported to 20.09!

When 21.03 is released, the DB changes are about a year old and
operators had two release cycles for the upgrade. At this point it
should be fair to remove the compat layer to reduce the complexity of
the module itself.
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/services/continuous-integration/hydra/default.nix33
1 files changed, 2 insertions, 31 deletions
diff --git a/nixos/modules/services/continuous-integration/hydra/default.nix b/nixos/modules/services/continuous-integration/hydra/default.nix
index 502a5898a5d..252ca17006d 100644
--- a/nixos/modules/services/continuous-integration/hydra/default.nix
+++ b/nixos/modules/services/continuous-integration/hydra/default.nix
@@ -37,8 +37,6 @@ let
 
   haveLocalDB = cfg.dbi == localDB;
 
-  inherit (config.system) stateVersion;
-
   hydra-package =
   let
     makeWrapperArgs = concatStringsSep " " (mapAttrsToList (key: value: "--set \"${key}\" \"${value}\"") hydraEnv);
@@ -96,7 +94,8 @@ in
 
       package = mkOption {
         type = types.package;
-        defaultText = "pkgs.hydra";
+        default = pkgs.hydra-unstable;
+        defaultText = "pkgs.hydra-unstable";
         description = "The Hydra package.";
       };
 
@@ -225,34 +224,6 @@ in
 
   config = mkIf cfg.enable {
 
-    warnings = optional (cfg.package.migration or false) ''
-      You're currently deploying an older version of Hydra which is needed to
-      make some required database changes[1]. As soon as this is done, it's recommended
-      to run `hydra-backfill-ids` and set `services.hydra.package` to `pkgs.hydra-unstable`
-      after that.
-
-      [1] https://github.com/NixOS/hydra/pull/711
-    '';
-
-    services.hydra.package = with pkgs;
-      mkDefault (
-        if pkgs ? hydra
-          then throw ''
-            The Hydra package doesn't exist anymore in `nixpkgs`! It probably exists
-            due to an overlay. To upgrade Hydra, you need to take two steps as some
-            bigger changes in the database schema were implemented recently[1]. You first
-            need to deploy `pkgs.hydra-migration`, run `hydra-backfill-ids` on the server
-            and then deploy `pkgs.hydra-unstable`.
-
-            If you want to use `pkgs.hydra` from your overlay, please set `services.hydra.package`
-            explicitly to `pkgs.hydra` and make sure you know what you're doing.
-
-            [1] https://github.com/NixOS/hydra/pull/711
-          ''
-        else if versionOlder stateVersion "20.03" then hydra-migration
-        else hydra-unstable
-      );
-
     users.groups.hydra = {
       gid = config.ids.gids.hydra;
     };