Add upgrade test coverage for patch releases upgrades
What does this MR do and why?
This merge request adds support for patch-level upgrades in Test::Omnibus::UpdateFromPrevious, allowing tests to verify upgrades from the latest stable patch version to a development version (example 17.7.4-> 17.7.4-pre). The changes include updating the upgrade path logic to handle patch upgrades, adding a method to check if a specific version exists in GitLab releases, and modifying the test suite to cover these new scenarios. Additionally, the code improves version handling by extracting the version number without postfixes like "pre" or "ee".
This new scenario adds coverage for patch upgrades. Related to https://gitlab.com/gitlab-com/gl-infra/software-delivery/framework/software-delivery-framework-issue-tracker/-/issues/27+ and upcoming internal releases. End goal is to add new scenario to run in backport MRs to ensure patch upgrade paths are covered - required for Dedicated and self-managed customers.
How to set up and validate locally
Running actual upgrades with UpdateFromPrevious can be omitted, as code is not changed in that space. We need to verify that upgrade paths are built correctly before actual upgrade. Steps for testing:
- Add a breakpoint in https://gitlab.com/gitlab-org/gitlab-qa/-/blob/436a7c07b69fa037e020012d4a47acd662437cec/lib/gitlab/qa/scenario/test/omnibus/update_from_previous.rb#L45
require 'pry'; binding.pry update(rspec_args) - Run commands for testing - 17.9.0-pre is not released yet, script will be no op:
bundle exec gitlab-qa Test::Omnibus::UpdateFromPrevious registry.gitlab.com/gitlab-org/build/omnibus-gitlab-mirror/gitlab-ee:9361d9b72da9aa366fde4f0f87a30fd747b5d57d-ruby3.2.5 17.9.0-pre patch -- --tag health_check ... [Feb 14 2025 16:41:02 CET (Gitlab QA)] INFO -- Skipping upgrade test as version 17.9.0 is not yet released - Run commands for testing - 17.8.2 -> pre-release 17.8.2 (built from backport MR branch):
bundle exec gitlab-qa Test::Omnibus::UpdateFromPrevious registry.gitlab.com/gitlab-org/build/omnibus-gitlab-mirror/gitlab-ee:9361d9b72da9aa366fde4f0f87a30fd747b5d57d-ruby3.2.5 17.8.2-ee patch -- --tag health_check ... [Feb 14 2025 16:41:54 CET (Gitlab QA)] INFO -- Fetching Docker tags page 13 from 'gitlab/gitlab-ee' registry [Feb 14 2025 16:41:55 CET (Gitlab QA)] INFO -- Performing gitlab update: gitlab/gitlab-ee:17.8.2-ee.0 => registry.gitlab.com/gitlab-org/build/omnibus-gitlab-mirror/gitlab-ee:9361d9b72da9aa366fde4f0f87a30fd747b5d57d-ruby3.2.5 (17.8.2-ee)
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
Commits include Changelog:trailer -
I have evaluated the MR acceptance checklist for this MR.