Adjust search for patch version in upgrade path
What does this MR do and why?
Describe in detail what your merge request does and why.
- Updates search for latest patch to fix issue when
latest_patch(version)
for 16.1 - returned 16.10 instead of 16.1 - gitlab#451433 (comment 1827188002) - Updating spec to add the above mentioned edge case
QA failure in update-major jobs due to reconfig... (gitlab#451433 - closed)
Validation
[8] pry(#<Gitlab::QA::Support::GitlabVersionInfo>)> version
=> Gem::Version.new("16.1")
[9] pry(#<Gitlab::QA::Support::GitlabVersionInfo>)> versions.find { |ver| ver.to_s.match?(/^#{version}\./) }
=> Gem::Version.new("16.1.6")
without fix for adding a dot in regex:
[3] pry(#<Gitlab::QA::Support::GitlabVersionInfo>)> versions.find { |ver| ver.to_s.match?(/^#{version}/) }
=> Gem::Version.new("16.10.0")
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
- Check that upgrade path is correct now:
bundle exec gitlab-qa Test::Omnibus::UpdateFromPrevious registry.gitlab.com/gitlab-org/build/omnibus-gitlab-mirror/gitlab-ee:74bbc7b106b67e33ccef5a4fdd59f33411bf648c-ruby3.1 16.11.0-pre major -- --tag smoke
- Verify updated spec
bundle exec rspec --force-color spec/gitlab/qa/support/gitlab_upgrade_path_spec.rb
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.