Skip to content

Commit f02530c

Browse files
authored
CLOUD 727 bump go only for github actions (#2248)
* Revert "CLOUD-727 Bump go version 1.26 (#2245)" This reverts commit a9f16ac. * CLOUD-727 bump go in github actions
1 parent a9f16ac commit f02530c

4 files changed

Lines changed: 5 additions & 12 deletions

File tree

Jenkinsfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ pipeline {
519519
-v $WORKSPACE/src/github.com/percona/percona-server-mongodb-operator:/go/src/github.com/percona/percona-server-mongodb-operator \
520520
-w /go/src/github.com/percona/percona-server-mongodb-operator \
521521
-e GOFLAGS='-buildvcs=false' \
522-
golang:1.26 sh -c '
522+
golang:1.25 sh -c '
523523
go install github.com/google/go-licenses@v1.6.0;
524524
/go/bin/go-licenses csv github.com/percona/percona-server-mongodb-operator/cmd/manager \
525525
| cut -d , -f 3 \
@@ -547,7 +547,7 @@ pipeline {
547547
-v $WORKSPACE/src/github.com/percona/percona-server-mongodb-operator:/go/src/github.com/percona/percona-server-mongodb-operator \
548548
-w /go/src/github.com/percona/percona-server-mongodb-operator \
549549
-e GOFLAGS='-buildvcs=false' \
550-
golang:1.26 sh -c 'go build -v -o percona-server-mongodb-operator github.com/percona/percona-server-mongodb-operator/cmd/manager'
550+
golang:1.25 sh -c 'go build -v -o percona-server-mongodb-operator github.com/percona/percona-server-mongodb-operator/cmd/manager'
551551
"
552552
'''
553553

build/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ARG BASE_IMAGE=ubi10
22

3-
FROM --platform=${BUILDPLATFORM} golang:1.26 AS go_builder
3+
FROM --platform=${BUILDPLATFORM} golang:1.25 AS go_builder
44
WORKDIR /go/src/github.com/percona/percona-server-mongodb-operator
55

66
COPY go.mod go.sum ./

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/percona/percona-server-mongodb-operator
22

3-
go 1.26
3+
go 1.25.1
44

55
require (
66
github.com/Percona-Lab/percona-version-service v0.0.0-20230216094301-f9489c81b52a

pkg/psmdb/backup/pbm.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -115,22 +115,15 @@ func IsErrNoDocuments(err error) bool {
115115

116116
func getMongoUri(ctx context.Context, k8sclient client.Client, cr *psmdbv1.PerconaServerMongoDB, addrs []string, tlsEnabled bool) (string, error) {
117117
usersSecretName := psmdbv1.UserSecretName(cr)
118-
if len(addrs) == 0 {
119-
return "", errors.New("no addresses provided")
120-
}
121-
122118
scr, err := getSecret(ctx, k8sclient, cr.Namespace, usersSecretName)
123119
if err != nil {
124120
return "", errors.Wrap(err, "get secrets")
125121
}
126122

127-
// Use only the first address to avoid issues with Go's url.Parse
128-
// which doesn't support MongoDB's multi-host URI format (host1:port,host2:port).
129-
// The MongoDB driver will auto-discover other replica set members.
130123
murl := fmt.Sprintf("mongodb://%s:%s@%s/",
131124
url.QueryEscape(string(scr.Data["MONGODB_BACKUP_USER"])),
132125
url.QueryEscape(string(scr.Data["MONGODB_BACKUP_PASSWORD"])),
133-
addrs[0],
126+
strings.Join(addrs, ","),
134127
)
135128

136129
if !tlsEnabled {

0 commit comments

Comments
 (0)