Test-only Go dependencies force the Go version of the whole repo (see #1548)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 12/100
- Issue 类型
- 重构
- 描述清晰度
- 需要澄清
- 活跃度
- 活跃
- 技术栈
- docker, go
- 领域
- build-system
调研方向
Start with the open question in the issue: whether vendor/ is needed because bin/supply and bin/finalize build offline, which you can check in scripts/install_go.sh and the packaging scripts. Then look at go.mod, src/integration, and scripts/integration.sh to see which modules come only from the integration tests. This needs a maintainer decision on the approach before any code change, so done means that decision is recorded.
由索引模型根据 Issue 内容生成。
描述
While looking at Dependabot PR #1548 I noticed that a test-only dependency can raise the Go version for the whole repo.
go.mod says go 1.25.4, and scripts/install_go.sh installs Go 1.25.10, which bin/supply and bin/finalize use for go build -mod=vendor. otel 1.47.0 needs Go 1.26, so #1548 changes go.mod to go 1.26.0. The build with Go 1.25.10 (GOTOOLCHAIN=local) then fails with go: go.mod requires go >= 1.26.0. On main it works.
The buildpack binaries (supply, finalize, javaexec) only use a few modules: libbuildpack, libbuildpack-dynatrace, the two semver libraries, backoff, the YAML libraries and golang.org/x. OpenTelemetry is pulled in by the integration tests: go mod why go.opentelemetry.io/otel gives src/integration -> switchblade -> docker/docker/client -> otelhttp -> otel. As far as I can see, the same tooling brings in many of the other test-only modules. vendor/ holds 51 modules in 1,526 committed files (24 MB), so one bump can change tens of thousands of lines (#1528: about 35,000, of which 90% are two generated files).
Some ideas, in the order I would try them:
- Move
src/integrationinto its own Go module (owngo.modandvendor/). Bumps of switchblade, the Docker client or otel would then no longer change the Go version or the vendored code of the buildpack itself. I have not tried this;scripts/integration.shand the CI jobs would need a check. - Dependabot rules: group or ignore the test-only modules, so a Go version jump is not proposed as a routine update.
- Raise the Go version of the buildpack on purpose now and then, in its own PR (new version and sha256 per stack in
install_go.sh), so the gap to the newest Go stays small.
Question: is vendor/ needed because bin/supply and bin/finalize build from source when staging (possibly without network access), or is there another reason? That would help to decide which of these ideas makes sense.
- 主要语言
- Go
- 星标
- 455
- 派生
- 2.5k
- 平均合并
- 22 小时 9 分钟
- 30 天内合并 PR
- 69
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
cloudfoundry/java-buildpack 的其他 Issue
-
New Relic agent is installed but never attached to the JVM (v5.0.4 and later)可能已有人在做 @stokpop 于 3 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 35/100
cloudfoundry/java-buildpack#1542 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 25/100
cloudfoundry/java-buildpack#1521 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 10/100
cloudfoundry/java-buildpack#1469 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 55/100
cloudfoundry/java-buildpack#1377 · 5 条评论 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 52/100
cloudfoundry/java-buildpack#1364 ·
维护者通常 1 天内回复
查看 cloudfoundry/java-buildpack 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 84/100
github/github-mcp-server#3865 ·
维护者通常 2 天内回复
-
kind/features
难度 2/5 1-3 小时 新手友好度 75/100
TencentBlueKing/bk-nodemgr#4017 ·
维护者通常 1 天内回复
-
ssa: wait errors drop the kstatus message, so health check failures don't say why可能已有人在做 @schdief 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
equinor/radix-operator#2066 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 67/100
microsoft/terraform-provider-msgraph#188 · 1 个 reaction ·
维护者通常 1 天内回复