Autoupdater finds incorrect new package versions
Summary
When autoupdater finds new versions it compers it to pattern to return the highest one. It uses method re.search
for that purpose.
Steps to reproduce
Run autoupdater check or update on project with package dependencies wich has avaiable version in pattern (PATTERN-rc1 for example)
Expected behavior
Autoupdater should return just version with no rc and other additions.
Actual behavior
Sometimes it returns hiher version but in rc state.
Relevant logs and/or screenshots
2019-06-19 08:38:31,708 [INFO]: Checking if project "ansible-roles/gitlab" needs update
2019-06-19 08:38:32,028 [INFO]: Package "ansible-roles/docker" is up-to-date: 3.2.0
2019-06-19 08:38:32,786 [INFO]: Update available for package "docker/gitlab": 11.10.4 -> 11.11.3
2019-06-19 08:38:33,475 [INFO]: Update available for package "docker/gitlab-runner": alpine-v11.10.1 -> alpine-v12.0.0-rc1
2019-06-19 08:38:34,090 [INFO]: Package "docker/postgresql" is up-to-date: 10-1
2019-06-19 08:38:34,673 [INFO]: Update available for package "docker/redis": 5.0.4 -> 5.0.5
2019-06-19 08:38:35,238 [INFO]: Package "docker/registry" is up-to-date: 2.7.1
2019-06-19 08:38:36,015 [INFO]: Package "docker/pipeline-worker" is up-to-date: 19.04
2019-06-19 08:38:36,275 [INFO]: Update available for package "python2/ansible": 2.7.10 -> 2.8.1
2019-06-19 08:38:36,275 [INFO]: End checking project "ansible-roles/gitlab"
Possible fixes
Use re.fullmatch
instead of re.search
in this lambda function