Skip to content

Commit 1dc4dc9

Browse files
authored
build: update Go to version 1.23.2 (#985)
The updated staticcheck application which is needed for go 1.23 seems to have broken multi-part config file loading. The file within the plugins dir ignored a known warning about protobufs which is now triggering. Adding a top level config again suppresses it.
1 parent b30a951 commit 1dc4dc9

File tree

10 files changed

+14
-11
lines changed

10 files changed

+14
-11
lines changed

.go-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.22.6
1+
1.23.2

.golangci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ run:
88
# output configuration options
99
output:
1010
# colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number"
11-
format: colored-line-number
11+
formats: colored-line-number
1212

1313
# print lines of code with issue, default is true
1414
print-issued-lines: true

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ BUG FIXES:
44
* config: Fixed a bug where the Nomad strategy and target plugins would fail to connect to Nomad's Task API socket [[GH-966](https://github.com/hashicorp/nomad-autoscaler/pull/966)]
55

66
IMPROVEMENTS:
7+
* build: Updated to Go 1.23.2 [[GH-985](https://github.com/hashicorp/nomad-autoscaler/pull/985)]
78
* scaleutils: Add new node selector option `oldest_create_index` to select nodes with the oldest creation date [[GH-961](https://github.com/hashicorp/nomad-autoscaler/pull/961)]
89

910
## 0.4.5 (August 13, 2024)

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
# devbuild compiles the binary
1212
# -----------------------------------
13-
FROM golang:1.22 AS devbuild
13+
FROM golang:1.23 AS devbuild
1414

1515
# Disable CGO to make sure we build static binaries
1616
ENV CGO_ENABLED=0

GNUmakefile

+4-4
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ tools: lint-tools test-tools generate-tools
3232
.PHONY: generate-tools
3333
generate-tools: ## Install the tools used to generate code
3434
@echo "==> Installing code generate tools..."
35-
go install github.com/bufbuild/buf/cmd/buf@v1.27.2
35+
go install github.com/bufbuild/buf/cmd/buf@v1.45.0
3636
go install github.com/golang/protobuf/[email protected]
3737
@echo "==> Done"
3838

@@ -45,8 +45,8 @@ test-tools: ## Install the tools used to run tests
4545
.PHONY: lint-tools
4646
lint-tools: ## Install the tools used to lint
4747
@echo "==> Installing lint tools..."
48-
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.56.2
49-
go install honnef.co/go/tools/cmd/staticcheck@2023.1.3
48+
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.61.0
49+
go install honnef.co/go/tools/cmd/staticcheck@2024.1.1
5050
go install github.com/hashicorp/go-hclog/[email protected]
5151
go install github.com/hashicorp/hcl/v2/cmd/hclfmt@d0c4fa8b0bbc2e4eeccd1ed2a32c2089ed8c5cf1
5252
@echo "==> Done"
@@ -86,7 +86,7 @@ proto: ## Generate the protocol buffers
8686
lint: lint-tools generate-tools hclfmt ## Lint the source code
8787
@echo "==> Linting source code..."
8888
@GOPROXY=direct \
89-
golangci-lint run -j 1 --build-tags "$(GO_TAGS)"
89+
golangci-lint run -j 1 --build-tags "$(GO_TAGS)" --timeout=8m
9090
@staticcheck ./...
9191
@hclogvet .
9292
@buf lint --config=./tools/buf/buf.yaml

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/hashicorp/nomad-autoscaler
22

3-
go 1.22
3+
go 1.23
44

55
require (
66
github.com/Azure/azure-sdk-for-go v68.0.0+incompatible

plugins/test/noop-apm/go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/hashicorp/nomad-autoscaler/plugins/test/noop-apm
22

3-
go 1.22
3+
go 1.23
44

55
require (
66
github.com/hashicorp/go-hclog v1.6.3

plugins/test/noop-strategy/go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/hashicorp/nomad-autoscaler/plugins/test/noop-strategy
22

3-
go 1.22
3+
go 1.23
44

55
require (
66
github.com/hashicorp/go-hclog v1.6.3

plugins/test/noop-target/go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/hashicorp/nomad-autoscaler/plugins/test/noop-target
22

3-
go 1.22
3+
go 1.23
44

55
require (
66
github.com/hashicorp/go-hclog v1.6.3

staticcheck.conf

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# https://github.com/hashicorp/nomad-autoscaler/issues/984
2+
checks = ["-SA1019"]

0 commit comments

Comments
 (0)