Ambiguous behaviour of respectLatest for maven dependencies
#42259
Unanswered
acote-coveo
asked this question in
Request Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
How are you running Renovate?
Self-hosted Renovate CLI
Which platform you running Renovate on?
GitHub.com
Which version of Renovate are you using?
43.101.1
Please tell us more about your question or problem
Expected behaviour
According to the documentation,
respectLatestshould be set tofalseformavendependencies:We have run into a situation where the
<latest>tag in our maven registry was outdated. We were expecting renovate to ignore this tag and pickup latest releases.Actual behaviour
We saw in the logs that
respectLatestappeared to be false:That said:
updatesfor the particular dependency.--respect-latest=falseallowed us to see the updates.maven-metadata.xmlfile allowed us to see the updates.We've also run renovate locally with a debugger and were able to confirm that:
renovate/lib/modules/datasource/maven/index.ts
Lines 144 to 150 in 4cc9819
respectLatestwould be read in thefilter.tsfile:renovate/lib/workers/repository/process/lookup/filter.ts
Lines 174 to 182 in 4cc9819
Warning
At this point, the value is set to
true(the default for this config property) even tho it was set to false earlier.Investigation
If we do a git-blame on the maven datasource module, we can see that this
respectLatest = falsebehaviour was introduced here in this commit: c0bdd1cThe two main changes:

On this last screenshot, we can see that the
respectLatestproperty is getting copied intoresbut it doesn't look likeres.respectLatestis considered in the filtering method causingrespectLatest=true.Logs (if relevant)
Logs
Beta Was this translation helpful? Give feedback.
All reactions