google / google/error-prone

Please attach a stable source archive to releases

Open
#4,830 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
7.2k
Forks
820
Avg merge
5h 9m
Merged PRs (30d)
50

Description

Releases of Error Prone currently get Git tags and release entries recorded under https://github.com/google/error-prone/releases, but those releases don't have stable source archives attached to them. The only archives offered are via GitHub's automatic tarball endpoints, which are equivalent to running `git archive`.

GitHub does not guarantee that it always returns the exact same bytes for a tarball of a given commit/tag. This can be frustrating for users of Bazel (and similar build tools), which validates downloaded archives against an expected checksum.

Examples of user-reported build breakage that has been caused in the past by GitHub archive checksum changes:

* Protobuf: https://github.com/protocolbuffers/protobuf/issues/3619
* Bazel: https://github.com/bazelbuild/bazel/issues/3722
* Kubernetes: https://github.com/kubernetes/kubernetes/issues/52307

An easy solution is to have the release management script download the auto-generated tarball from GitHub and then upload it as an attachment to the release. That way, if the automatic tarball endpoint's output ever changes (e.g. due to different compression output) the stable archive's checksum will remain the same.

Alternatively, a command such as `git archive --format=tar $TAG | gzip -9 > errorprone-${TAG}.tar.gz` can be used to generate the tarball locally.

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.