Update semver_dialects gem
What does this MR do and why?
semver_dialects 3.4.3 does not handle invalid apk versions correctly. This is fixed in 3.4.3.
Related issue: SemverDialects hangs when parsing invalid versi... (#500316) • Igor Frenkel • 17.6
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Verification steps
Verifying this using Timeout
shows that parsing the invalid version in master
branch hangs for the amount of time specified in Timeout.timeout(<time>)
. And the exception thrown is by Timeout
with execution expired
rather than an exception from SemverDialects
.
Verifying the same in ifrenkel/500316-bump-semver-dialects-gem
the Timeout call returns right away with a SemverDialects::InvalidVersion
error as expected.
Master branch
git checkout master
bundle exec rails console
[1] pry(main)> Timeout::timeout(5) { SemverDialects.parse_version('apk', '- ALPINE-13661') }
Timeout::Error: execution expired
from ~/.local/share/mise/installs/ruby/3.2.4/lib/ruby/gems/3.2.0/gems/semver_dialects-3.4.3/lib/semver_dialects/apk.rb:228:in `scan'
This MR
git checkout ifrenkel/500316-bump-semver-dialects-gem
bundle exec rails console
[1] pry(main)> Timeout::timeout(5) { SemverDialects.parse_version('apk', '- ALPINE-13661') }
SemverDialects::InvalidVersionError: invalid version '- ALPINE-13661'
from ~/.local/share/mise/installs/ruby/3.2.4/lib/ruby/gems/3.2.0/gems/semver_dialects-3.4.4/lib/semver_dialects/apk.rb:240:in `parse_revision'