- 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>
- 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>
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>
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>
- 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>
- 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>
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>
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>
- 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>
- 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>
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>
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>
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>