Skip to content

Commit

Permalink
chore: upgrade go 1.20 to 1.21 (#7657)
Browse files Browse the repository at this point in the history
* replace golang.org/x/exp/slices with slices
  • Loading branch information
hamidzr authored Aug 28, 2023
1 parent 0553f19 commit cf57ce4
Show file tree
Hide file tree
Showing 22 changed files with 30 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ commands:
reinstall-go:
steps:
- run: sudo rm -rf /usr/local/go # Remove system go.
- run: tools/scripts/retry.sh curl --retry-connrefused --retry 10 https://dl.google.com/go/go1.20.linux-amd64.tar.gz -o /tmp/go.linux-amd64.tar.gz
- run: tools/scripts/retry.sh curl --retry-connrefused --retry 10 https://dl.google.com/go/go1.21.0.linux-amd64.tar.gz -o /tmp/go.linux-amd64.tar.gz
- run: sudo tar -C /usr/local -xzf /tmp/go.linux-amd64.tar.gz
- run: echo 'export PATH=$PATH:$HOME/go/bin' >> $BASH_ENV

Expand Down
2 changes: 1 addition & 1 deletion agent/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/determined-ai/determined/agent

go 1.20
go 1.21

require (
github.com/determined-ai/determined/master v0.0.0
Expand Down
8 changes: 8 additions & 0 deletions agent/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs=
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY=
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4=
github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ=
github.com/casbin/casbin/v2 v2.31.2/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg=
github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM=
Expand Down Expand Up @@ -211,6 +212,7 @@ github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI=
github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
github.com/getkin/kin-openapi v0.76.0/go.mod h1:660oXbgy5JFMKreazJaQTw7o+X00qeSyhcnluiMv+Xg=
github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
Expand Down Expand Up @@ -253,8 +255,10 @@ github.com/go-pg/zerochecker v0.2.0 h1:pp7f72c3DobMWOb2ErtZsnrPaSvHd2W4o9//8HtF4
github.com/go-pg/zerochecker v0.2.0/go.mod h1:NJZ4wKL0NmTtz0GKCoJ8kym6Xn/EQzXRl2OnAe7MmDo=
github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE=
github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/go-test/deep v1.1.0 h1:WOcxcdHcvdgThNXjw0t76K42FXTU7HpNQWHpA2HHNlg=
github.com/go-test/deep v1.1.0/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE=
github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw=
github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
Expand Down Expand Up @@ -511,6 +515,7 @@ github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFB
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0=
github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA=
github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw=
Expand Down Expand Up @@ -1310,6 +1315,7 @@ google.golang.org/grpc v1.45.0 h1:NEpgUqV3Z+ZjkqMsxMg11IaDrXY4RY6CQukSGK0uI1M=
google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ=
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
google.golang.org/grpc/examples v0.0.0-20210525230658-4bae49e05b28 h1:Xql1b4AopIdmpkWVrigy9ibSjrZ4HE1ZjMIj5mMSEcE=
google.golang.org/grpc/examples v0.0.0-20210525230658-4bae49e05b28/go.mod h1:bF8wuZSAZTcbF7ZPKrDI/qY52toTP/yxLpRRY4Eu9Js=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
Expand All @@ -1331,6 +1337,7 @@ gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
Expand Down Expand Up @@ -1365,6 +1372,7 @@ gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo=
gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw=
gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk=
gotest.tools/v3 v3.3.0 h1:MfDY1b1/0xN1CyMlQDac0ziEy9zJQd9CXBRRDHw2jJo=
gotest.tools/v3 v3.3.0/go.mod h1:Mcr9QNxkg0uMvy/YElmo4SpXgJKWgQvYrT7Kw5RzJ1A=
honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
Expand Down
2 changes: 1 addition & 1 deletion agent/internal/container/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ package container
import (
"context"
"fmt"
"slices"
"strings"
"sync"
"syscall"

"github.com/pkg/errors"
"golang.org/x/exp/slices"

"github.com/sirupsen/logrus"

Expand Down
2 changes: 1 addition & 1 deletion agent/internal/containers/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ package containers
import (
"fmt"
"path/filepath"
"slices"
"strconv"
"strings"

dcontainer "github.com/docker/docker/api/types/container"

"github.com/docker/docker/api/types"
"github.com/pkg/errors"
"golang.org/x/exp/slices"

"github.com/determined-ai/determined/agent/internal/container"
"github.com/determined-ai/determined/agent/internal/detect"
Expand Down
2 changes: 1 addition & 1 deletion agent/pkg/cruntimes/crutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ import (
"path"
"path/filepath"
"regexp"
"slices"
"strings"

"github.com/docker/docker/pkg/stdcopy"
"github.com/sirupsen/logrus"
"golang.org/x/exp/slices"

"github.com/determined-ai/determined/agent/pkg/docker"
"github.com/determined-ai/determined/agent/pkg/events"
Expand Down
4 changes: 2 additions & 2 deletions docs/setup-cluster/deploy-cluster/k8s/k8s-dev-guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ dependencies:
DEBIAN_FRONTEND=noninteractive add-apt-repository -y ppa:deadsnakes/ppa
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends git-all python3.8-dev python3.8-venv default-jre curl build-essential libkrb5-dev unzip jq
# Download and install Go 1.20.
curl -L https://go.dev/dl/go1.20.linux-amd64.tar.gz | tar -xz
# Download and install Go 1.21.
curl -L https://go.dev/dl/go1.21.0.linux-amd64.tar.gz | tar -xz
chown -R root:root go
mv go /usr/local/
Expand Down
2 changes: 1 addition & 1 deletion go.work
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
go 1.20
go 1.21

use (
./agent
Expand Down
2 changes: 1 addition & 1 deletion master/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/determined-ai/determined/master

go 1.20
go 1.21

require (
cloud.google.com/go v0.94.0
Expand Down
3 changes: 1 addition & 2 deletions master/internal/api_experiment.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"fmt"
"math"
"net/http"
"slices"
"sort"
"strconv"
"strings"
Expand All @@ -15,8 +16,6 @@ import (

"github.com/determined-ai/determined/master/internal/job/jobservice"

"golang.org/x/exp/slices"

"github.com/labstack/echo/v4"
"github.com/uptrace/bun"

Expand Down
2 changes: 1 addition & 1 deletion master/internal/api_tasks.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ package internal
import (
"context"
"fmt"
"slices"
"strings"
"time"

structpb "github.com/golang/protobuf/ptypes/struct"
"github.com/pkg/errors"
"golang.org/x/exp/slices"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"

Expand Down
2 changes: 1 addition & 1 deletion master/internal/api_trials.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ import (
"context"
"fmt"
"math"
"slices"
"sort"
"strings"
"time"

"github.com/hashicorp/go-multierror"
"github.com/pkg/errors"
"golang.org/x/exp/slices"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/encoding/protojson"
Expand Down
2 changes: 1 addition & 1 deletion master/internal/command/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package command
import (
"context"
"fmt"
"slices"
"time"

"github.com/determined-ai/determined/master/internal/job/jobservice"

"golang.org/x/exp/slices"
"google.golang.org/protobuf/types/known/timestamppb"

"github.com/determined-ai/determined/master/pkg/cproto"
Expand Down
2 changes: 1 addition & 1 deletion master/internal/db/postgres_tasks_intg_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import (
"go/parser"
"go/token"
"reflect"
"slices"
"strings"
"testing"
"time"

"github.com/shopspring/decimal"
"golang.org/x/exp/slices"

"github.com/stretchr/testify/require"

Expand Down
2 changes: 1 addition & 1 deletion master/internal/experiment/bulk_action.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"context"
"database/sql"
"fmt"
"slices"
"strconv"
"strings"

"golang.org/x/exp/slices"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"

Expand Down
3 changes: 1 addition & 2 deletions master/internal/job/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ package job

import (
"fmt"
"slices"
"sort"
"strings"
"sync"

"golang.org/x/exp/slices"

"github.com/pkg/errors"
"github.com/sirupsen/logrus"

Expand Down
2 changes: 1 addition & 1 deletion master/internal/task/tasklogger/logger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ package tasklogger_test

import (
"fmt"
"slices"
"sync"
"testing"
"time"

"github.com/stretchr/testify/require"
"golang.org/x/exp/slices"

"github.com/determined-ai/determined/master/internal/task/tasklogger"
"github.com/determined-ai/determined/master/pkg/model"
Expand Down
2 changes: 1 addition & 1 deletion master/internal/usergroup/postgres_groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import (
"context"
"database/sql"
"fmt"
"slices"

"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"github.com/uptrace/bun"
"golang.org/x/exp/slices"

"github.com/determined-ai/determined/master/internal/db"
"github.com/determined-ai/determined/master/pkg/model"
Expand Down
2 changes: 1 addition & 1 deletion master/pkg/cproto/container.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cproto

import (
"golang.org/x/exp/slices"
"slices"

"github.com/determined-ai/determined/master/pkg/check"
"github.com/determined-ai/determined/master/pkg/device"
Expand Down
2 changes: 1 addition & 1 deletion master/pkg/cproto/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package cproto

import (
"fmt"
"slices"

"github.com/docker/docker/api/types"
"github.com/pkg/errors"
"golang.org/x/exp/slices"

"github.com/determined-ai/determined/master/pkg/check"
"github.com/determined-ai/determined/proto/pkg/containerv1"
Expand Down
2 changes: 1 addition & 1 deletion master/pkg/model/task_container_defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package model
import (
"encoding/json"
"fmt"
"slices"
"strings"

"github.com/docker/docker/api/types"
"github.com/jinzhu/copier"
"golang.org/x/exp/slices"

k8sV1 "k8s.io/api/core/v1"

Expand Down
2 changes: 1 addition & 1 deletion proto/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/determined-ai/determined/proto

go 1.20
go 1.21

require (
github.com/golang/protobuf v1.5.2
Expand Down

0 comments on commit cf57ce4

Please sign in to comment.