GoogleCloudPlatform / GoogleCloudPlatform/cloud-sql-jdbc-socket-factory

Excessive dependencies of the java libraries are causing cascading failures when attempting to upgrade

Open
#1,921 15 comments 0 reactions 1 assignee Assigned to @hessjcg View on GitHub
priority: p2 type: feature request
Dominant language
Java
Stars
255
Forks
117
Avg merge
2d 19h
Merged PRs (30d)
4

Description

### Bug Description

Not sure if this is the best place to raise this issue, as it's a general concern we keep facing with all of the google provided java APIs. But, we are specifically trying to acquire the fix in this library in version 1.17.0 to fix r2dbc health when using REMOTE validation, but are currently unable to.

Where our web applications use dependency management frameworks (such as spring-boot or micronaut) that expose netty servers, and are complex applications in their own right that need version management, upgrades, etc, we find ourselves having to manually tweak all of the google client libraries every time an upgrade comes through, and hope there's no breaking changes. For the r2dbc issue we have gax and netty incompatibilities with those provided by other google libraries (pubsub, otel, etc). We've got places where the guava version used has been overwritten from the "jre" version to the "android" version due to the cloud-sql-connector-r2dbc-postgres itself requiring the android version, but its own transitive dependencies require the jre version (this causes compatibility issues with the google otel libraries that require the jre, and crash out at runtime if only the android version is installed.

I understand the intention is that we should use the bom, but this is incompatible with other management frameworks, as it overrides "standard" libraries (such as netty), and we cannot really use the uber-jar's as if we did that for each library we'd end up our releases being several hundreds of MB (even with just a single google client dependency, it is already around the 100MB mark even for trivial apps).

So, the ask is, is it possible to reduce the dependencies of these libraries, or have more parts defined as optional as for example when deploying an simple web application within a GKE application using the r2dbc libraries, we do not use hardly any of them.

### Example code (or command)

_No response_

### Stacktrace

_No response_

### Steps to reproduce?

Create new project with just the "cloud-sql-connector-r2dbc-postgres" dependency added, and look at the dependency tree.

### Environment

all

### Additional Details

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.