db-migrate-from-previous-major-version failing with Ruby 3
Problem
While working on the Ruby 3 migration, we noticed a job failure that is attempting to perform a GitLab upgrade from v12 (which relied on Ruby 2.x) to the current version (db-migrate-from-previous-major-version
) using the build image set by CI, which in this case is Ruby 3.
This fails, because the dependencies used in GitLab v12.x are not compatible with what is current and required by Ruby 3 as some of them (asana
in this case) pin Ruby to 2.x:
asana-0.9.3 requires ruby version ~> 2.0, which is incompatible with the current version, ruby 3.0.2p107
https://gitlab.com/gitlab-org/gitlab/-/jobs/1475650402
This isn't specific to Ruby 3 even, but rather that we are assuming that an older version of GitLab will build fine with the latest version of our build images, which is not correct. We can only assume that whatever image was current at the time of the version that is being upgraded from will lead to successful builds.