Open Collective
Open Collective
Loading
gitlab 16.6.5: with logrotate configuration
Published on January 21, 2024 by Pirate Praveen

We have released gitlab 16.6.5 update via https://fasttrack.debian.net This brings a long requested feature of integrating logrotate configuration file. Since we allow the username to be selected during installation via debconf prompt, including the username in the configuration file was slightly more involved than usual. This requires us to use debconf and ucf during installation to generate a configuration file. ucf is required to preserve changes by users to configuration files during package updates. See this commit to see how ucf logic works.

Thanks to debian's outreachy student mrwinz, we found out an earlier code refactor results in installation failure when we try to access /etc/gitlab/gitlab-debian.conf file before it was created in postinst script. Sine this includes values we gather during installation (like the host architecture), we cannot ship a default file. Refactoring gem install code resulted in further regressions and this was reported by Vivek KJ.

While fixing the missing gitlab_data_dir variable, we also noticed some incompatible gem dependency situation that needs manual resolution.

Bundler could not find compatible versions for gem "google-cloud-env":
  In Gemfile:
    fog-google (~> 1.19) was resolved to 1.19.0, which depends on
      google-cloud-env (~> 1.2)

    cloud_profiler_agent (~> 0.0.0) was resolved to 0.0.1.pre, which depends on
      google-cloud-profiler-v2 (~> 0.3) was resolved to 0.9.1, which depends on
        gapic-common (>= 0.21.1, < 2.a) was resolved to 0.21.1, which depends on
          googleauth (~> 1.9) was resolved to 1.9.1, which depends on
            google-cloud-env (~> 2.1)

This was resolved by locking google-cloud-profiler-v2 to 0.7.0 and gapic-common to 0.20.0. Ideally we'd like bundler to handle this instead of we doing it manually, but we need some changes to bundle install --prefer-local option to bundler before we can use it.

Overall this update needed 10 revisions to gitlab and 7 revisions to gitaly. I underestimated the refactoring of gem install code to a separate function which makes me understand why developers don't like to touch a code that is working.