Skip to content

Commit

Permalink
upgrade go version to v1.23.6 from v1.22.12 (#9328)
Browse files Browse the repository at this point in the history
  • Loading branch information
mangalaman93 authored Feb 26, 2025
1 parent f4c2345 commit 1a18a7d
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .trunk/trunk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ plugins:
# Many linters and tools depend on runtimes - configure them here. (https://docs.trunk.io/runtimes)
runtimes:
enabled:
- go@1.22.12
- go@1.23.6
- [email protected]
- [email protected]

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
###################### Stage I ######################
FROM golang:1.22.12 AS builder
FROM golang:1.23.6 AS builder
RUN apt-get update && apt-get install -y --no-install-recommends \
bzip2=1.0.8-5+b1 \
git=1:2.39.5-0+deb12u2 \
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/hypermodeinc/dgraph/v24

go 1.22.12
go 1.23.6

require (
contrib.go.opencensus.io/exporter/jaeger v0.2.1
Expand Down Expand Up @@ -54,7 +54,7 @@ require (
go.etcd.io/etcd/raft/v3 v3.5.18
go.opencensus.io v0.24.0
go.uber.org/zap v1.27.0
golang.org/x/crypto v0.33.0
golang.org/x/crypto v0.35.0
golang.org/x/exp v0.0.0-20250210185358-939b2ce775ac
golang.org/x/mod v0.23.0
golang.org/x/net v0.35.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -646,8 +646,8 @@ golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8U
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58=
golang.org/x/crypto v0.33.0 h1:IOBPskki6Lysi0lo9qQvbxiQ+FvsCC/YWOecCHAixus=
golang.org/x/crypto v0.33.0/go.mod h1:bVdXmD7IV/4GdElGPozy6U7lWdRXA4qyRVGJV57uQ5M=
golang.org/x/crypto v0.35.0 h1:b15kiHdrGCHrP6LvwaQ3c03kgNhhiMgvlhxHQhmg2Xs=
golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ=
golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
Expand Down
2 changes: 1 addition & 1 deletion graphql/e2e/custom_logic/cmd/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/hypermodeinc/dgraph/graphql/e2e/custom_logic/cmd

go 1.22.12
go 1.23.6

require (
github.com/graph-gophers/graphql-go v1.5.0
Expand Down
5 changes: 2 additions & 3 deletions t/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# linux || darwin
GOOS ?= $(shell go env GOOS)
GOPATH ?= $(shell go env GOPATH)
MIN_GO_VERSION = "1.22.12"
MIN_GO_VERSION = "1.23.6"

all: test

Expand All @@ -26,10 +26,9 @@ check:
echo "Error: dgraph binary not found in $(GOPATH)/bin" && exit 1; \
fi
@echo "The dgraph binary is a Linux executable (as required)"


.PHONY: test
test: check
test: check
# build the t.go binary
@go build .
# clean go testcache
Expand Down
15 changes: 0 additions & 15 deletions types/scalar_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
package types

import (
"errors"
"math/big"
"time"

Expand Down Expand Up @@ -221,20 +220,6 @@ func GoodTimeZone(offset int) bool {
// ParseTime parses the time from string trying various datetime formats.
// By default, Go parses time in UTC unless specified in the data itself.
func ParseTime(val string) (time.Time, error) {
t, err := parseTimeNonStrict(val)
if err != nil {
return t, err
}

_, offset := t.Zone()
if !GoodTimeZone(offset) {
return time.Time{}, errors.New("timezone outside of range [-23:59,23:59]")
}

return t, nil
}

func parseTimeNonStrict(val string) (time.Time, error) {
if len(val) == len(dateFormatY) {
return time.Parse(dateFormatY, val)
}
Expand Down
8 changes: 4 additions & 4 deletions types/scalar_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ var datesWithTz = []struct {
var datesWithInvalidTz = []struct {
in string
}{
{in: "2018-05-28T14:41:57+24:00"},
{in: "2018-05-28T14:41:57+25:00"},
{in: "2018-05-28T14:41:57+30:00"},
{in: "2018-05-28T14:41:57-24:00"},
{in: "2018-05-28T14:41:57-25:01"},
{in: "2018-05-28T14:41:57-30:00"},
}

Expand Down Expand Up @@ -144,8 +144,8 @@ func TestParseTimeRejection(t *testing.T) {
func TestParseTimeNonRFC3339(t *testing.T) {
for _, tc := range datesWithInvalidTz {
out, err := ParseTime(tc.in)
require.Equal(t, out, time.Time{})
require.EqualError(t, err, "timezone outside of range [-23:59,23:59]")
require.Equal(t, time.Time{}, out)
require.ErrorContains(t, err, "time zone offset hour out of range")
}
}

Expand Down

0 comments on commit 1a18a7d

Please sign in to comment.