summary refs log tree commit diff
diff options
context:
space:
mode:
authorYaya <github@uwu.is>2023-09-05 10:28:40 +0200
committerYureka <yuka@yuka.dev>2023-09-05 13:46:44 +0200
commit1a226276032e2ec4d93ee19d9089d461fad652ea (patch)
treef8fe0cda8fe4e437ad65cee760cbec4e464f21e1
parent69dd555be1df048d423fc89d9d42482bed7cc118 (diff)
downloadnixpkgs-1a226276032e2ec4d93ee19d9089d461fad652ea.tar
nixpkgs-1a226276032e2ec4d93ee19d9089d461fad652ea.tar.gz
nixpkgs-1a226276032e2ec4d93ee19d9089d461fad652ea.tar.bz2
nixpkgs-1a226276032e2ec4d93ee19d9089d461fad652ea.tar.lz
nixpkgs-1a226276032e2ec4d93ee19d9089d461fad652ea.tar.xz
nixpkgs-1a226276032e2ec4d93ee19d9089d461fad652ea.tar.zst
nixpkgs-1a226276032e2ec4d93ee19d9089d461fad652ea.zip
nixos/gitlab: Add a warning message
GitLab instances created or updated between versions [15.11.0, 15.11.2]
have an incorrect database schema. [1] This will become a problem once
upgrading GitLab to >=16.2.0.

A workaround can be found in the GitLab docs: [2]

[1]: https://gitlab.com/gitlab-org/gitlab/-/issues/408835
[2]: https://docs.gitlab.com/ee/update/versions/gitlab_16_changes.html#undefined-column-error-upgrading-to-162-or-later
-rw-r--r--nixos/modules/services/misc/gitlab.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/nixos/modules/services/misc/gitlab.nix b/nixos/modules/services/misc/gitlab.nix
index 76c8000a4ea..b399ccc38f5 100644
--- a/nixos/modules/services/misc/gitlab.nix
+++ b/nixos/modules/services/misc/gitlab.nix
@@ -1088,6 +1088,11 @@ in {
         ''Support for container registries other than gitlab-container-registry has ended since GitLab 16.0.0 and is scheduled for removal in a future release.
           Please back up your data and migrate to the gitlab-container-registry package.''
       )
+      (mkIf
+        (versionAtLeast (getVersion cfg.packages.gitlab) "16.2.0" && versionOlder (getVersion cfg.packages.gitlab) "16.5.0")
+        ''GitLab instances created or updated between versions [15.11.0, 15.11.2] have an incorrect database schema.
+        Check the upstream documentation for a workaround: https://docs.gitlab.com/ee/update/versions/gitlab_16_changes.html#undefined-column-error-upgrading-to-162-or-later''
+      )
     ];
 
     assertions = [