Upgrade Go to 1.25 (#6011)

* Upgrade Go to 1.25

* Upgrade to golangci-lint v2

* Remove use of apt-key
This commit is contained in:
Johan Brandhorst-Satzkorn authored and GitHub committed 2025-09-02 18:27:22 -04:00
1 parent 6d32c4e6cd
commit 30d97687b5
17 files changed
+117 -95

No files matched your search

+1 -1
View File
@@ -1 +1 @@
1.24.4 1.25.0
+89 -73
View File
@@ -1,77 +1,93 @@
version: "2"
linters: linters:
disable-all: true default: none
enable: enable:
- staticcheck - bodyclose
- stylecheck
- errcheck - errcheck
- misspell - misspell
- bodyclose - staticcheck
exclusions:
issues: generated: lax
exclude-rules: presets:
- linters: - comments
- stylecheck - common-false-positives
text: "ST1005:" - legacy
- linters: - std-error-handling
- stylecheck rules:
text: "ST1003:" - linters:
- linters: - staticcheck
- staticcheck text: 'ST1005:'
text: "SA1019: pbs.AuthorizedWorkerList is deprecated:" - linters:
- linters: - staticcheck
- staticcheck text: 'ST1003:'
text: "SA1019: item.GetGrantScopeId is deprecated:" - linters:
- linters: - staticcheck
- staticcheck text: 'SA1019: pbs.AuthorizedWorkerList is deprecated:'
text: "SA1019: out.GrantScopeId is deprecated:" - linters:
- linters: - staticcheck
- staticcheck text: 'SA1019: item.GetGrantScopeId is deprecated:'
text: "SA1019: authorized.GetWorkerKeyIdentifiers is deprecated:" - linters:
- linters: - staticcheck
- staticcheck text: 'SA1019: out.GrantScopeId is deprecated:'
text: "SA1019: result.GetAuthorizedWorkers is deprecated:" - linters:
- linters: - staticcheck
- staticcheck text: 'SA1019: authorized.GetWorkerKeyIdentifiers is deprecated:'
text: "SA1019: item.GetWorkerFilter is deprecated:" - linters:
- linters: - staticcheck
- staticcheck text: 'SA1019: result.GetAuthorizedWorkers is deprecated:'
text: "SA1019: out.GetWorkerFilter is deprecated:" - linters:
- linters: - staticcheck
- staticcheck text: 'SA1019: item.GetWorkerFilter is deprecated:'
text: "SA1019: out.WorkerFilter is deprecated:" - linters:
- linters: - staticcheck
- staticcheck text: 'SA1019: out.GetWorkerFilter is deprecated:'
text: "SA1019: req.GetTokenType is deprecated:" - linters:
- linters: - staticcheck
- staticcheck text: 'SA1019: out.WorkerFilter is deprecated:'
text: "SA1019: s.resp.GetPkcs8HostKeys is deprecated:" - linters:
- linters: - staticcheck
- staticcheck text: 'SA1019: req.GetTokenType is deprecated:'
text: "SA1019: s.resp.GetCredentials is deprecated:" - linters:
- linters: - staticcheck
- staticcheck text: 'SA1019: s.resp.GetPkcs8HostKeys is deprecated:'
text: 'SA1019: got.GetAuthorizedWorkers is deprecated:' - linters:
- linters: - staticcheck
- staticcheck text: 'SA1019: s.resp.GetCredentials is deprecated:'
text: 'SA1019: gotAuthorizedWorkers.GetWorkerKeyIdentifiers is deprecated:' - linters:
- linters: - staticcheck
- staticcheck text: 'SA1019: got.GetAuthorizedWorkers is deprecated:'
text: 'SA1019: tc.want.GetAuthorizedWorkers is deprecated:' - linters:
- linters: - staticcheck
- staticcheck text: 'SA1019: gotAuthorizedWorkers.GetWorkerKeyIdentifiers is deprecated:'
text: 'SA1019: wantAuthorizedWorkers.GetWorkerKeyIdentifiers is deprecated:' - linters:
- linters: - staticcheck
- staticcheck text: 'SA1019: tc.want.GetAuthorizedWorkers is deprecated:'
text: "SA1019: authorizedWorkerList.WorkerKeyIdentifiers is deprecated:" - linters:
- linters: - staticcheck
- staticcheck text: 'SA1019: wantAuthorizedWorkers.GetWorkerKeyIdentifiers is deprecated:'
text: "SA1019: req.GetConnectedWorkerKeyIdentifiers is deprecated:" - linters:
- linters: - staticcheck
- staticcheck text: 'SA1019: authorizedWorkerList.WorkerKeyIdentifiers is deprecated:'
text: "SA1019: j.GetId is deprecated:" - linters:
- linters: - staticcheck
- staticcheck text: 'SA1019: req.GetConnectedWorkerKeyIdentifiers is deprecated:'
text: "SA1019: pbs.StatusRequest is deprecated:" - linters:
- linters: - staticcheck
- staticcheck text: 'SA1019: j.GetId is deprecated:'
text: "SA1019: pbs.StatusResponse is deprecated:" - linters:
- staticcheck
text: 'SA1019: pbs.StatusRequest is deprecated:'
- linters:
- staticcheck
text: 'SA1019: pbs.StatusResponse is deprecated:'
paths:
- third_party$
- builtin$
- examples$
formatters:
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
+1 -1
View File
@@ -37,7 +37,7 @@ golangci-lint:
if [ "$(GOLINT_INSTALLED)" = "" ]; then \ if [ "$(GOLINT_INSTALLED)" = "" ]; then \
curl -sSfL \ curl -sSfL \
https://raw.githubusercontent.com/golangci/golangci-lint/3f6f9043a8d0048ec075d2ace970b256cdf37a96/install.sh | sh -s -- -b $(GO_PATH)/bin v1.64.7; \ https://raw.githubusercontent.com/golangci/golangci-lint/3f6f9043a8d0048ec075d2ace970b256cdf37a96/install.sh | sh -s -- -b $(GO_PATH)/bin v2.4.0; \
fi; fi;
.PHONY: cleangen .PHONY: cleangen
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/hashicorp/boundary/api module github.com/hashicorp/boundary/api
go 1.24.0 go 1.25.0
require ( require (
github.com/coder/websocket v1.8.13 github.com/coder/websocket v1.8.13
+13 -7
View File
@@ -17,16 +17,22 @@ apt update
# default-mysql-client is used for mysql tests # default-mysql-client is used for mysql tests
# wget is used for downloading external dependencies and repository keys # wget is used for downloading external dependencies and repository keys
# apt-transport-https enables HTTPS transport for APT repositories # apt-transport-https enables HTTPS transport for APT repositories
apt install unzip pass lsb-release postgresql-client default-mysql-client wget apt-transport-https -y apt install unzip pass lsb-release postgresql-client default-mysql-client wget apt-transport-https -y
# Function to install Cassandra # Function to install Cassandra
install_cassandra() { install_cassandra() {
# Add Cassandra repository key # Add Cassandra repository key
wget -q -O - https://www.apache.org/dist/cassandra/KEYS | apt-key add - wget -O cassandra.keys https://www.apache.org/dist/cassandra/KEYS
# Convert key to gpg format
gpg --no-default-keyring --keyring ./temp-keyring.gpg --import cassandra.keys
gpg --no-default-keyring --keyring ./temp-keyring.gpg --export --output cassandra.gpg
rm ./temp-keyring.gpg cassandra.keys
mv cassandra.gpg /etc/apt/keyrings/cassandra.gpg
# Add Cassandra repository # Add Cassandra repository
echo "deb https://debian.cassandra.apache.org 41x main" | tee -a /etc/apt/sources.list.d/cassandra.sources.list echo "deb [signed-by=/etc/apt/keyrings/cassandra.gpg] https://debian.cassandra.apache.org 41x main" | tee -a /etc/apt/sources.list.d/cassandra.sources.list
# Update package list and install Cassandra # Update package list and install Cassandra
apt update apt update
apt install cassandra -y apt install cassandra -y
@@ -40,9 +46,9 @@ install_cassandra
export KEY_PW=boundary export KEY_PW=boundary
gpg --generate-key --batch <<eoGpgConf gpg --generate-key --batch <<eoGpgConf
%echo Started! %echo Started!
Key-Type: default Key-Type: RSA
Key-Length: default Key-Length: default
Subkey-Type: default Subkey-Type: RSA
Name-Real: boundary Name-Real: boundary
Name-Comment: default Name-Comment: default
Name-Email: default Name-Email: default
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/hashicorp/boundary module github.com/hashicorp/boundary
go 1.24.4 go 1.25.0
replace github.com/hashicorp/boundary/api => ./api replace github.com/hashicorp/boundary/api => ./api
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/hashicorp/boundary/plugins/boundary/mains/aws module github.com/hashicorp/boundary/plugins/boundary/mains/aws
go 1.24.0 go 1.25.0
require ( require (
github.com/hashicorp/boundary-plugin-aws v0.5.1 github.com/hashicorp/boundary-plugin-aws v0.5.1
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/hashicorp/boundary/plugins/boundary/mains/azure module github.com/hashicorp/boundary/plugins/boundary/mains/azure
go 1.24.0 go 1.25.0
require ( require (
github.com/hashicorp/boundary-plugin-azure v0.2.0 github.com/hashicorp/boundary-plugin-azure v0.2.0
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/hashicorp/boundary/plugins/boundary/mains/gcp module github.com/hashicorp/boundary/plugins/boundary/mains/gcp
go 1.24.0 go 1.25.0
require ( require (
github.com/hashicorp/boundary-plugin-gcp v0.1.0 github.com/hashicorp/boundary-plugin-gcp v0.1.0
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/hashicorp/boundary/plugins/boundary/mains/minio module github.com/hashicorp/boundary/plugins/boundary/mains/minio
go 1.24.0 go 1.25.0
require ( require (
github.com/hashicorp/boundary-plugin-minio v0.1.7 github.com/hashicorp/boundary-plugin-minio v0.1.7
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/hashicorp/boundary/plugins/kms/mains/alicloudkms module github.com/hashicorp/boundary/plugins/kms/mains/alicloudkms
go 1.24.0 go 1.25.0
require ( require (
github.com/hashicorp/go-kms-wrapping/plugin/v2 v2.0.8 github.com/hashicorp/go-kms-wrapping/plugin/v2 v2.0.8
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/hashicorp/boundary/plugins/kms/mains/awskms module github.com/hashicorp/boundary/plugins/kms/mains/awskms
go 1.24.0 go 1.25.0
require ( require (
github.com/hashicorp/go-kms-wrapping/plugin/v2 v2.0.8 github.com/hashicorp/go-kms-wrapping/plugin/v2 v2.0.8
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/hashicorp/boundary/plugins/kms/mains/azurekeyvault module github.com/hashicorp/boundary/plugins/kms/mains/azurekeyvault
go 1.24.0 go 1.25.0
require ( require (
github.com/hashicorp/go-kms-wrapping/plugin/v2 v2.0.8 github.com/hashicorp/go-kms-wrapping/plugin/v2 v2.0.8
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/hashicorp/boundary/plugins/kms/mains/gcpckms module github.com/hashicorp/boundary/plugins/kms/mains/gcpckms
go 1.24.0 go 1.25.0
require ( require (
github.com/hashicorp/go-kms-wrapping/plugin/v2 v2.0.8 github.com/hashicorp/go-kms-wrapping/plugin/v2 v2.0.8
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/hashicorp/boundary/plugins/kms/mains/ocikms module github.com/hashicorp/boundary/plugins/kms/mains/ocikms
go 1.24.0 go 1.25.0
require ( require (
github.com/hashicorp/go-kms-wrapping/plugin/v2 v2.0.8 github.com/hashicorp/go-kms-wrapping/plugin/v2 v2.0.8
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/hashicorp/boundary/plugins/kms/mains/transit module github.com/hashicorp/boundary/plugins/kms/mains/transit
go 1.24.0 go 1.25.0
require ( require (
github.com/hashicorp/go-kms-wrapping/plugin/v2 v2.0.8 github.com/hashicorp/go-kms-wrapping/plugin/v2 v2.0.8
+1 -1
View File
@@ -1,6 +1,6 @@
module github.com/hashicorp/boundary/sdk module github.com/hashicorp/boundary/sdk
go 1.24.0 go 1.25.0
require ( require (
github.com/coder/websocket v1.8.13 github.com/coder/websocket v1.8.13