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

SNOW-925280: Drop support of Go 1.19 #1168

Merged
merged 6 commits into from
Jun 26, 2024
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
16 changes: 8 additions & 8 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ jobs:
steps:
- uses: actions/checkout@v1
- name: Setup go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: 1.19
go-version: '1.20'
- name: Format, Lint
shell: bash
run: ./ci/build.sh
Expand All @@ -44,12 +44,12 @@ jobs:
fail-fast: false
matrix:
cloud: [ 'AWS', 'AZURE', 'GCP' ]
go: [ '1.19', '1.20', '1.21', '1.22' ]
go: [ '1.20', '1.21', '1.22' ]
name: ${{ matrix.cloud }} Go ${{ matrix.go }} on Ubuntu
steps:
- uses: actions/checkout@v1
- name: Setup go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Test
Expand All @@ -70,12 +70,12 @@ jobs:
fail-fast: false
matrix:
cloud: [ 'AWS', 'AZURE', 'GCP' ]
go: [ '1.19', '1.20', '1.21', '1.22' ]
go: [ '1.20', '1.21', '1.22' ]
name: ${{ matrix.cloud }} Go ${{ matrix.go }} on Mac
steps:
- uses: actions/checkout@v1
- name: Setup go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Test
Expand All @@ -95,12 +95,12 @@ jobs:
fail-fast: false
matrix:
cloud: [ 'AWS', 'AZURE', 'GCP' ]
go: [ '1.19', '1.20', '1.21', '1.22' ]
go: [ '1.20', '1.21', '1.22' ]
name: ${{ matrix.cloud }} Go ${{ matrix.go }} on Windows
steps:
- uses: actions/checkout@v1
- name: Setup go
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- uses: actions/setup-python@v1
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ timestamps {
string(name: 'branch', value: 'main'),
string(name: 'client_git_commit', value: scmInfo.GIT_COMMIT),
string(name: 'client_git_branch', value: scmInfo.GIT_BRANCH),
string(name: 'TARGET_DOCKER_TEST_IMAGE', value: 'go-centos7-go1.19'),
string(name: 'TARGET_DOCKER_TEST_IMAGE', value: 'go-centos7-go1.21'),
string(name: 'parent_job', value: env.JOB_NAME),
string(name: 'parent_build_number', value: env.BUILD_NUMBER)
]
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The following software packages are required to use the Go Snowflake Driver.

## Go

The latest driver requires the [Go language](https://golang.org/) 1.19 or higher. The supported operating systems are Linux, Mac OS, and Windows, but you may run the driver on other platforms if the Go language works correctly on those platforms.
The latest driver requires the [Go language](https://golang.org/) 1.20 or higher. The supported operating systems are Linux, Mac OS, and Windows, but you may run the driver on other platforms if the Go language works correctly on those platforms.


# Installation
Expand Down Expand Up @@ -161,4 +161,4 @@ Until we replace the offending dependency with one which doesn't have the bug, a

The driver will try to detect automatically, whether your runtime is susceptible for this bug or not, and if so, log a message on `Warning` loglevel.

Details in [issue 773](https://github.com/snowflakedb/gosnowflake/issues/773)
Details in [issue 773](https://github.com/snowflakedb/gosnowflake/issues/773)
1 change: 0 additions & 1 deletion bindings_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,6 @@ func TestBulkArrayBindingTimeWithPrecision(t *testing.T) {

func TestBulkArrayMultiPartBinding(t *testing.T) {
rowCount := 1000000 // large enough to be partitioned into multiple files
rand.Seed(time.Now().UnixNano())
randomIter := rand.Intn(3) + 2
randomStrings := make([]string, rowCount)
str := randomString(30)
Expand Down
2 changes: 1 addition & 1 deletion ci/_init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ export DRIVER_NAME=go

TEST_IMAGE_VERSION=1
declare -A TEST_IMAGE_NAMES=(
[$DRIVER_NAME-centos7-go1.19]=$DOCKER_REGISTRY_NAME/client-$DRIVER_NAME-centos7-go1.19-test:$TEST_IMAGE_VERSION
[$DRIVER_NAME-centos7-go1.21]=$DOCKER_REGISTRY_NAME/client-$DRIVER_NAME-centos7-go1.21-test:$TEST_IMAGE_VERSION
)
export TEST_IMAGE_NAMES
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ RUN yum -y install python36
RUN python3 -V

# install Go
RUN curl -O -L https://go.dev/dl/go1.19.13.linux-amd64.tar.gz && \
tar -C /usr/local -xzf go1.19.13.linux-amd64.tar.gz
RUN curl -O -L https://go.dev/dl/go1.21.11.linux-amd64.tar.gz && \
tar -C /usr/local -xzf go1.21.11.linux-amd64.tar.gz
ENV GOROOT /usr/local/go
ENV GOPATH=/tmp/go
ENV GOCACHE=/tmp/cache
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/snowflakedb/gosnowflake

go 1.19
go 1.20

require (
github.com/99designs/keyring v1.2.2
Expand Down
11 changes: 0 additions & 11 deletions put_get_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,10 @@ import (
"strconv"
"strings"
"testing"
"time"
)

const createStageStmt = "CREATE OR REPLACE STAGE %v URL = '%v' CREDENTIALS = (%v)"

func randomString(n int) string {
rand.Seed(time.Now().UnixNano())
alpha := []rune("abcdefghijklmnopqrstuvwxyz")
b := make([]rune, n)
for i := range b {
b[i] = alpha[rand.Intn(len(alpha))]
}
return string(b)
}

func TestPutError(t *testing.T) {
if isWindows {
t.Skip("permission model is different")
Expand Down
4 changes: 2 additions & 2 deletions telemetry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ func TestTelemetryAddLog(t *testing.T) {
enabled: true,
flushSize: defaultFlushSize,
}
rand.Seed(time.Now().UnixNano())
randNum := rand.Int() % 10000
r := rand.New(rand.NewSource(time.Now().UnixNano()))
randNum := r.Int() % 10000
for i := 0; i < randNum; i++ {
if err := st.addLog(&telemetryData{
Message: map[string]string{
Expand Down
10 changes: 10 additions & 0 deletions util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -390,3 +390,13 @@ func skipOnJenkins(t *testing.T, message string) {
t.Skip("Skipping test on Jenkins: " + message)
}
}

func randomString(n int) string {
r := rand.New(rand.NewSource(time.Now().UnixNano()))
alpha := []rune("abcdefghijklmnopqrstuvwxyz")
b := make([]rune, n)
for i := range b {
b[i] = alpha[r.Intn(len(alpha))]
}
return string(b)
}
Loading