-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Idea: version compatibility #5990
Comments
We should also consider a prefix |
Got any common cases? |
Instead of calling it "compatibility" perhaps we could adopt the term from Guava and call it "flavor". Then the new config option could be called |
Some docker images have the version on then end |
The ideal way this would work is e.g. any versioning scheme can easily be used with Docker images, along with suffix/flavor. So with Docker as the example, This generic datasource logic would need to incorporate it before performing filtering: renovate/lib/datasource/index.ts Lines 109 to 113 in da0181e
|
This is closely related to extractVersion which can be quickly extended to also extract compatibility in addition to version. |
@viceice I'm wondering if we should even reuse |
I'm not sure if this works. 🤔 |
Another example from Maven: https://mvnrepository.com/artifact/com.microsoft.sqlserver/mssql-jdbc |
I don't think we can reuse
I doubt there'd be many cases where both are used together, but I don't think we can reuse the same field. So to name the first concept - the topic of this issue - we could call it If using |
Another use-case to consider: minor updates within the compatibility info (i.e. proposes updates for a Practical example: Node.js images (see current tags here). It would be great to get proposed updates from any of You could use |
I'm not sure there's an elegant way to automatically achieve this with the current plans |
#5990 (comment)
I just found one that currently isn't supported by renovate - at least the debug logs say that:
Have a look at the Edit: - and another one:
|
Yep, those would both be candidates for this feature. I'm not sure we could detect them automatically, but at least they could be fixed with config. We could potentially have some intelligence where if a tag contains one |
Could you help me, I find anything in the docs? |
The feature doesn't exist yet, but you can try using regex versioning, which is in the docs |
Do you mean this? https://docs.renovatebot.com/configuration-options/#versioningtemplate The isn't an example or the names of the regex groups, that should be used. |
No, regex versioning |
Ohh, sorry - I didn't find it because it was named regular expression - my bad. |
I got regex versioning working somewhat, but it relied on hacking the |
I've done it like this: https://git.m4rc3l.de/marcel/stack/src/branch/main/renovate.json#L3-L22 |
Hi, any plans to incorporate this feature soon? I'm using a Node.js docker image (e.g. Or is there a good workaround to only update to LTS versions right now? |
It doesn't appear to work for me, it always tried to do updates to Node.js v20 (and not stay on 18 for LTS). I added the following configuration: {
"matchDatasources": ["docker"],
"matchPackageNames": ["node"],
"allowedVersions": "<19"
} But now it does not create any updates at all. |
Never mind, I need my coffee first. Thought 20 was LTS already |
Recently got an issue, Renovate automatically updated |
Add new option `versionCompatibility` which allows for massing raw versions similar to `extractVersion`, but applying both to datasource versions as well as the currentValue. Closes #5990
🎉 This issue has been resolved in version 37.3.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Hi @rarkins , I changed my config to the one suggested from your PR and will check what happens 😊 Thank you again! |
If you're using the hosted app, you'll need to wait a day or maybe two for it to be updated to the new version |
Thank you for implementing this! |
There are a couple of examples in the docs you can use as inspiration. If that doesn't work, please create a reproduction repo |
@rarkins , do you know when this will roll out to the hosted versions? It has been a couple of days, but I'm getting an invalid config issue: Config: {
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["group:allNonMajor", "config:base"],
"schedule": "on Friday",
"lockFileMaintenance": {
"enabled": true,
"automerge": true,
"automergeType": "branch"
},
"packageRules": [
{
"matchUpdateTypes": ["minor", "patch"],
"matchCurrentVersion": "!/^0/",
"automerge": true,
"automergeType": "branch"
},
{
"matchDatasources": ["docker"],
"matchPackageNames": ["node"],
"versionCompatibility": "^(?<version>.*)(?<compatibility>-.*)?$",
"versioning": "node"
}
],
"rangeStrategy": "pin"
} |
Also note that the version compatibility specified in the docs does not match the one used in test case https://github.com/renovatebot/renovate/pull/24717/files#diff-92546f944a22f594ce76af3184652c505078794c8edb714cb14a05d09a76f177R259 |
I'm using the following now and it works. I also had the bug you described, and I can't remember where I got the fixed version from (docs?) {
"matchDatasources": ["docker"],
"matchPackageNames": ["node"],
"versionCompatibility": "^(?<version>[^-]+)(?<compatibility>-.*)?$",
"versioning": "node"
} |
Hmm... that version is also not working for me but afaik it should behave the same way as |
|
Please create a reproduction repo and then new discussion |
Working great with the example from docs, thanks! |
In SemVer, suffixes indicate pre-releases, e.g. apha, beta, rc, etc.
But in other contexts, they may mean "compatibility". It's especially common in Docker, e.g.
1.2.3-alpine
, so we default to assuming the suffix is compatibility. But also in Maven versioning, we've seen cases like-java7
being added to indicate java 7 compatibility, or Google's Guava using the suffix to indicator flavor.Renovate's
allowedVersions
feature was recently enhanced to support regex patterns, which could include for example/-android$/
to enforce a-android suffix or
!/-/` to make sure no suffix is in place.I'm wondering if a new feature called
enforceSuffix
(defaulting tofalse
for all but Docker) could be useful for users to ensure e.g.:1.14.1.1
to1.14.2-java7
)1.2.3-android
to1.2.4-android
.I also just realized that we have a risk of confusion between the
compatibility
object that managers can return with extract results vs thecompatibility
field that the regex manager supports.The text was updated successfully, but these errors were encountered: