1
0
mirror of https://github.com/goproxy/goproxy.git synced 2026-06-20 09:25:06 +02:00

556 Commits

Author SHA1 Message Date
Aofei Sheng 80d3248f73 fix(cmd/goproxy): synchronize server error handling (#183)
- Send server startup and shutdown errors through a channel instead of a
  shared variable
- Wait for the serving goroutine after shutdown so real server errors
  are not lost

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
2026-04-30 23:48:59 +08:00
Aofei Sheng ce7f51dac4 fix: close resources on error paths (#182)
- Close the S3 object when statting a cache entry fails so callers do
  not lose ownership of an open object
- Close temp files in the test helper when writing fails

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
2026-04-30 23:43:41 +08:00
Aofei Sheng a4ef0881e1 docs: clarify cache and transport comments (#181)
Clarify exported comments around `Cacher`, `DirCacher`,
`Goproxy.Transport`, and `GoFetcher.Transport` so they describe the
actual content and request paths they cover.

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
2026-04-18 14:20:00 +08:00
Aofei Sheng 500b563bfe refactor(GoFetcher)!: clarify direct fetch concurrency naming (#179)
Rename `MaxDirectFetches` to `MaxConcurrentDirectFetches` and
`--max-direct-fetches` to `--max-concurrent-direct-fetches` so the
configuration matches the semaphore limit used by direct fetches.

The previous name read like a cap on total fetch count, but the
implementation only limits concurrent direct `go` commands.

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
2026-04-18 14:01:10 +08:00
github-actions[bot] e2c87121ca chore(master): release 0.26.1 (#177)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
v0.26.1
2026-04-14 00:23:46 +08:00
Aofei Sheng 90aebfb8ee chore(ci): bump github.com/codecov/codecov-action from 5 to 6 (#178)
Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
2026-04-14 00:07:57 +08:00
Aofei Sheng 2715cd9f46 chore(ci): update release workflow to separate tagging and publishing (#176)
- Enable `draft` mode for Release Please to create draft releases
- Enable `force-tag-creation` to ensure git tags are created immediately
- Configure GoReleaser to use existing draft via `use_existing_draft`

This re-enables the workflow that was reverted in #126. The previous
attempt failed because GitHub does not create git tags for draft
releases until they are published. The new `force-tag-creation` option
in release-please 17.2.0[^1] solves this by forcing immediate tag
creation.

[^1]: https://github.com/googleapis/release-please/releases/tag/v17.2.0

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
2026-04-14 00:01:08 +08:00
github-actions[bot] ba7b0bd53f chore(master): release 0.26.0 (#170)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
v0.26.0
2026-03-11 22:28:46 +08:00
Aofei Sheng 624fb036eb chore(ci): bump Docker and GoReleaser actions (#175)
- Bump `docker/setup-qemu-action` from `v3` to `v4`
- Bump `docker/setup-buildx-action` from `v3` to `v4`
- Bump `docker/login-action` from `v3` to `v4`
- Bump `docker/build-push-action` from `v6` to `v7`
- Bump `goreleaser/goreleaser-action` from `v6` to `v7`

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
2026-03-11 22:19:40 +08:00
Aofei Sheng 791d03d6fa refactor: bump minimum required Go version to 1.25.0 (#174)
We always keep the minimum Go version requirement in sync with
`golang.org/x/mod` to ensure we don't fall too far behind on new Go
features.

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
2026-03-11 21:49:36 +08:00
Aofei Sheng fb8454a065 chore: use Go 1.26 for releases (#172)
Release-as: 0.26.0

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
2026-02-11 10:31:18 +08:00
Aofei Sheng 075e10c1c5 test: cover Go 1.26 (#171)
Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
2026-02-11 09:47:48 +08:00
Aofei Sheng b841258d7c fix(GoFetcher): stop hardcoding GOSUMDB=off in Go subprocess environment (#169)
The `GoFetcher` hardcoded `GOSUMDB=off` in the Go subprocess environment
to avoid duplicate checksum database verification, since it performs its
own verification via an embedded `sumdb.Client`. However, this prevented
`GOTOOLCHAIN=auto` from working because the Go subprocess could not
verify toolchain downloads against the checksum database.

Pass through the user's real `GOSUMDB` and `GONOSUMDB` values to the Go
subprocess. Restrict the application-layer checksum database
verification to only the proxy download path, since the Go subprocess
now handles verification for direct downloads on its own.

Fixes #168

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
2026-02-09 12:35:49 +08:00
github-actions[bot] 2581999ce9 chore(master): release 0.25.0 (#164)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
v0.25.0
2025-12-10 23:00:51 +08:00
Aofei Sheng e6843840ce chore(deps): bump golang.org/x/mod from 0.30.0 to 0.31.0 (#166)
Release-as: 0.25.0

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
2025-12-10 22:58:52 +08:00
Aofei Sheng e4d352c3a7 chore(Dockerfile): use golang:1.25-alpine3.23 as base image (#165)
Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
2025-12-10 22:47:31 +08:00
Aofei Sheng 7fa2678c00 fix(Dockerfile): preserve file timestamps when copying GoReleaser artifacts (#163)
Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
2025-12-10 17:45:24 +08:00
github-actions[bot] fb0170ad04 chore(master): release 0.24.0 (#156)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
v0.24.0
2025-12-07 14:19:09 +08:00
Aofei Sheng b436cb852b chore(ci): bump actions/checkout from 5 to 6 (#162)
Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
2025-12-07 13:52:55 +08:00
Aofei Sheng bb9f845ddd chore(deps): bump modules (#161)
- Bump golang.org/x/mod from 0.29.0 to 0.30.0
- Bump github.com/spf13/cobra from 0.10.1 to 0.10.2
- Bump github.com/minio/minio-go from 7.0.95 to 7.0.97

Release-as: 0.24.0

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
2025-12-07 13:39:52 +08:00
Aofei Sheng 58ebafca12 chore(.goreleaser.yaml): add -trimpath flag for reproducible builds (#160)
See https://goreleaser.com/blog/reproducible-builds/

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
2025-12-04 20:01:28 +08:00
Aofei Sheng ad2730effe refactor(cmd/goproxy): make version override linker flag target unexported (#159)
Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
2025-12-04 19:51:05 +08:00
Aofei Sheng e0b8fc733b chore(Dockerfile): use heredoc for build steps (#158)
Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
2025-12-02 18:25:54 +08:00
Aofei Sheng ca9f50b0ad refactor: use github.com/aofei/backoff for retries (#157)
- Replace the local exponential backoff helper with
  github.com/aofei/backoff so `httpGet` uses a well-tested jittered
  retry loop that still respects context cancellation
- Fix the deadline test to expect `context.DeadlineExceeded`

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
2025-10-29 00:07:11 +08:00
Aofei Sheng c75e57e017 fix: clean up resources on error paths (#155)
This follows up on #152.

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
2025-10-28 20:46:14 +08:00
github-actions[bot] cbd238d393 chore(master): release 0.23.0 (#153)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
v0.23.0
2025-10-10 10:35:22 +08:00
Aofei Sheng 2b69cffa5c chore(deps): bump golang.org/x/mod from 0.28.0 to 0.29.0 (#154)
Release-as: 0.23.0

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
2025-10-10 10:23:00 +08:00
Aofei Sheng 4ff25f49a2 feat(cmd/goproxy): add /healthz probe handler to server command (#149)
Fixes #147

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
2025-10-10 09:41:48 +08:00
Copilot 73b8724895 fix: close cached content to prevent memory leak in Goproxy.serveFetchDownload (#152)
* Initial plan

* Fix memory leak by adding defer content.Close() in serveFetchDownload

Co-authored-by: aofei <5037285+aofei@users.noreply.github.com>

* Simplify test code based on code review feedback

Co-authored-by: aofei <5037285+aofei@users.noreply.github.com>

* Add .gitignore to exclude build artifacts

Co-authored-by: aofei <5037285+aofei@users.noreply.github.com>

* Move test to subtest and remove .gitignore per code review

Co-authored-by: aofei <5037285+aofei@users.noreply.github.com>

* Use existing closerFunc instead of testReadCloser

Co-authored-by: aofei <5037285+aofei@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: aofei <5037285+aofei@users.noreply.github.com>
2025-10-10 09:26:06 +08:00
github-actions[bot] 1311b8d21b chore(master): release 0.22.1 (#146)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
v0.22.1
2025-09-09 17:56:36 +08:00
Aofei Sheng eb0dc136d2 fix(ci): add Docker Buildx setup for GoReleaser dockers_v2 support (#145)
This resolves the "failed to publish artifacts" error in GoReleaser's
`dockers_v2` feature by adding the missing `docker/setup-buildx-action`
step, which is required for multi-platform Docker image builds.

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
2025-09-09 17:45:32 +08:00
github-actions[bot] 888691c890 chore(master): release 0.22.0 (#134)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
v0.22.0
2025-09-09 16:49:48 +08:00
Aofei Sheng fb08e31221 chore(ci): bump actions/setup-go from 5 to 6 (#143)
Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
2025-09-09 16:41:10 +08:00
Aofei Sheng d79e26e978 chore: release 0.22.0 (#144)
Release-as: 0.22.0
2025-09-09 16:33:53 +08:00
Aofei Sheng 10c8ebb480 refactor: bump minimum required Go version to 1.24.0 (#142)
We always keep the minimum Go version requirement in sync with
`golang.org/x/mod` to ensure we don't fall too far behind on new Go
features.

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
2025-09-09 16:24:42 +08:00
Ed Harrod 9ff4639916 fix: close downloaded files immediately (#139)
Fixes #138
2025-09-06 14:38:00 +00:00
Aofei Sheng 37640745cd chore: migrate to dockers_v2 from GoReleaser 2.12 (#141)
Migrate from the legacy `dockers` configuration to the new `dockers_v2`
format introduced in GoReleaser 2.12[^1].

The migration eliminates the need for the `docker_manifests` section
entirely and streamlines the Dockerfile by using `TARGETPLATFORM` for
multi-arch builds instead of architecture-specific tarball handling.

[^1]: https://goreleaser.com/blog/goreleaser-v2.12/

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
2025-09-06 22:29:53 +08:00
Aofei Sheng 21c7a1169f chore(ci): simplify .github/workflows/test.yaml (#137)
Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
2025-08-25 13:40:28 +08:00
Aofei Sheng d04a91cf37 chore: use Go 1.25 for releases (#136)
Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
2025-08-20 15:42:32 +08:00
Aofei Sheng 3e4fe2d162 chore(ci): bump actions/checkout from 4 to 5 (#135)
Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
2025-08-19 23:32:23 +08:00
Aofei Sheng 1a3e11cca6 test: cover Go 1.25 (#133)
Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
2025-08-19 23:15:50 +08:00
github-actions[bot] ae25f076be chore(master): release 0.21.0 (#130)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
v0.21.0
2025-06-14 21:58:20 +08:00
Aofei Sheng 6cb0544304 chore(deps): bump github.com/minio/minio-go/v7 from 7.0.92 to 7.0.93 (#132)
Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
2025-06-14 21:56:29 +08:00
Aofei Sheng 4c4128f1aa chore(Dockerfile): use golang:1.24-alpine3.22 as base image (#131)
Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
2025-06-14 21:42:54 +08:00
Aofei Sheng 1b19b35c1e refactor(cmd/goproxy): simplify binary version handling (#129)
Release-as: 0.21.0

Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
2025-06-14 21:28:49 +08:00
github-actions[bot] 0e9ff629ce chore(master): release 0.20.3 (#128)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
v0.20.3
2025-06-08 21:08:59 +08:00
Aofei Sheng 927945e930 chore: release 0.20.3 (#127)
Release-as: 0.20.3
2025-06-08 21:07:29 +08:00
Aofei Sheng cbd996ec49 revert: chore: update release workflow to separate tagging and publishing (#126)
This reverts commit 33c5b1e9a3.
2025-06-07 19:27:11 +08:00
github-actions[bot] 8711d08b5f chore(master): release 0.20.2 (#124)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
v0.20.2
2025-06-07 19:04:26 +08:00
Aofei Sheng 4eee47de7c chore(deps): bump golang.org/x/mod and github.com/minio/minio-go/v7 (#123)
Signed-off-by: Aofei Sheng <aofei@aofeisheng.com>
2025-06-07 18:55:16 +08:00