Skip to content

Commit

Permalink
maintainance - bump versions (elastic#141)
Browse files Browse the repository at this point in the history
Update CI to use Go 1.21.

Update github action versions.

Update to golangci-lint v1.54.2.

Update depenency versions in go.mod.

Format code with latest gofumpt --extra.

Fix buildkite post-checkout script because it was hanging on git log waiting for feedback on stdin. Added --no-pager.
  • Loading branch information
andrewkroh authored Aug 23, 2023
1 parent 23d6218 commit 7303065
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .buildkite/hooks/post-checkout
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ MERGE_BRANCH="pr_merge_${PR_ID}"
checkout_merge "${TARGET_BRANCH}" "${PR_COMMIT}" "${MERGE_BRANCH}"

echo "Commit information"
git log --format=%B -n 1
git --no-pager log --format=%B -n 1

# Ensure buildkite groups are rendered
echo ""
2 changes: 1 addition & 1 deletion .buildkite/scripts/bench.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -euxo pipefail

go get -d -t ./...
go mod download
go mod verify

go test -count=5 -benchmem -run=XXX -benchtime=100ms -bench='.*' -v $(go list ./... | grep -v /vendor/) | tee bench.out
1 change: 0 additions & 1 deletion .buildkite/scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
set -euxo pipefail

go install github.com/elastic/go-licenser@latest
go get -d -t ./...
go mod download
go mod verify

Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,21 @@ jobs:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Read .go-version file
id: goversion
run: echo "version=$(cat .go-version)" >> $GITHUB_OUTPUT

- uses: actions/setup-go@v2
- uses: actions/setup-go@v4
with:
go-version: "${{ steps.goversion.outputs.version }}"

- name: golangci-lint
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v3
with:
version: v1.44.2
version: v1.54.2
args: --timeout=5m

# Ignore pre-existing issues.
only-new-issues: true

# Use the Go version specified in .go-version for consistency.
skip-go-installation: true
2 changes: 1 addition & 1 deletion .go-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.17.6
1.21.0
1 change: 0 additions & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ linters:
- typecheck
- unused
- varcheck
- depguard
- errorlint
- gofumpt
- goimports
Expand Down
1 change: 1 addition & 0 deletions auparse/auparse.go
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ func extractKeyValuePairs(msg string) fieldMap {
func trimQuotesAndSpace(v string) string { return strings.Trim(v, `'" `) }

// Enrichment after KV parsing.
//
//nolint:errcheck // Continue enriching even if some fields do not exist.
func (m *AuditMessage) enrichData(data fieldMap) error {
data.normalizeUnsetID("auid")
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ require (
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
github.com/stretchr/testify v1.7.0
go.uber.org/multierr v1.7.0
golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1
gopkg.in/yaml.v2 v2.3.0
golang.org/x/sys v0.11.0
gopkg.in/yaml.v2 v2.4.0
)
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw=
go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
go.uber.org/multierr v1.7.0 h1:zaiO/rmgFjbmCXdSYJWQcdvOCsthmdaHfr3Gm2Kx4Ec=
go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak=
golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1 h1:ogLJMz+qpzav7lGMh10LMvAkM/fAoGlaiiHYiFYdm80=
golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.11.0 h1:eG7RXZHdqOJ1i+0lgLgCpSXAp6M3LYlAo6osgSi0xOM=
golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.3.0 h1:clyUAQHOM3G0M3f5vQj7LuJrETvjVot3Z5el9nffUtU=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

0 comments on commit 7303065

Please sign in to comment.