Skip to content
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

Handle invalid version with dots #5765

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

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.

This adds a test case for an invalid version with dots.
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.

2 participants