Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update go version to 1.19 #104

Merged
merged 1 commit into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ on:

env:
# Common versions
GO_VERSION: '1.18'
GOLANGCI_VERSION: 'v1.47'
GO_VERSION: '1.19'
GOLANGCI_VERSION: 'v1.51'
DOCKER_BUILDX_VERSION: 'v0.4.2'

# Common users. We can't run a step 'if secrets.AWS_USR != ""' but we can run
Expand Down Expand Up @@ -43,7 +43,7 @@ jobs:
run: |
make generate
- name: Lint golang code
uses: golangci/golangci-lint-action@v3.2.0
uses: golangci/golangci-lint-action@v3.5.0
with:
version: ${{ env.GOLANGCI_VERSION }}
args: --verbose --timeout=10m
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: E2E-1.24
name: E2E-1.26

on:
push:
Expand All @@ -10,10 +10,10 @@ on:

env:
# Common versions
GO_VERSION: '1.18'
GO_VERSION: '1.19'
KIND_ACTION_VERSION: 'v1.3.0'
KIND_VERSION: 'v0.14.0'
KIND_IMAGE: 'kindest/node:v1.24.2'
KIND_IMAGE: 'kindest/node:v1.26.4'
KIND_CLUSTER_NAME: 'ci-testing'

jobs:
Expand Down Expand Up @@ -47,7 +47,7 @@ jobs:
make helm
helm repo add openkruise https://openkruise.github.io/charts/
helm repo update
helm install kruise openkruise/kruise --version 1.3.0 --set featureGates="PodProbeMarkerGate=true"
helm install kruise openkruise/kruise --version 1.5.0
for ((i=1;i<10;i++));
do
set +e
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
module github.com/openkruise/kruise-game

go 1.18
go 1.19

require (
github.com/BurntSushi/toml v0.3.1
github.com/davecgh/go-spew v1.1.1
github.com/onsi/ginkgo v1.16.5
github.com/onsi/gomega v1.18.1
github.com/openkruise/kruise-api v1.3.0
github.com/prometheus/client_golang v1.12.1
google.golang.org/grpc v1.40.0
google.golang.org/protobuf v1.27.1
k8s.io/api v0.24.0
Expand Down Expand Up @@ -57,7 +58,6 @@ require (
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/nxadm/tail v1.4.8 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_golang v1.12.1 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.32.1 // indirect
github.com/prometheus/procfs v0.7.3 // indirect
Expand Down
9 changes: 4 additions & 5 deletions pkg/webhook/util/writer/atomic/atomic_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ package atomic
import (
"bytes"
"fmt"
"io/ioutil"
"os"
"path"
"path/filepath"
Expand Down Expand Up @@ -301,7 +300,7 @@ func shouldWriteFile(path string, content []byte) (bool, error) {
return true, nil
}

contentOnFs, err := ioutil.ReadFile(path)
contentOnFs, err := os.ReadFile(path)
if err != nil {
return false, err
}
Expand Down Expand Up @@ -353,7 +352,7 @@ func (w *Writer) pathsToRemove(payload map[string]FileProjection, oldTsDir strin

// newTimestampDir creates a new timestamp directory
func (w *Writer) newTimestampDir() (string, error) {
tsDir, err := ioutil.TempDir(w.targetDir, time.Now().UTC().Format("..2006_01_02_15_04_05."))
tsDir, err := os.MkdirTemp(w.targetDir, time.Now().UTC().Format("..2006_01_02_15_04_05."))
if err != nil {
klog.Error(err, "unable to create new temp directory")
return "", err
Expand Down Expand Up @@ -386,12 +385,12 @@ func (w *Writer) writePayloadToDir(payload map[string]FileProjection, dir string
return err
}

err = ioutil.WriteFile(fullPath, content, mode)
err = os.WriteFile(fullPath, content, mode)
if err != nil {
klog.Error(err, "unable to write file", "file", fullPath, "mode", mode)
return err
}
// Chmod is needed because ioutil.WriteFile() ends up calling
// Chmod is needed because os.WriteFile() ends up calling
// open(2) to create the file, so the final mode used is "mode &
// ~umask". But we want to make sure the specified mode is used
// in the file no matter what the umask is.
Expand Down
9 changes: 4 additions & 5 deletions pkg/webhook/util/writer/fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ package writer
import (
"errors"
"fmt"
"io/ioutil"
"os"
"path"

Expand Down Expand Up @@ -158,19 +157,19 @@ func (f *fsCertWriter) read() (*generator.Artifacts, error) {
if err := ensureExist(f.Path); err != nil {
return nil, err
}
caKeyBytes, err := ioutil.ReadFile(path.Join(f.Path, CAKeyName))
caKeyBytes, err := os.ReadFile(path.Join(f.Path, CAKeyName))
if err != nil {
return nil, err
}
caCertBytes, err := ioutil.ReadFile(path.Join(f.Path, CACertName))
caCertBytes, err := os.ReadFile(path.Join(f.Path, CACertName))
if err != nil {
return nil, err
}
certBytes, err := ioutil.ReadFile(path.Join(f.Path, ServerCertName))
certBytes, err := os.ReadFile(path.Join(f.Path, ServerCertName))
if err != nil {
return nil, err
}
keyBytes, err := ioutil.ReadFile(path.Join(f.Path, ServerKeyName))
keyBytes, err := os.ReadFile(path.Join(f.Path, ServerKeyName))
if err != nil {
return nil, err
}
Expand Down
Loading