matchCurrentVersion can't be used to disable minor updates only #21408
-
I'm using the Mend Renovate hosted app on github.com.
Was this something which used to work for you, and then stopped?I never saw this working Describe your problem.Copied from https://github.com/renovatebot/renovate/issues/21407 (BTW, I cannot copy the markdown (because I can't edit my own issue), it is really annoying having to reformat the whole thing manually...) Anyway, I'm certain there is at least one bug here as I'm using and expecting everything as documented. Can't make use of matchCurrentVersion in packageRules to enable/disable minor updates for new versions only.
Repro with specific details: I tried two possible implementations of the above requirements, but both have problems. [
{
"description": "Disable updating Gradle CI matrix, they use the latest patch of a specific minor.",
"matchPackageNames": [ "gradle" ],
"matchPaths": [ ".github/workflows/CI.yml" ],
"matchCurrentVersion": "<7.0",
"matchUpdateTypes": [ "minor" ],
"enabled": false
}
] Case 2: enabled: false & matchCurrentVersion: >=7.0 + enabled: true [
{
"description": "Disable updating Gradle CI matrix, they use the latest patch of a specific minor.",
"matchPackageNames": [ "gradle" ],
"matchPaths": [ ".github/workflows/CI.yml" ],
"matchUpdateTypes": [ "minor" ],
"enabled": false
},
{
"description": "Enable latest versions.",
"matchPackageNames": [ "gradle" ],
"matchPaths": [ ".github/workflows/CI.yml" ],
"matchCurrentVersion": ">=7.0",
"matchUpdateTypes": [ "minor" ],
"enabled": true
}
] See the repro for more details on what's wrong. Relevant debug logs.
Select me to see logsDEBUG: packageFiles with updates
{
"baseBranch": "master",
"config": {
"gradle-wrapper": [
{
"deps": [
{
"currentValue": "7.4.2",
"currentVersion": "7.4.2",
"datasource": "gradle-version",
"depName": "gradle",
"fixedVersion": "7.4.2",
"homepage": "https://gradle.org",
"isSingleVersion": true,
"packageName": "gradle",
"registryUrl": "https://services.gradle.org/versions/all",
"replaceString": "https\\://services.gradle.org/distributions/gradle-7.4.2-bin.zip",
"sourceUrl": "https://github.com/gradle/gradle",
"versioning": "gradle",
"warnings": [],
"updates": [
{
"bucket": "minor",
"newVersion": "7.6.1",
"newValue": "7.6.1",
"releaseTimestamp": "2023-02-24T13:54:42.000Z",
"newMajor": 7,
"newMinor": 6,
"updateType": "minor",
"branchName": "renovate/gradle-7.x"
},
{
"bucket": "major",
"newVersion": "8.0.2",
"newValue": "8.0.2",
"releaseTimestamp": "2023-03-03T16:41:37.000Z",
"newMajor": 8,
"newMinor": 0,
"updateType": "major",
"branchName": "renovate/gradle-8.x"
}
]
}
],
"packageFile": "gradle/wrapper/gradle-wrapper.properties"
}
],
"regex": [
{
"datasourceTemplate": "gradle-version",
"depNameTemplate": "gradle",
"deps": [
{
"currentValue": "6.5",
"currentVersion": "6.5",
"datasource": "gradle-version",
"depName": "gradle",
"fixedVersion": "6.5",
"homepage": "https://gradle.org",
"isSingleVersion": true,
"packageName": "gradle",
"registryUrl": "https://services.gradle.org/versions/all",
"replaceString": " gradle: '6.5'",
"sourceUrl": "https://github.com/gradle/gradle",
"versioning": "gradle",
"warnings": [],
"updates": [
{
"bucket": "patch",
"newVersion": "6.5.1",
"newValue": "6.5.1",
"releaseTimestamp": "2020-06-30T06:32:47.000Z",
"newMajor": 6,
"newMinor": 5,
"updateType": "patch",
"branchName": "renovate/gradle-6.5.x"
},
{
"bucket": "minor",
"newVersion": "6.9.4",
"newValue": "6.9.4",
"releaseTimestamp": "2023-02-22T08:43:12.000Z",
"newMajor": 6,
"newMinor": 9,
"updateType": "minor",
"branchName": "renovate/gradle-6.x"
},
{
"bucket": "major",
"newVersion": "8.0.2",
"newValue": "8.0.2",
"releaseTimestamp": "2023-03-03T16:41:37.000Z",
"newMajor": 8,
"newMinor": 0,
"updateType": "major",
"branchName": "renovate/gradle-8.x"
}
]
},
{
"currentValue": "6.6.1",
"currentVersion": "6.6.1",
"datasource": "gradle-version",
"depName": "gradle",
"fixedVersion": "6.6.1",
"homepage": "https://gradle.org",
"isSingleVersion": true,
"packageName": "gradle",
"registryUrl": "https://services.gradle.org/versions/all",
"replaceString": " gradle: '6.6.1'",
"sourceUrl": "https://github.com/gradle/gradle",
"versioning": "gradle",
"warnings": [],
"updates": [
{
"bucket": "minor",
"newVersion": "6.9.4",
"newValue": "6.9.4",
"releaseTimestamp": "2023-02-22T08:43:12.000Z",
"newMajor": 6,
"newMinor": 9,
"updateType": "minor",
"branchName": "renovate/gradle-6.x"
},
{
"bucket": "major",
"newVersion": "8.0.2",
"newValue": "8.0.2",
"releaseTimestamp": "2023-03-03T16:41:37.000Z",
"newMajor": 8,
"newMinor": 0,
"updateType": "major",
"branchName": "renovate/gradle-8.x"
}
]
},
{
"currentValue": "6.8.2",
"currentVersion": "6.8.2",
"datasource": "gradle-version",
"depName": "gradle",
"fixedVersion": "6.8.2",
"homepage": "https://gradle.org",
"isSingleVersion": true,
"packageName": "gradle",
"registryUrl": "https://services.gradle.org/versions/all",
"replaceString": " gradle: '6.8.2'",
"sourceUrl": "https://github.com/gradle/gradle",
"versioning": "gradle",
"warnings": [],
"updates": [
{
"bucket": "patch",
"newVersion": "6.8.3",
"newValue": "6.8.3",
"releaseTimestamp": "2021-02-22T16:13:28.000Z",
"newMajor": 6,
"newMinor": 8,
"updateType": "patch",
"branchName": "renovate/gradle-6.8.x"
},
{
"bucket": "minor",
"newVersion": "6.9.4",
"newValue": "6.9.4",
"releaseTimestamp": "2023-02-22T08:43:12.000Z",
"newMajor": 6,
"newMinor": 9,
"updateType": "minor",
"branchName": "renovate/gradle-6.x"
},
{
"bucket": "major",
"newVersion": "8.0.2",
"newValue": "8.0.2",
"releaseTimestamp": "2023-03-03T16:41:37.000Z",
"newMajor": 8,
"newMinor": 0,
"updateType": "major",
"branchName": "renovate/gradle-8.x"
}
]
},
{
"currentValue": "6.9.3",
"currentVersion": "6.9.3",
"datasource": "gradle-version",
"depName": "gradle",
"fixedVersion": "6.9.3",
"homepage": "https://gradle.org",
"isSingleVersion": true,
"packageName": "gradle",
"registryUrl": "https://services.gradle.org/versions/all",
"replaceString": " gradle: '6.9.3'",
"sourceUrl": "https://github.com/gradle/gradle",
"versioning": "gradle",
"warnings": [],
"updates": [
{
"bucket": "patch",
"newVersion": "6.9.4",
"newValue": "6.9.4",
"releaseTimestamp": "2023-02-22T08:43:12.000Z",
"newMajor": 6,
"newMinor": 9,
"updateType": "patch",
"branchName": "renovate/gradle-6.9.x"
},
{
"bucket": "major",
"newVersion": "8.0.2",
"newValue": "8.0.2",
"releaseTimestamp": "2023-03-03T16:41:37.000Z",
"newMajor": 8,
"newMinor": 0,
"updateType": "major",
"branchName": "renovate/gradle-8.x"
}
]
},
{
"currentValue": "7.4.2",
"currentVersion": "7.4.2",
"datasource": "gradle-version",
"depName": "gradle",
"fixedVersion": "7.4.2",
"homepage": "https://gradle.org",
"isSingleVersion": true,
"packageName": "gradle",
"registryUrl": "https://services.gradle.org/versions/all",
"replaceString": " gradle: '7.4.2'",
"sourceUrl": "https://github.com/gradle/gradle",
"versioning": "gradle",
"warnings": [],
"updates": [
{
"bucket": "minor",
"newVersion": "7.6.1",
"newValue": "7.6.1",
"releaseTimestamp": "2023-02-24T13:54:42.000Z",
"newMajor": 7,
"newMinor": 6,
"updateType": "minor",
"branchName": "renovate/gradle-7.x"
},
{
"bucket": "major",
"newVersion": "8.0.2",
"newValue": "8.0.2",
"releaseTimestamp": "2023-03-03T16:41:37.000Z",
"newMajor": 8,
"newMinor": 0,
"updateType": "major",
"branchName": "renovate/gradle-8.x"
}
]
}
],
"matchStrings": [
" gradle: '(?<currentValue>.*)'"
],
"packageFile": ".github/workflows/CI.yml",
"versioningTemplate": "gradle"
},
{
"datasourceTemplate": "gradle-version",
"depNameTemplate": "gradle",
"deps": [
{
"currentValue": "7.4.2",
"currentVersion": "7.4.2",
"datasource": "gradle-version",
"depName": "gradle",
"fixedVersion": "7.4.2",
"homepage": "https://gradle.org",
"isSingleVersion": true,
"packageName": "gradle",
"registryUrl": "https://services.gradle.org/versions/all",
"replaceString": "test.gradle.version=7.4.2",
"sourceUrl": "https://github.com/gradle/gradle",
"versioning": "gradle",
"warnings": [],
"updates": [
{
"bucket": "minor",
"newVersion": "7.6.1",
"newValue": "7.6.1",
"releaseTimestamp": "2023-02-24T13:54:42.000Z",
"newMajor": 7,
"newMinor": 6,
"updateType": "minor",
"branchName": "renovate/gradle-7.x"
},
{
"bucket": "major",
"newVersion": "8.0.2",
"newValue": "8.0.2",
"releaseTimestamp": "2023-03-03T16:41:37.000Z",
"newMajor": 8,
"newMinor": 0,
"updateType": "major",
"branchName": "renovate/gradle-8.x"
}
]
}
],
"matchStrings": [
"test.gradle.version=(?<currentValue>.*)"
],
"packageFile": "gradle.properties",
"versioningTemplate": "gradle"
}
]
}
} |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 6 replies
-
Please include the |
Beta Was this translation helpful? Give feedback.
-
Hi there, We found a problem with the logs. Depending on which situation applies follow one, some or all of these instructions. No logs at allIf you haven't posted any log yet, we need you to find and copy/paste the log into the issue template. Finding logs on hosted appSelect me to read instructionsIf you use the Renovate app (GitHub):
Finding logs when self-hostingSelect me to read instructionsIf you're running self-hosted, run with Insufficient logsSelect me to read instructionsIf you already gave us a log, and the Renovate team said it's not enough, then follow the instructions from the No logs at all section. Formatting your logsSelect me to read instructionsPlease put your logs in a
Good luck, The Renovate team |
Beta Was this translation helpful? Give feedback.
You are using
gradle
versioning for these dependencies, but I don't think<7.0
is valid Gradle syntax. I modified your reproduction config renovate-reproductions/21408@d25ac7b and found one of the five PRs was autoclosed: renovate-reproductions/21408#5