Skip to content

Commit 23dad45

Browse files
committed
Bump default buf version from v1.45.0 to v1.66.1
buf v1.45.0 does not support buf.yaml v2 config format, which is used by canonical repos. Update to v1.66.1 across defaults, tests, docs, and examples.
1 parent 37344b3 commit 23dad45

11 files changed

Lines changed: 24 additions & 24 deletions

File tree

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@ jobs:
3838
# Install buf
3939
if [[ "${{ runner.os }}" == "Windows" ]]; then
4040
mkdir -p "$HOME/bin"
41-
curl -sSL "https://github.com/bufbuild/buf/releases/download/v1.45.0/buf-Windows-x86_64.exe" -o "$HOME/bin/buf.exe"
41+
curl -sSL "https://github.com/bufbuild/buf/releases/download/v1.66.1/buf-Windows-x86_64.exe" -o "$HOME/bin/buf.exe"
4242
chmod +x "$HOME/bin/buf.exe"
4343
echo "$HOME/bin" >> $GITHUB_PATH
4444
elif [[ "${{ runner.os }}" == "macOS" ]]; then
45-
curl -sSL "https://github.com/bufbuild/buf/releases/download/v1.45.0/buf-Darwin-arm64" -o /tmp/buf
45+
curl -sSL "https://github.com/bufbuild/buf/releases/download/v1.66.1/buf-Darwin-arm64" -o /tmp/buf
4646
chmod +x /tmp/buf
4747
sudo mv /tmp/buf /usr/local/bin/buf
4848
else
49-
curl -sSL "https://github.com/bufbuild/buf/releases/download/v1.45.0/buf-Linux-x86_64" -o /tmp/buf
49+
curl -sSL "https://github.com/bufbuild/buf/releases/download/v1.66.1/buf-Linux-x86_64" -o /tmp/buf
5050
chmod +x /tmp/buf
5151
sudo mv /tmp/buf /usr/local/bin/buf
5252
fi
@@ -132,7 +132,7 @@ jobs:
132132
env:
133133
K3D_VERSION: v5.8.3
134134
KUBECTL_VERSION: v1.32.3
135-
BUF_VERSION: v1.45.0
135+
BUF_VERSION: v1.66.1
136136

137137
steps:
138138
- uses: actions/checkout@v4

apx.example.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ release:
6666
ci_only: true
6767
tools:
6868
buf:
69-
version: v1.45.0
69+
version: v1.66.1
7070
oasdiff:
7171
version: v1.9.6
7272
spectral:

cmd/apx/apx.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ release:
4343
ci_only: true
4444
tools:
4545
buf:
46-
version: v1.45.0
46+
version: v1.66.1
4747
oasdiff:
4848
version: v1.9.6
4949
spectral:

docs/cli-reference/configuration.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ Pins specific versions of external tools used by APX.
274274
```yaml
275275
tools:
276276
buf:
277-
version: v1.45.0
277+
version: v1.66.1
278278
oasdiff:
279279
version: v1.9.6
280280
spectral:
@@ -453,7 +453,7 @@ release:
453453
454454
tools:
455455
buf:
456-
version: v1.45.0
456+
version: v1.66.1
457457
oasdiff:
458458
version: v1.9.6
459459
spectral:

docs/cli-reference/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ release:
216216
ci_only: true
217217
tools:
218218
buf:
219-
version: v1.45.0
219+
version: v1.66.1
220220
execution:
221221
mode: "local"
222222
container_image: ""

docs/troubleshooting/e2e-tests.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ exec: "buf": executable file not found in $PATH
119119
brew install bufbuild/buf/buf
120120

121121
# Linux
122-
curl -sSL "https://github.com/bufbuild/buf/releases/download/v1.45.0/buf-Linux-x86_64" -o /tmp/buf
122+
curl -sSL "https://github.com/bufbuild/buf/releases/download/v1.66.1/buf-Linux-x86_64" -o /tmp/buf
123123
chmod +x /tmp/buf
124124
sudo mv /tmp/buf /usr/local/bin/buf
125125
```

internal/config/schema.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ func DefaultConfig() *Config {
548548
Tools: Tools{
549549
Buf: struct {
550550
Version string `yaml:"version"`
551-
}{Version: "v1.45.0"},
551+
}{Version: "v1.66.1"},
552552
OASDiff: struct {
553553
Version string `yaml:"version"`
554554
}{Version: "v1.9.6"},

internal/config/validate_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ release:
7575
ci_only: true
7676
tools:
7777
buf:
78-
version: v1.45.0
78+
version: v1.66.1
7979
oasdiff:
8080
version: v1.9.6
8181
spectral:

internal/validator/download_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ func TestExpandPattern(t *testing.T) {
2323
}{
2424
{
2525
pattern: "buf-{OS}-{ARCH}.tar.gz",
26-
version: "v1.45.0",
26+
version: "v1.66.1",
2727
goos: "linux",
2828
goarch: "amd64",
2929
want: "buf-Linux-x86_64.tar.gz",
3030
},
3131
{
3232
pattern: "buf-{OS}-{ARCH}.tar.gz",
33-
version: "v1.45.0",
33+
version: "v1.66.1",
3434
goos: "darwin",
3535
goarch: "arm64",
3636
want: "buf-Darwin-aarch64.tar.gz",
@@ -53,8 +53,8 @@ func TestExpandPattern(t *testing.T) {
5353
}
5454

5555
func TestCacheDir(t *testing.T) {
56-
dir := cacheDir("buf", "v1.45.0")
57-
require.Contains(t, dir, filepath.Join(".apx", "tools", "buf", "v1.45.0"))
56+
dir := cacheDir("buf", "v1.66.1")
57+
require.Contains(t, dir, filepath.Join(".apx", "tools", "buf", "v1.66.1"))
5858
}
5959

6060
func TestExtractFromTarGz(t *testing.T) {
@@ -139,7 +139,7 @@ func TestResolveToolAutoDownload(t *testing.T) {
139139
// This test verifies that ResolveTool falls through to auto-download.
140140
// We use offline mode to test that it does NOT try downloading.
141141
resolver := NewToolchainResolver(WithOfflineMode(true))
142-
_, err := resolver.ResolveTool("buf", "v1.45.0")
142+
_, err := resolver.ResolveTool("buf", "v1.66.1")
143143
require.Error(t, err)
144144
require.Contains(t, err.Error(), "tool not found")
145145
}

internal/validator/proto.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func NewProtoValidator(resolver *ToolchainResolver) *ProtoValidator {
2222

2323
// Lint runs buf lint on proto files
2424
func (v *ProtoValidator) Lint(path string) error {
25-
bufPath, err := v.resolver.ResolveTool("buf", "v1.45.0")
25+
bufPath, err := v.resolver.ResolveTool("buf", "v1.66.1")
2626
if err != nil {
2727
return fmt.Errorf("failed to resolve buf: %w", err)
2828
}
@@ -44,7 +44,7 @@ func (v *ProtoValidator) Lint(path string) error {
4444

4545
// Breaking runs buf breaking change detection
4646
func (v *ProtoValidator) Breaking(path, against string) error {
47-
bufPath, err := v.resolver.ResolveTool("buf", "v1.45.0")
47+
bufPath, err := v.resolver.ResolveTool("buf", "v1.66.1")
4848
if err != nil {
4949
return fmt.Errorf("failed to resolve buf: %w", err)
5050
}

0 commit comments

Comments
 (0)