Skip to content

Commit 68534d3

Browse files
authored
feat: upgrade go to 1.23.5 (#25925) (#25928)
* feat: This PR updates the go toolchain from 1.22.11 to 1.23.5 (cherry picked from commit 73722a5)
1 parent 1f9b96d commit 68534d3

File tree

14 files changed

+34
-31
lines changed

14 files changed

+34
-31
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ orbs:
77
parameters:
88
cross-container-tag:
99
type: string
10-
default: go1.22.11-latest
10+
default: go1.23.5-latest
1111

1212
workflow:
1313
type: string
@@ -346,7 +346,7 @@ jobs:
346346
- run:
347347
name: staticcheck
348348
command: |
349-
go install honnef.co/go/tools/cmd/staticcheck
349+
go install honnef.co/go/tools/cmd/staticcheck@2024.1.1
350350
staticcheck ./...
351351
when: always
352352

dbrp/http_server_dbrp_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ func Test_handleGetDBRPs(t *testing.T) {
307307
}
308308

309309
if !cmp.Equal(tt.ExpectedDBRPs, dbrps.Content) {
310-
t.Fatalf(cmp.Diff(tt.ExpectedDBRPs, dbrps.Content))
310+
t.Fatal(cmp.Diff(tt.ExpectedDBRPs, dbrps.Content))
311311
}
312312

313313
})
@@ -432,7 +432,7 @@ func Test_handlePatchDBRP(t *testing.T) {
432432
}
433433

434434
if !cmp.Equal(tt.ExpectedDBRP, dbrpResponse.Content) {
435-
t.Fatalf(cmp.Diff(tt.ExpectedDBRP, dbrpResponse.Content))
435+
t.Fatal(cmp.Diff(tt.ExpectedDBRP, dbrpResponse.Content))
436436
}
437437
})
438438
}

flux/client.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package flux
33
import (
44
"context"
55
"crypto/tls"
6+
errors2 "errors"
67
"fmt"
78
"io"
89
"net/http"
@@ -78,7 +79,7 @@ func (c *Client) ping(u *url.URL) error {
7879
}
7980

8081
if resp.StatusCode != http.StatusNoContent {
81-
var err = fmt.Errorf(string(body))
82+
var err = errors2.New(string(body))
8283
return err
8384
}
8485

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
module github.com/influxdata/influxdb/v2
22

3-
go 1.22.0
3+
go 1.23.0
44

5-
toolchain go1.22.11
5+
toolchain go1.23.5
66

77
require (
88
github.com/BurntSushi/toml v1.2.1

http/check_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ func TestService_handleGetCheck(t *testing.T) {
635635
res := w.Result()
636636
content := res.Header.Get("Content-Type")
637637
body, _ := io.ReadAll(res.Body)
638-
t.Logf(res.Header.Get("X-Influx-Error"))
638+
t.Log(res.Header.Get("X-Influx-Error"))
639639

640640
if res.StatusCode != tt.wants.statusCode {
641641
t.Errorf("%q. handleGetCheck() = %v, want %v", tt.name, res.StatusCode, tt.wants.statusCode)

http/notification_endpoint_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ func TestService_handleGetNotificationEndpoint(t *testing.T) {
385385
res := w.Result()
386386
content := res.Header.Get("Content-Type")
387387
body, _ := io.ReadAll(res.Body)
388-
t.Logf(res.Header.Get("X-Influx-Error"))
388+
t.Log(res.Header.Get("X-Influx-Error"))
389389

390390
if res.StatusCode != tt.wants.statusCode {
391391
t.Errorf("%q. handleGetNotificationEndpoint() = %v, want %v", tt.name, res.StatusCode, tt.wants.statusCode)

http/resources_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func TestResourceListHandler(t *testing.T) {
5151
resp := w.Result()
5252
body, _ := io.ReadAll(resp.Body)
5353
if resp.StatusCode != http.StatusOK {
54-
t.Logf(string(body))
54+
t.Log(string(body))
5555
t.Errorf("unexpected status: %s", resp.Status)
5656
}
5757

kit/platform/id_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ func TestDecodeFromString(t *testing.T) {
7878
var id platform.ID
7979
err := id.DecodeFromString("020f755c3c082000")
8080
if err != nil {
81-
t.Errorf(err.Error())
81+
t.Error(err.Error())
8282
}
8383
want := []byte{48, 50, 48, 102, 55, 53, 53, 99, 51, 99, 48, 56, 50, 48, 48, 48}
8484
got, _ := id.Encode()
@@ -164,12 +164,12 @@ func TestMarshalling(t *testing.T) {
164164
init := "ca55e77eca55e77e"
165165
id1, err := platform.IDFromString(init)
166166
if err != nil {
167-
t.Errorf(err.Error())
167+
t.Error(err.Error())
168168
}
169169

170170
serialized, err := json.Marshal(id1)
171171
if err != nil {
172-
t.Errorf(err.Error())
172+
t.Error(err.Error())
173173
}
174174

175175
var id2 platform.ID

notification/check/threshold.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package check
22

33
import (
44
"encoding/json"
5+
errors2 "errors"
56
"fmt"
67
"strings"
78

@@ -101,7 +102,7 @@ func multiError(errs []error) error {
101102
b.WriteString(err.Error() + "\n")
102103
}
103104

104-
return fmt.Errorf(b.String())
105+
return errors2.New(b.String())
105106
}
106107

107108
// GenerateFlux returns a flux script for the threshold provided. If there

pkger/service_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5163,7 +5163,7 @@ func TestService(t *testing.T) {
51635163
}
51645164
dashSVC := mock.NewDashboardService()
51655165
dashSVC.FindDashboardsF = func(_ context.Context, f influxdb.DashboardFilter, _ influxdb.FindOptions) ([]*influxdb.Dashboard, int, error) {
5166-
if (f.IDs != nil && len(f.IDs) > 0 &&
5166+
if (len(f.IDs) > 0 &&
51675167
f.IDs[0] != nil && *f.IDs[0] != dash.ID) &&
51685168
(f.OrganizationID == nil || *f.OrganizationID != orgID) {
51695169
return nil, 0, errors.New("not suppose to get here")

0 commit comments

Comments
 (0)