Skip to content
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

[20.09] gitlab: 13.0.14 -> 13.6.0 #104587

Merged
merged 7 commits into from Nov 22, 2020
Merged

[20.09] gitlab: 13.0.14 -> 13.6.0 #104587

merged 7 commits into from Nov 22, 2020

Conversation

ghost
Copy link

@ghost ghost commented Nov 22, 2020

Motivation for this change

Backport of #99116

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

jslight90 and others added 7 commits November 22, 2020 12:22
13.4.3

(cherry-picked from commit c16a977)
(cherry-picked from commit 4555a26)
Changed ruby version to 2.7.x to match upstream.
Added a gem config for gitlab-pg_query as it tries to download a source
tarball during the build process.
Also removed a patch for gitaly that has become obsolete by upstream fix
[here](https://gitlab.com/gitlab-org/gitaly/-/commit/de04077c25cc23b001317d2efdf5a9ead0bc86b9).

(cherry-picked from commit 2429d5a)
@ghost ghost requested a review from alyssais as a code owner November 22, 2020 11:23
@ghost ghost requested a review from flokli November 22, 2020 11:24
@ghost ghost changed the title gitlab: 13.0.14 -> 13.6.0 [20.09] gitlab: 13.0.14 -> 13.6.0 Nov 22, 2020
@ofborg ofborg bot requested review from fpletz, globin, krav and talyz November 22, 2020 11:34
@flokli flokli merged commit 8e5e8f3 into NixOS:release-20.09 Nov 22, 2020
@ajs124
Copy link
Member

ajs124 commented Nov 23, 2020

Does this actually work?
I'm seeing this in my logs and git things don't actually seem to work:

gitaly[2024]: time="2020-11-23T17:50:05+01:00" level=fatal msg="unsupported Git version: \"2.28.0\""

@ghost
Copy link
Author

ghost commented Nov 23, 2020

I didn't do much testing other than running the NixOS test, so it's definitely possible. Sorry about that.
I would port git 2.29.2 as a seperate attribute and change GitLab things to use that. Does that idea sound good to you?

@srhb
Copy link
Contributor

srhb commented Nov 25, 2020

I guess the test doesn't cover gitaly properly then, which is quite unfortunate. A different git attribute may be necessary, yes, since I imagine that's a bit of a jump for a stable branch.

@kyren
Copy link
Contributor

kyren commented Nov 28, 2020

In addition to running into the gitaly issue requiring git >= 2.29, I also ran into another issue when upgrading nixos 20.09.

If your system.stateVersion is < 20.03, then your gitlab install may be using postgres_9_6 (even if, like me, you had never explicitly enabled postgresql or chosen any specific version). Gitlab 13.0.x works with postgres 9, but 13.6.x seems to require at least postgresql 11. Thus, after upgrading, gitlab 13.6 fails to run one of its version upgrade scripts and fails to start.

The only remedy is to upgrade postgres from 9 to >= 11 using the upgrade instructions here: https://nixos.org/manual/nixos/stable/index.html#module-services-postgres-upgrading and then manually set services.postgres.package to >= postgresql_11.

Ideally nothing like this would ever be required when upgrading within a stable channel, but if that's not possible, at least an assert that the postgresql version is >= 11 in the nixos module would have saved me from an unpleasant surprise.

@kyren
Copy link
Contributor

kyren commented Nov 28, 2020

Just also FYI for the gitaly issue for anybody who's not already familiar with nixpkgs overlays, adding this to your nixos configuration will fix gitlab until #104896 is merged:

  # HACK: gitaly in nixos-20.09 requires git 2.29, which isn't yet in 20.09.
  # Remove when https://github.com/NixOS/nixpkgs/pull/104896 is merged.
  nixpkgs.overlays = [
    (self: super: {
      git = super.git.overrideAttrs (old: rec {
        version = "2.29.2";
        src = self.fetchurl {
          url = "https://www.kernel.org/pub/software/scm/git/git-${version}.tar.xz";
          sha256 = "1h87yv117ypnc0yi86941089c14n91gixk8b6shj2y35prp47z7j";
        };
      });
    })
  ];

@ghost ghost mentioned this pull request Dec 4, 2020
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants