Skip to content

Commit afc4fcb

Browse files
authored
Merge pull request #519 from agelostsal/upgrade/go125
Upgrade Golang to version 1.25
2 parents a6f4c11 + 6184b6d commit afc4fcb

27 files changed

Lines changed: 193 additions & 192 deletions

‎Jenkinsfile‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
pipeline {
22
agent {
33
docker {
4-
image 'argo.registry:5000/epel-7-go1.21'
4+
image 'argo.registry:5000/rocky9-go1.25:latest'
55
args '-u jenkins:jenkins'
66
}
77
}
@@ -13,6 +13,8 @@ pipeline {
1313
PROJECT_DIR="argo-messaging"
1414
GH_USER = 'newgrnetci'
1515
GH_EMAIL = '<argo@grnet.gr>'
16+
GOCACHE = '/tmp/go-cache'
17+
GOMODCACHE = '/tmp/go-mod-cache'
1618
GOPATH="${WORKSPACE}/go"
1719
GIT_COMMIT=sh(script: "cd ${WORKSPACE}/$PROJECT_DIR && git log -1 --format=\"%H\"",returnStdout: true).trim()
1820
GIT_COMMIT_HASH=sh(script: "cd ${WORKSPACE}/$PROJECT_DIR && git log -1 --format=\"%H\" | cut -c1-7",returnStdout: true).trim()
@@ -23,6 +25,7 @@ pipeline {
2325
steps {
2426
echo 'Build...'
2527
sh """
28+
go version
2629
mkdir -p ${WORKSPACE}/go/src/github.com/ARGOeu
2730
ln -sf ${WORKSPACE}/${PROJECT_DIR} ${WORKSPACE}/go/src/github.com/ARGOeu/${PROJECT_DIR}
2831
rm -rf ${WORKSPACE}/go/src/github.com/ARGOeu/${PROJECT_DIR}/${PROJECT_DIR}
@@ -45,8 +48,8 @@ pipeline {
4548
echo 'Test & Coverage...'
4649
sh """
4750
cd ${WORKSPACE}/go/src/github.com/ARGOeu/${PROJECT_DIR}
48-
gocov test -p 1 \$(go list ./... | grep -v /vendor/) | gocov-xml > ${WORKSPACE}/coverage.xml
49-
go test -p 1 \$(go list ./... | grep -v /vendor/) -v=1 | go-junit-report > ${WORKSPACE}/junit.xml
51+
gotestsum --junitfile ${WORKSPACE}/junit.xml -- -p 1 -v -coverprofile=coverage.out ./...
52+
gocover-cobertura < coverage.out > ${WORKSPACE}/coverage.xml
5053
"""
5154
junit '**/junit.xml'
5255
cobertura coberturaReportFile: '**/coverage.xml'

‎Makefile‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,6 @@ go-test:
3030
go get github.com/AlekSi/gocov-xml && \
3131
${GOPATH}/bin/gocov test ${GOFILES_NOVENDOR} | ${GOPATH}/bin/gocov-xml > ${APPDIR}/coverage.xml &&\
3232
chown ${hostUID} ${APPDIR}/coverage.xml
33+
34+
clean:
35+
@echo "Clean target - nothing to clean"

‎auth/auth_test.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package auth
33
import (
44
"context"
55
"errors"
6-
"io/ioutil"
6+
"io"
77
"testing"
88
"time"
99

@@ -27,7 +27,7 @@ func (suite *AuthTestSuite) SetupTest() {
2727
"store_host":"localhost",
2828
"store_db":"argo_msg"
2929
}`
30-
log.SetOutput(ioutil.Discard)
30+
log.SetOutput(io.Discard)
3131
}
3232

3333
func (suite *AuthTestSuite) TestAuth() {

‎config/config.go‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"encoding/json"
55
"errors"
66
"fmt"
7+
"io"
78
"strconv"
89
"time"
910

@@ -14,7 +15,6 @@ import (
1415
lSyslog "github.com/sirupsen/logrus/hooks/syslog"
1516
"github.com/spf13/pflag"
1617
"github.com/spf13/viper"
17-
"io/ioutil"
1818
"log/syslog"
1919
"os"
2020
"path/filepath"
@@ -219,7 +219,7 @@ func (cfg *APICfg) LoadCAs() (roots *x509.CertPool) {
219219
}
220220

221221
if ok, _ := filepath.Match(pattern, info.Name()); ok {
222-
bytes, err := ioutil.ReadFile(filepath.Join(cfg.CertificateAuthoritiesDir, info.Name()))
222+
bytes, err := os.ReadFile(filepath.Join(cfg.CertificateAuthoritiesDir, info.Name()))
223223
if err != nil {
224224
return err
225225
}
@@ -294,7 +294,7 @@ func setLogFacilities(facilities []string) {
294294

295295
// if the console option has not been specified close the standard logging
296296
if !consoleEnabled {
297-
log.SetOutput(ioutil.Discard)
297+
log.SetOutput(io.Discard)
298298
}
299299
}
300300

‎config/config_test.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package config
22

33
import (
4-
"io/ioutil"
4+
"io"
55
"testing"
66

77
log "github.com/sirupsen/logrus"
@@ -122,6 +122,6 @@ func (suite *ConfigTestSuite) TestAuthOption() {
122122
}
123123

124124
func TestConfigTestSuite(t *testing.T) {
125-
log.SetOutput(ioutil.Discard)
125+
log.SetOutput(io.Discard)
126126
suite.Run(t, new(ConfigTestSuite))
127127
}

‎go.mod‎

Lines changed: 33 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
module github.com/ARGOeu/argo-messaging
22

3-
go 1.21
3+
go 1.25
44

55
require (
6-
github.com/IBM/sarama v1.42.1
7-
github.com/golang/protobuf v1.5.3
6+
github.com/IBM/sarama v1.45.2
7+
github.com/golang/protobuf v1.5.4
88
github.com/gorilla/context v1.1.2
99
github.com/gorilla/handlers v1.5.2
1010
github.com/gorilla/mux v1.8.1
1111
github.com/linkedin/goavro v2.1.0+incompatible
1212
github.com/samuel/go-zookeeper v0.0.0-20201211165307-7117e9ea2414
1313
github.com/sirupsen/logrus v1.9.3
14-
github.com/spf13/pflag v1.0.5
15-
github.com/spf13/viper v1.18.2
16-
github.com/stretchr/testify v1.8.4
14+
github.com/spf13/pflag v1.0.7
15+
github.com/spf13/viper v1.20.1
16+
github.com/stretchr/testify v1.10.0
1717
github.com/testcontainers/testcontainers-go v0.24.1
1818
github.com/twinj/uuid v1.0.0
1919
github.com/xeipuuv/gojsonschema v1.2.0
20-
go.mongodb.org/mongo-driver v1.13.1
21-
google.golang.org/grpc v1.61.0
20+
go.mongodb.org/mongo-driver v1.17.4
21+
google.golang.org/grpc v1.75.0
2222
gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22
2323
)
2424

@@ -35,28 +35,27 @@ require (
3535
github.com/docker/docker v24.0.6+incompatible // indirect
3636
github.com/docker/go-connections v0.4.0 // indirect
3737
github.com/docker/go-units v0.5.0 // indirect
38-
github.com/eapache/go-resiliency v1.5.0 // indirect
38+
github.com/eapache/go-resiliency v1.7.0 // indirect
3939
github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 // indirect
4040
github.com/eapache/queue v1.1.0 // indirect
4141
github.com/felixge/httpsnoop v1.0.4 // indirect
42-
github.com/fsnotify/fsnotify v1.7.0 // indirect
42+
github.com/fsnotify/fsnotify v1.9.0 // indirect
4343
github.com/go-ole/go-ole v1.2.6 // indirect
44+
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
4445
github.com/gogo/protobuf v1.3.2 // indirect
45-
github.com/golang/snappy v0.0.4 // indirect
46-
github.com/google/uuid v1.4.0 // indirect
46+
github.com/golang/snappy v1.0.0 // indirect
47+
github.com/google/uuid v1.6.0 // indirect
4748
github.com/hashicorp/errwrap v1.1.0 // indirect
4849
github.com/hashicorp/go-multierror v1.1.1 // indirect
4950
github.com/hashicorp/go-uuid v1.0.3 // indirect
50-
github.com/hashicorp/hcl v1.0.0 // indirect
5151
github.com/jcmturner/aescts/v2 v2.0.0 // indirect
5252
github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect
5353
github.com/jcmturner/gofork v1.7.6 // indirect
5454
github.com/jcmturner/gokrb5/v8 v8.4.4 // indirect
5555
github.com/jcmturner/rpc/v2 v2.0.3 // indirect
56-
github.com/klauspost/compress v1.17.5 // indirect
56+
github.com/klauspost/compress v1.18.0 // indirect
5757
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
58-
github.com/magiconair/properties v1.8.7 // indirect
59-
github.com/mitchellh/mapstructure v1.5.0 // indirect
58+
github.com/magiconair/properties v1.8.10 // indirect
6059
github.com/moby/patternmatcher v0.5.0 // indirect
6160
github.com/moby/sys/sequential v0.5.0 // indirect
6261
github.com/moby/term v0.5.0 // indirect
@@ -66,19 +65,18 @@ require (
6665
github.com/opencontainers/go-digest v1.0.0 // indirect
6766
github.com/opencontainers/image-spec v1.1.0-rc4 // indirect
6867
github.com/opencontainers/runc v1.1.5 // indirect
69-
github.com/pelletier/go-toml/v2 v2.1.1 // indirect
70-
github.com/pierrec/lz4/v4 v4.1.21 // indirect
68+
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
69+
github.com/pierrec/lz4/v4 v4.1.22 // indirect
7170
github.com/pkg/errors v0.9.1 // indirect
7271
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
7372
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
74-
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
75-
github.com/sagikazarmark/locafero v0.4.0 // indirect
76-
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
73+
github.com/rcrowley/go-metrics v0.0.0-20250401214520-65e299d6c5c9 // indirect
74+
github.com/sagikazarmark/locafero v0.10.0 // indirect
7775
github.com/shirou/gopsutil/v3 v3.23.7 // indirect
7876
github.com/shoenig/go-m1cpu v0.1.6 // indirect
79-
github.com/sourcegraph/conc v0.3.0 // indirect
80-
github.com/spf13/afero v1.11.0 // indirect
81-
github.com/spf13/cast v1.6.0 // indirect
77+
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect
78+
github.com/spf13/afero v1.14.0 // indirect
79+
github.com/spf13/cast v1.9.2 // indirect
8280
github.com/subosito/gotenv v1.6.0 // indirect
8381
github.com/tklauser/go-sysconf v0.3.11 // indirect
8482
github.com/tklauser/numcpus v0.6.0 // indirect
@@ -87,20 +85,18 @@ require (
8785
github.com/xdg-go/stringprep v1.0.4 // indirect
8886
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
8987
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
90-
github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a // indirect
88+
github.com/youmark/pkcs8 v0.0.0-20240726163527-a2c0da244d78 // indirect
9189
github.com/yusufpapurcu/wmi v1.2.3 // indirect
92-
go.uber.org/multierr v1.11.0 // indirect
93-
golang.org/x/crypto v0.18.0 // indirect
94-
golang.org/x/exp v0.0.0-20240119083558-1b970713d09a // indirect
95-
golang.org/x/mod v0.14.0 // indirect
96-
golang.org/x/net v0.20.0 // indirect
97-
golang.org/x/sync v0.6.0 // indirect
98-
golang.org/x/sys v0.16.0 // indirect
99-
golang.org/x/text v0.14.0 // indirect
100-
golang.org/x/tools v0.17.0 // indirect
101-
google.golang.org/genproto/googleapis/rpc v0.0.0-20240125205218-1f4bbc51befe // indirect
102-
google.golang.org/protobuf v1.32.0 // indirect
103-
gopkg.in/ini.v1 v1.67.0 // indirect
90+
golang.org/x/crypto v0.41.0 // indirect
91+
golang.org/x/exp v0.0.0-20250408133849-7e4ce0ab07d0 // indirect
92+
golang.org/x/mod v0.26.0 // indirect
93+
golang.org/x/net v0.43.0 // indirect
94+
golang.org/x/sync v0.16.0 // indirect
95+
golang.org/x/sys v0.35.0 // indirect
96+
golang.org/x/text v0.28.0 // indirect
97+
golang.org/x/tools v0.35.0 // indirect
98+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250818200422-3122310a409c // indirect
99+
google.golang.org/protobuf v1.36.8 // indirect
104100
gopkg.in/linkedin/goavro.v1 v1.0.5 // indirect
105101
gopkg.in/stretchr/testify.v1 v1.2.2 // indirect
106102
gopkg.in/yaml.v3 v3.0.1 // indirect

0 commit comments

Comments
 (0)