Centrally Manage Dependency Versions for google-auth-library and the rest of the libraries in google-cloud-java

未关闭
#13,176 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
重构
描述清晰度
需要澄清
活跃度
冷清
技术栈
java

调研方向

将 google-auth-library-java/pom.xml 中的依赖项属性与 sdk-platform-java/gapic-generator-java-pom-parent/pom.xml 中的依赖项属性进行比较,然后审查提出的三种方案。实现前需要 maintainer 作出决定;done 应意味着以一致的方式管理共享依赖项版本,同时不创建循环的 Maven Central staging 依赖项。

由索引模型根据 Issue 内容生成。

描述

priority: p1 type: feature request

The Problem: Auth Dependencies Are Managed Separately

Currently, the google-auth-library-java module manages its third-party dependencies (like Guava, Protobuf, Jackson, and JUnit) separately within its own local <properties> block. The rest of the monorepo manages identical dependencies inside gapic-generator-java-pom-parent.

This duplicates versions and increases the risk of dependency drift across the monorepo:

  • google-auth-library-java/pom.xml
  • sdk-platform-java/gapic-generator-java-pom-parent/pom.xml

Because com.google.auth and com.google.cloud deploy under different staging profiles on Maven Central, they are uploaded to separate staging repositories. If google-auth-library-java references unreleased in-development versions of com.google.cloud parent POMs or BOMs, a circular release staging deadlock is created at release time.


Proposed Solutions

Option 1: Extract Version Properties to google-cloud-shared-config

Move shared version properties (like <guava.version>) into the external parent POM com.google.cloud:google-cloud-shared-config from which both modules inherit.

  • Pros:
    • Single, definitive source of truth at the parent configuration level.
    • Completely clean code structure with zero duplicate config.
  • Cons:
    • Rigid Release Pipeline: Upgrading a dependency (like an urgent security CVE patch) requires releasing a new version of google-cloud-shared-config to Maven Central first, waiting for Central's CDN to sync, and then updating the parent references in both projects.
Option 2: Extract Versions to a Common Base BOM Module (in Monorepo)

Introduce a lightweight, internal BOM module (e.g., base-shared-dependencies) in this monorepo containing only the third-party library versions. Both the auth library and client library BOMs would import it.

  • Pros:
    • Prevents circular staging deadlocks by maintaining a strictly acyclic dependency graph.
    • Single source of truth located directly within the same monorepo.
  • Cons:
    • Release Staging Delay: Due to staging profile boundaries, releases must be built sequentially (waiting for the base BOM to fully sync to Maven Central before releasing the auth library, and then repeating before client libraries can release).
Option 3: Keep It as It Is and Use Automation to Update

Keep the properties blocks isolated inside their respective directories, but coordinate updates strictly using Renovate Bot or other CI scripting to bump them in parallel.

  • Pros:
    • Maximum Autonomy: The auth team can delay upgrades to preserve legacy client compatibility (like Firebase/Android) without blocking the client libraries.
    • Zero Release Bottlenecks: No sequential staging wait-times; both projects release in parallel.
  • Cons:
    • Relies on external tooling and automation scripts to maintain consistency; human error/drift is still possible if manually edited.
主要语言
Java
星标
2.1k
派生
1.2k
平均合并
2 天 14 小时
30 天内合并 PR
192

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

googleapis/google-cloud-java 的其他 Issue

查看 googleapis/google-cloud-java 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。