Releases: hexops/wrench
Releases · hexops/wrench
Automatic release of main @ f827edc
fix links Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
Automatic release of main @ 2654f8b
store: purge old jobs and logs >30d old Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
Automatic release of main @ 185ef60
add "wrench version" command Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
Automatic release of main @ 1514cd8
wrench: update repo awareness Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
Automatic release of main @ b5b5129
remove broken link Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
Automatic release of main @ 625a583
Atomically write downloaded file to filesystem (#3) This prevents writing a truncated file to a valid cache path, and serving that partial file later. This uses a new dependency, github.com/natefinch/atomic, which from a quick look seems to do the right thing.
Automatic release of main @ 42798b6
Pass context to httpGet (#2) This should fix a bug where the context is getting canceled immediately because of the defered `cancel()` within the helper function.
Automatic release of main @ d06eafd
reduce potential lock contention; avoid goroutine leak Hitting the wrench process with `kill -SIGQUIT <pid>` showed in the goroutine stack trace dump that one goroutine was hung on an HTTP request doomed to never finish. Unfortunately, that also meant it held the mutex used to prevent concurrent writes forever - which meant the cache was unable to add new Zig versions - leading to bug reports like https://github.com/mlugg/setup-zig/issues/5#issuecomment-2181355145 indicating fetching a new Zig version was impossible. This fixes it by reducing the lock contention, and using an HTTP client with an actual timeout (Go's defaults suck here, crazy that the default function for 'make an GET request' can hang forever and leak a goroutine, or worse as in this case.) ``` goroutine 25991611 [select, 1612 minutes]: runtime.gopark(0xc00040e9f0?, 0x4?, 0xa8?, 0x83?, 0xc00040e948?) /opt/homebrew/Cellar/go/1.21.6/libexec/src/runtime/proc.go:398 +0xce fp=0xc00040e7e0 sp=0xc00040e7c0 pc=0x43be2e runtime.selectgo(0xc00040e9f0, 0xc00040e940, 0x3?, 0x0, 0x4159fa?, 0x1) /opt/homebrew/Cellar/go/1.21.6/libexec/src/runtime/select.go:327 +0x725 fp=0xc00040e900 sp=0xc00040e7e0 pc=0x44b8e5 net/http.(*http2ClientConn).RoundTrip(0xc000446000, 0xc000662300) /opt/homebrew/Cellar/go/1.21.6/libexec/src/net/http/h2_bundle.go:8381 +0x44f fp=0xc00040ea40 sp=0xc00040e900 pc=0x6cf4cf net/http.(*http2Transport).RoundTripOpt(0xc000128360, 0xc000662300, {0x70?}) /opt/homebrew/Cellar/go/1.21.6/libexec/src/net/http/h2_bundle.go:7649 +0x1b1 fp=0xc00040eb70 sp=0xc00040ea40 pc=0x6cb431 net/http.(*http2Transport).RoundTrip(0x16b3000?, 0xc0001479c0?) /opt/homebrew/Cellar/go/1.21.6/libexec/src/net/http/h2_bundle.go:7598 +0x15 fp=0xc00040eb98 sp=0xc00040eb70 pc=0x6cafb5 net/http.(*Transport).roundTrip(0x16b3000, 0xc000662300) /opt/homebrew/Cellar/go/1.21.6/libexec/src/net/http/transport.go:602 +0x78b fp=0xc00040edc0 sp=0xc00040eb98 pc=0x6fd3eb net/http.(*Transport).RoundTrip(0x0?, 0xf98720?) /opt/homebrew/Cellar/go/1.21.6/libexec/src/net/http/roundtrip.go:17 +0x13 fp=0xc00040ede0 sp=0xc00040edc0 pc=0x6e6253 net/http.send(0xc000662300, {0xf98720, 0x16b3000}, {0x1?, 0xffffffffffffffff?, 0x0?}) /opt/homebrew/Cellar/go/1.21.6/libexec/src/net/http/client.go:260 +0x606 fp=0xc00040f010 sp=0xc00040ede0 pc=0x6a4166 net/http.(*Client).send(0x16d3380, 0xc000662300, {0xc00040f0c0?, 0x5f6bc5?, 0x0?}) /opt/homebrew/Cellar/go/1.21.6/libexec/src/net/http/client.go:181 +0x98 fp=0xc00040f088 sp=0xc00040f010 pc=0x6a39f8 net/http.(*Client).do(0x16d3380, 0xc000662300) /opt/homebrew/Cellar/go/1.21.6/libexec/src/net/http/client.go:724 +0x912 fp=0xc00040f298 sp=0xc00040f088 pc=0x6a5d32 net/http.(*Client).Do(...) /opt/homebrew/Cellar/go/1.21.6/libexec/src/net/http/client.go:590 net/http.(*Client).Get(0xf97a60?, {0xc00032f450?, 0xe5a75c?}) /opt/homebrew/Cellar/go/1.21.6/libexec/src/net/http/client.go:488 +0x5f fp=0xc00040f2f0 sp=0xc00040f298 pc=0x6a52bf net/http.Get(...) /opt/homebrew/Cellar/go/1.21.6/libexec/src/net/http/client.go:457 github.com/hexops/wrench/internal/wrench.(*Bot).httpPkgEnsureZigDownloadCached(0xc0000979a0, {0xc0005d4f5a, 0x19}, {0xe50bab, 0x4}, {0xc0005d4f49, 0x2a}) /Volumes/data/hexops/wrench/internal/wrench/http_pkg.go:417 +0x8a7 fp=0xc00040f7a0 sp=0xc00040f2f0 pc=0xc42467 ``` Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
Automatic release of main @ 020e4f4
improve Zig mirror cache warming * When a file like `zig-0.13.0-dev.351+64ef45eb0.tar.xz` is fetched, now it _also_ goes and fetches all other OS/arch/source/bootstrap/minisig files for that same Zig version - to hopefully prevent any cases where you don't have a file for an obscure os/arch, or don't have minisig files. * In the background, the system now polls for the latest index.json from both ziglang.org and machengine.org every 15 minutes, and warms the cache with all versions listed in there ahead of anyone requesting them - except for `master` / nightly Zig (as that would fill the disk quickly.) * When a mirror tries to fetch -dev versions which are listed as Mach nominated versions in index.json, it now tries to fetch from pkg.machengine.org instead of ziglang.org (since the latter generally does not have them) Previously, the `cache/zig/` directory was a flat single folder with all downloaded files inside of it with no directory structure. This made it hard to determine which versions purging might be acceptable for if e.g. the disk is full. After this change, there are subfolders with official `zig` versions, nominated `mach` versions, and `dev` nightly zig versions - making it easy to purge `dev`. Additionally, all e.g. zip/tar/etc files for a single version now get their own subfolder. For example: ``` cache/zig/stable/0.11.0/<files> cache/zig/stable/0.12.0/<files> cache/zig/stable/0.12.1/<files> cache/zig/stable/0.13.0/<files> cache/zig/dev/0.14.0-dev.14+ec337051a/<files> cache/zig/mach/0.12.0-dev.2063+804cee3b9/<files> cache/zig/mach/0.13.0-dev.351+64ef45eb0/<files> cache/zig/mach/0.12.0-dev.3180+83e578a18/<files> ``` Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
Automatic release of main @ f6925ff
release-f6925ff Fix fmt string in mirror HTML (#1)