Open m1g0r opened 10 months ago
Seems like regexes doesn’t find a prefix or a suffix. It sees the whole string as a version:
irb(main):046:0> version = "3.3-apache-202211030712"
=> "3.3-apache-202211030712"
irb(main):047:0> e.match(VERSION_WITH_PFX)
=> #<MatchData "3.3-apache-202211030712" prefix:nil version:"3.3-apache-202211030712">
irb(main):048:0> e.match(VERSION_WITH_SFX)
=> #<MatchData "3.3-apache-202211030712" version:"3.3-apache-202211030712" suffix:nil>
irb(main):049:0> e.match(VERSION_WITH_PFX_AND_SFX)
=> #<MatchData "3.3-apache-202211030712" prefix:nil version:"3.3-apache-202211030712" suffix:nil>
irb(main):050:0> :"<version>#{version.match(WORDS_WITH_BUILD).to_s.gsub(/-[0-9]+/, '-<build_num>')}"
=> :"<version>-apache-<build_num>"
Is there an existing issue for this?
Package ecosystem
Docker
Package manager version
No response
Language version
No response
Manifest location and content before the Dependabot update
No response
dependabot.yml content
Updated dependency
No response
What you expected to see, versus what you actually saw
Current Dockerfile is:
dependabot created PR to Bumps owasp/modsecurity-crs from 3.3-apache-202209221209 to 3-nginx-alpine-202312070812. <= this is a test repo
I expect that
owasp/modsecurity-crs:3.3-apache-202209221209
will change toowasp/modsecurity-crs:3.3-apache-202312070812
but not toowasp/modsecurity-crs:3-nginx-alpine-202312070812
according to this comment in the code it should work correctly, or I miss something :thinking_face: ?
Native package manager behavior
No response
Images of the diff or a link to the PR, issue, or logs
Dependabot Update logs:
In Dependabot logs I see that new correct tag owasp/modsecurity-crs:3.3-apache-202312070812 was found but I don’t understand why it is not chosen
Smallest manifest that reproduces the issue
Current Dockerfile is: