Support for full combination of co-ordinates in bazel #31513
Labels
manager:bazel
Bazel WORKSPACE files
priority-4-low
Low priority, unlikely to be done unless it becomes important to more people
type:feature
Feature (new functionality)
Discussed in #31313
Reproduced in https://github.com/renovate-reproductions/31313
Originally posted by daniel-b2c2 September 10, 2024
What would you like help with?
I think I found a bug/coverage issue
How are you running Renovate?
Self-hosted
If you're self-hosting Renovate, tell us which platform (GitHub, GitLab, etc) and which version of Renovate.
GitHub 38.38.1
Please tell us more about your question or problem
While
groupId:artifactId:version
is the most common way of defining co-ordinates for 99% of usecases, there are occasionally more complex co-ordinates that involve specifying the packaging and classifier.The full set of valid co-ordinate patterns can be seen here for bazel, the problem is that renovate only comprehends the 3-arity form, and [speculating] either doesn't support 4,5-arity, or there is a bug in 4,5-arity.
Spec:
https://github.com/bazelbuild/rules_jvm_external/blob/master/specs.bzl#L132
Using this particular maven artifact as a great example of 5-arity: https://repo1.maven.org/maven2/io/netty/netty-transport-native-epoll/4.1.113.Final/
It is necessary to specify the packaging as jar and the classifier linux-x86_64 as part of the co-ordinates so
"io.netty:netty-transport-native-epoll:jar:linux-x86_64:4.1.87.Final
(5-arity) is valid in amaven_install
file.Current behaviour:
when renovate raises a PR for a 5-arity entry, it incorrectly offers
io.netty:netty-transport-native-epoll:4.1.113.Final:linux-x86_64:4.1.87.Final
as the upgrade replacing the third element (jar
) with the new version.Expected behaviour:
when renovate raises a PR for a 5-arity entry, it should offer
io.netty:netty-transport-native-epoll:jar:linux-x86_64:4.1.113.Final
with the last element in the array being upgraded.This seeps into the PR too where the table of upgrades shows
jar
->4.1.113.Final
Similarly for 4-arity which using the example above would be
io.netty:netty-transport-native-epoll:jar:4.1.113.Final
Current workaround:
We are closing the PRs and doing the upgrade manually.
Logs (if relevant)
Logs
Example project:
This project has 2 maven dependencies, one of arity-4 and one of arity-5. It fails to correctly upgrade either of them as shown in this PR:
https://github.com/daniel-b2c2/bazel-java-arity/pull/3/files
The text was updated successfully, but these errors were encountered: