grpc / grpc-java

The Java gRPC implementation. HTTP/2 based RPC
https://grpc.io/docs/languages/java/
Apache License 2.0
11.48k stars 3.85k forks source link

s2a: repositories.bzl override does not point to a target #11703

Open karanjamutahi opened 1 day ago

karanjamutahi commented 1 day ago

What version of gRPC-Java are you using?

1.68.1

What is your environment?

Linux, jdk 23.0.1, bazel version 7.4.1

What did you expect to see?

@@io_grpc_grpc_java//s2a points to a bazel target

What did you see instead?

There is no target called s2a in @@io_grpc_grpc_java//s2a i.e. @@io_grpc_grpc_java//s2a:s2a

Steps to reproduce the bug

bazel query @@io_grpc_grpc_java//s2a

We added an override to point io.grpc:grpc-s2a to @@io_grpc_grpc_java//s2a:s2av2_credentials which is what I think the gradle build publishes to maven

I think the test mentioned in #3918 can at least bazel query that the values in IO_GRPC_GRPC_JAVA_OVERRIDE_TARGETS resolve to a target ?

ejona86 commented 1 day ago

Are you using s2a? Or did you notice by some other means?

ejona86 commented 1 day ago

@rmehta19, I think we should rename s2av2_credentials to s2a, as "v2" means nothing to any user (or me) and we rarely get much benefit from fine-grained targets (I think grpc-services is the main exception). If we want to avoid dependencies, we have to put the code in separate packages and artifacts anyway for Maven Central. So we should also swap to using a glob on src/main/java/io/grpc/s2a/*.java like we do elsewhere.

karanjamutahi commented 1 day ago

Are you using s2a? Or did you notice by some other means?

We don't. A transitive dep complained that it couldn't find it. com_google_cloud_google_cloud_resourcemanager