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

[ packageRules ] Versioning & compatibility #13034

Closed
xuoja-acc opened this issue Dec 9, 2021 · 5 comments · Fixed by #13043
Closed

[ packageRules ] Versioning & compatibility #13034

xuoja-acc opened this issue Dec 9, 2021 · 5 comments · Fixed by #13043
Assignees
Labels
status:requirements Full requirements are not yet known, so implementation should not be started type:bug Bug fix of existing functionality

Comments

@xuoja-acc
Copy link

xuoja-acc commented Dec 9, 2021

How are you running Renovate?

Self-hosted

If you're self-hosting Renovate, tell us what version of Renovate you run.

renovate/renovate:29.34.1

Please select which platform you are using if self-hosting.

gitlab.com

If you're self-hosting Renovate, tell us what version of the platform you run.

No response

Describe the bug

Using versioning with compatibility at the beginning of the regex seems to be buggy with the below configuration.

Minimal reproduction repository
What is expected : renovate should create an MR to upgrade from "debug-5.5.0" to "debug-5.6.0"
What is happening : renovate won't create the MR and won't detect the newer version

According to the documentation it should work : https://docs.renovatebot.com/modules/versioning/

Using a custom regex versioning scheme
{
  "packageRules": [
    {
      "matchPackageNames": ["foo/bar"],
      "versioning": "regex:^(?<compatibility>.*)-v?(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)?$"
    }
  ]
}

Relevant debug logs

Logs
DEBUG: packageFiles with updates (repository=ajoux.accor/renovate)
       "config": {
         "regex": [
           {
             "packageFile": ".gitlab-ci.yml",
             "deps": [
               {
                 "depName": "https://gitlab.com/ajoux.accor/renovate.git",
                 "currentValue": "debug-5.5.0",
                 "datasource": "git-tags",
                 "replaceString": "  CHART_SOURCES_VERSION: \"debug-5.5.0\"\n",
                 "depIndex": 0,
                 "updates": [],
                 "warnings": [],
                 "versioning": "regex:^((?<compatibility>.*)-)?(?<major>\\d+)\\.(?<minor>\\d+)\\.(?<patch>\\d+)?$",
                 "sourceUrl": "https://gitlab.com/ajoux.accor/renovate"
               }
             ],
             "matchStrings": [
               "\\s\\sCHART_SOURCES_URL: \"(?<depName>.*?)\"\n",
               "\\s\\sCHART_SOURCES_VERSION: \"(?<currentValue>.*?)\"\n"
             ],
             "matchStringsStrategy": "combination",
             "datasourceTemplate": "git-tags"
           }
         ]
       }

Have you created a minimal reproduction repository?

I have linked to a minimal reproduction repository in the bug description

@xuoja-acc xuoja-acc added priority-5-triage status:requirements Full requirements are not yet known, so implementation should not be started type:bug Bug fix of existing functionality labels Dec 9, 2021
@rarkins
Copy link
Collaborator

rarkins commented Dec 9, 2021

Please put the reproduction on github.com so that we can fork it

@rarkins rarkins added the auto:reproduction A minimal reproduction is necessary to proceed label Dec 9, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2021

Hi there,

Help us by making a minimal reproduction repository.

Before we can start work on your issue we first need to know exactly what's causing the current behavior. A minimal reproduction helps us with this.

To get started, please read our guide on creating a minimal reproduction to understand what is needed.

We may close the issue if you (or someone else) have not provided a minimal reproduction within two weeks. If you need more time, or are stuck, please ask for help or more time in a comment.

Good luck,

The Renovate team

@xuoja-acc
Copy link
Author

Hi @rarkins , i just updated the link of files in the issue to match the github fork.
The github fork project can be found here : https://github.com/ajoux-accor/renovate/

@HonkingGoose HonkingGoose added reproduction:provided and removed auto:reproduction A minimal reproduction is necessary to proceed labels Dec 9, 2021
rarkins added a commit that referenced this issue Dec 10, 2021
@rarkins
Copy link
Collaborator

rarkins commented Dec 10, 2021

It turns out that the git-tags datasource was applying semver.isVersion() filtering before passing the results back to the application. This meant that the develop- versions were being filtered out early/unnecessarily before your custom regex versioning could be applied. Once #13043 is merged, your config should work as-is. Thanks for taking the time for the reproduction

@rarkins rarkins self-assigned this Dec 10, 2021
viceice added a commit that referenced this issue Dec 10, 2021
Closes #13034

Co-authored-by: Michael Kriese <michael.kriese@visualon.de>
@renovate-release
Copy link
Collaborator

🎉 This issue has been resolved in version 30.1.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status:requirements Full requirements are not yet known, so implementation should not be started type:bug Bug fix of existing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants