Figure out what to do with db:upgrade_from_previous_major_version
This job has been a constant distraction to get to a working Ruby 3 build: https://gitlab.com/gitlab-org/gitlab/-/jobs/2210973069
It tests that an upgrade from the last major version of GitLab e.g. 13.x
to 14.x
works. The main problem with this job is that it checks out an older version of GitLab, runs a bundle install
using the CI Ruby, then attempt the upgrade.
This will fail if an older version of GitLab had any dependency that is not Ruby 3 compliant, which is of course the case, e.g.:
google-protobuf-3.14.0-x86_64-linux requires ruby version >= 2.3, < 2.8.dev,
which is incompatible with the current version, ruby 3.0.3p157
We have previously worked around this by injecting a hand-crafted list of bundler updates into this job to make these go away, but this is not sustainable. I think the job is problematic in general in that it assumes past versions of GitLab to build correctly in the currently assumed CI environment.
To get to a green Ruby 3 build, we need to decide what to do with this job:
- Do we keep it, then it needs to be resilient in face of changing CI build environments
- Do we toss it, then what would replace it