Skip to content

Handle invalid version with dots #5765

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 9, 2025
Merged

Handle invalid version with dots #5765

merged 1 commit into from
Apr 9, 2025

Conversation

jeffwidman
Copy link
Member

This adds a test case for an invalid version with dots.

We expect the test to pass, but today it fails with:

eval error: Malformed version number string 1.8.0-failed.release.attempt
  /usr/local/lib/ruby/site_ruby/2.7.0/rubygems/version.rb:214:in `initialize'
  /home/dependabot/dependabot-core/python/lib/dependabot/python/version.rb:43:in `initialize'
  /usr/local/lib/ruby/site_ruby/2.7.0/rubygems/version.rb:203:in `new'
  /usr/local/lib/ruby/site_ruby/2.7.0/rubygems/version.rb:203:in `new'
  (rdbg)//home/dependabot/dependabot-core/common/lib/dependabot/metadata_finders/base/commits_finder.rb:1:in `tag_matches_version?'

The relevant version pattern regex.

@sshishov
Copy link

sshishov commented Nov 2, 2022

I am having the same issue with yarl package

@jeffwidman
Copy link
Member Author

Anyone else in the community is welcome to take a crack at this... this PR is essentially a "issue" that was opened as a PR to exercise CI.

It'd be a great first issue for anyone who wants to learn more about regex's.

@jeffwidman jeffwidman force-pushed the jeffwidman-patch-1 branch 4 times, most recently from 92ce03c to 8b0c7d2 Compare April 5, 2025 22:19
@jeffwidman
Copy link
Member Author

jeffwidman commented Apr 5, 2025

This now passes. Many thanks to @amazimbe who resolved it as part of the work for:

🎉

@jeffwidman jeffwidman marked this pull request as ready for review April 5, 2025 22:20
@jeffwidman jeffwidman requested a review from a team as a code owner April 5, 2025 22:20
@jeffwidman jeffwidman requested a review from amazimbe April 5, 2025 22:22
This adds a test case for an invalid version with dots.
@jeffwidman jeffwidman force-pushed the jeffwidman-patch-1 branch from 8b0c7d2 to d36b2e0 Compare April 9, 2025 17:26
@jeffwidman jeffwidman enabled auto-merge (squash) April 9, 2025 17:37
@jeffwidman jeffwidman merged commit eed43fb into main Apr 9, 2025
97 of 98 checks passed
@jeffwidman jeffwidman deleted the jeffwidman-patch-1 branch April 9, 2025 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants