From c155b6ac81c8f557f6ce48dbf809f6f66f1fb718 Mon Sep 17 00:00:00 2001 From: Vu Anh Phung Date: Wed, 2 Dec 2026 05:08:34 +0000 Subject: [PATCH 1/2] Support Go 1.26.11 as the minimum toolchain Signed-off-by: Vu Anh Phung --- .bot/prompts/engineer-followup/system.md | 2 +- .bot/prompts/engineer-mention/system.md | 2 +- .bot/prompts/engineer/system.md | 6 +++--- .github/workflows/engineer-bot-followup.yml | 2 +- .github/workflows/engineer-bot-mention.yml | 2 +- .github/workflows/engineer-bot.yml | 2 +- .github/workflows/go.yml | 10 ++++++---- .github/workflows/nightly-e2e.yml | 4 ++-- .github/workflows/securityScan.yml | 3 +-- CHANGELOG.md | 1 + README.md | 2 +- go.mod | 2 +- internal/client/retry_test.go | 7 +++++-- internal/config/thrift_endpoint_test.go | 7 ++++++- internal/featureflags/retry_test.go | 10 ++++++---- 15 files changed, 37 insertions(+), 25 deletions(-) diff --git a/.bot/prompts/engineer-followup/system.md b/.bot/prompts/engineer-followup/system.md index d60650a9d..05e258e6e 100644 --- a/.bot/prompts/engineer-followup/system.md +++ b/.bot/prompts/engineer-followup/system.md @@ -52,7 +52,7 @@ Your job: independent follow-up work in this PR. Repo facts you need: - - Go 1.27.3 `database/sql` driver; `go build ./...` has warmed the module cache on + - The runner uses the Go version in `go.mod`. `go build ./...` has warmed the module cache on the runner. This follow-up job wires **NO live-warehouse connection env**, so only the pure-Go **`make test`** unit suite (CGO_ENABLED=0) runs here — do NOT run or add the live e2e tests in `driver_e2e_test.go` (they need warehouse diff --git a/.bot/prompts/engineer-mention/system.md b/.bot/prompts/engineer-mention/system.md index c81fa43af..d5a1dc940 100644 --- a/.bot/prompts/engineer-mention/system.md +++ b/.bot/prompts/engineer-mention/system.md @@ -18,7 +18,7 @@ the relevant source before editing. Never weaken tests or alter fixtures to make a check pass. Keep public API and dependency changes out of scope unless the maintainer explicitly requests them. -The runner provides Go 1.27.3 and a warmed module/tool cache. Verify Go edits with +The runner provides the Go version in `go.mod` and a warmed module/tool cache. Verify Go edits with the affected `go test -run ./` tests, then `make test`, `make lint`, and the read-only format check `gofmt -l -s .`. This job runs the pure-Go driver with CGO_ENABLED=0 and GOPROXY=off. It has no live-warehouse diff --git a/.bot/prompts/engineer/system.md b/.bot/prompts/engineer/system.md index 526d0c582..55a286c44 100644 --- a/.bot/prompts/engineer/system.md +++ b/.bot/prompts/engineer/system.md @@ -10,9 +10,9 @@ prompt covers the repo-specific facts you need to follow it. == THE REPO == -A Go `database/sql` driver (module `github.com/databricks/databricks-sql-go`, Go -1.27.3). Source is the root package `dbsql` (`connection.go`, `connector.go`, -`driver.go`, `statement.go`, `result.go`, `parameters.go`, …) plus subpackages +A Go `database/sql` driver (module `github.com/databricks/databricks-sql-go/v2`). +The minimum Go version is declared in `go.mod`. Source is the root package `dbsql` +(`connection.go`, `connector.go`, `driver.go`, `statement.go`, `result.go`, `parameters.go`, …) plus subpackages `auth/`, `rows/`, `errors/`, `logger/`, `driverctx/`, `telemetry/`, and `internal/` (client, Thrift protocol, fetcher, etc.). diff --git a/.github/workflows/engineer-bot-followup.yml b/.github/workflows/engineer-bot-followup.yml index 2d5e0308d..cde9b75de 100644 --- a/.github/workflows/engineer-bot-followup.yml +++ b/.github/workflows/engineer-bot-followup.yml @@ -101,7 +101,7 @@ jobs: - name: Set up Go Toolchain uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0 with: - go-version: '1.27.3' + go-version-file: go.mod cache: false - name: Build + warm caches (pure-Go; while JFrog creds are present) diff --git a/.github/workflows/engineer-bot-mention.yml b/.github/workflows/engineer-bot-mention.yml index 1a57f50d4..9effc93fb 100644 --- a/.github/workflows/engineer-bot-mention.yml +++ b/.github/workflows/engineer-bot-mention.yml @@ -103,7 +103,7 @@ jobs: - name: Set up Go Toolchain uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0 with: - go-version: '1.27.3' + go-version-file: go.mod cache: false - name: Build and warm Go caches diff --git a/.github/workflows/engineer-bot.yml b/.github/workflows/engineer-bot.yml index 37bece844..0ced3311f 100644 --- a/.github/workflows/engineer-bot.yml +++ b/.github/workflows/engineer-bot.yml @@ -75,7 +75,7 @@ jobs: - name: Set up Go Toolchain uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0 with: - go-version: '1.27.3' + go-version-file: go.mod cache: false - name: Build driver + warm caches (pure-Go; while JFrog creds are present) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 2bf9181c8..57d9fd5fc 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -33,7 +33,7 @@ jobs: - name: Set up Go Toolchain uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0 with: - go-version: '1.27.3' + go-version-file: go.mod cache: false - name: Lint @@ -44,10 +44,12 @@ jobs: install-mode: goinstall build-and-test: name: Test and Build + env: + GOTOOLCHAIN: local strategy: - # Test the minimum patched toolchain and the latest 1.27 patch. + # Branch protection requires both 1.27 checks by name. matrix: - go-version: ['1.27.3', '1.27.x'] + go-version: ['1.26.11', '1.27.3', '1.27.x'] runs-on: group: databricks-protected-runner-group labels: linux-ubuntu-latest @@ -175,7 +177,7 @@ jobs: - name: Set up Go Toolchain uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0 with: - go-version: '1.27.3' + go-version-file: go.mod cache: false # Install the exact toolchain the kernel .a is built with. rust-toolchain.toml diff --git a/.github/workflows/nightly-e2e.yml b/.github/workflows/nightly-e2e.yml index 8f3cfe41d..808f1b184 100644 --- a/.github/workflows/nightly-e2e.yml +++ b/.github/workflows/nightly-e2e.yml @@ -49,7 +49,7 @@ jobs: - name: Set up Go Toolchain uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0 with: - go-version: '1.27.3' + go-version-file: go.mod cache: false - name: Get dependencies @@ -139,7 +139,7 @@ jobs: - name: Set up Go Toolchain uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0 with: - go-version: '1.27.3' + go-version-file: go.mod cache: false # Keep in lockstep with rust-toolchain.toml's channel (it governs the archive diff --git a/.github/workflows/securityScan.yml b/.github/workflows/securityScan.yml index 07ebd1038..1b8a3c5e3 100644 --- a/.github/workflows/securityScan.yml +++ b/.github/workflows/securityScan.yml @@ -54,8 +54,7 @@ jobs: - name: Set up Go Toolchain uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 with: - # Match the minimum patched toolchain declared in go.mod. - go-version: '1.27.3' + go-version-file: go.mod cache: false - name: Install osv-scanner diff --git a/CHANGELOG.md b/CHANGELOG.md index 41c5e722e..67a08e6ea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ### Driver changes +- Lower the minimum supported Go version from 1.27.3 to 1.26.11, which includes the emSign certificate distrust fix. - Read buffered kernel result batches without a runtime hop, falling back to a blocking fetch when needed. - Honor `WithPort` and the DSN port on the kernel backend, including after automatic Reyden recovery, instead of rejecting a non-default port. IPv6 hosts need brackets, and a port the kernel rejects returns an error wrapping both `ErrInvalidKernelConfig` and `ErrNotSupportedByKernel`. - **Behavior change:** Nested `DATE` and `TIMESTAMP_NTZ` text changes in every session time zone, UTC included, with no option to restore the old text. This covers `ARRAY` elements, `MAP` values and keys, and `STRUCT` fields (databricks/databricks-sql-go#604). diff --git a/README.md b/README.md index b4b5536f5..0e9040ba1 100644 --- a/README.md +++ b/README.md @@ -109,7 +109,7 @@ parameter, whether it applies to **Both**, **Thrift-only**, or **SEA-only**. ## Building -Requires Go 1.27.3 or newer. +Requires Go 1.26.11 or newer. On Go 1.27, use 1.27.4 or newer for the corresponding security fixes. The two backends differ **at build time**, not just at connect. diff --git a/go.mod b/go.mod index c7974e9dc..8c3f55da6 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/databricks/databricks-sql-go/v2 -go 1.27.3 +go 1.26.11 tool gotest.tools/gotestsum diff --git a/internal/client/retry_test.go b/internal/client/retry_test.go index 18ec2f5a4..0c7c3cf9d 100644 --- a/internal/client/retry_test.go +++ b/internal/client/retry_test.go @@ -24,7 +24,10 @@ import ( ) func retryTestConfig(retries int) *config.Config { - return &config.Config{Authenticator: &noop.NoopAuth{}, RetryMax: retries} + return &config.Config{UserConfig: config.UserConfig{ + Authenticator: &noop.NoopAuth{}, + RetryMax: retries, + }} } func TestRetryStatusAndBodyReplay(t *testing.T) { @@ -569,7 +572,7 @@ func TestRetryWithoutAuthenticator(t *testing.T) { } })) defer server.Close() - httpClient := RetryableClient(&config.Config{RetryMax: 1}) + httpClient := RetryableClient(&config.Config{UserConfig: config.UserConfig{RetryMax: 1}}) retry, ok := httpClient.Transport.(*retryTransport) require.True(t, ok) transport, ok := retry.client.Transport.(*http.Transport) diff --git a/internal/config/thrift_endpoint_test.go b/internal/config/thrift_endpoint_test.go index efdcf13b1..3e311f7e9 100644 --- a/internal/config/thrift_endpoint_test.go +++ b/internal/config/thrift_endpoint_test.go @@ -19,7 +19,12 @@ func TestThriftEndpointUnchanged(t *testing.T) { } for _, tc := range cases { t.Run(tc.name, func(t *testing.T) { - c := &Config{Protocol: "https", Host: tc.host, Port: tc.port, HTTPPath: "/sql/1.0/warehouses/x"} + c := &Config{UserConfig: UserConfig{ + Protocol: "https", + Host: tc.host, + Port: tc.port, + HTTPPath: "/sql/1.0/warehouses/x", + }} got, err := c.ToEndpointURL() if err != nil { t.Fatalf("unexpected err %v", err) diff --git a/internal/featureflags/retry_test.go b/internal/featureflags/retry_test.go index 8eae37df4..435b8ae53 100644 --- a/internal/featureflags/retry_test.go +++ b/internal/featureflags/retry_test.go @@ -25,10 +25,12 @@ func TestFetchFeatureFlagsWithRetryableClient(t *testing.T) { })) defer server.Close() httpClient := client.RetryableClient(&config.Config{ - Authenticator: &noop.NoopAuth{}, - RetryMax: 4, - RetryWaitMin: time.Millisecond, - RetryWaitMax: time.Millisecond, + UserConfig: config.UserConfig{ + Authenticator: &noop.NoopAuth{}, + RetryMax: 4, + RetryWaitMin: time.Millisecond, + RetryWaitMax: time.Millisecond, + }, }) ctx, cancel := context.WithTimeout(context.Background(), time.Second) defer cancel() From 9508a12e3c5973bce70926a09e8114cc81717c9e Mon Sep 17 00:00:00 2001 From: Vu Anh Phung Date: Wed, 2 Dec 2026 05:39:15 +0000 Subject: [PATCH 2/2] Test the minimum and latest Go versions on both backends Signed-off-by: Vu Anh Phung --- .github/workflows/go.yml | 29 ++++++++++++++++++++--------- CHANGELOG.md | 2 +- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 57d9fd5fc..06695bc80 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -43,13 +43,16 @@ jobs: version: 'v2.15.0' install-mode: goinstall build-and-test: - name: Test and Build + name: Test and Build (${{ matrix.lane }}) env: GOTOOLCHAIN: local strategy: - # Branch protection requires both 1.27 checks by name. - matrix: - go-version: ['1.26.11', '1.27.3', '1.27.x'] + matrix: &go-matrix + include: + - lane: min + go-version-file: go.mod + - lane: latest + go-version: '1.27.x' runs-on: group: databricks-protected-runner-group labels: linux-ubuntu-latest @@ -62,9 +65,11 @@ jobs: uses: ./.github/actions/setup-jfrog - name: Set up Go Toolchain + id: setup-go uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0 with: go-version: ${{ matrix.go-version }} + go-version-file: ${{ matrix.go-version-file }} check-latest: true cache: false @@ -74,9 +79,9 @@ jobs: path: | ~/go/pkg/mod ~/.cache/go-build - key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} + key: ${{ runner.os }}-go-${{ steps.setup-go.outputs.go-version }}-${{ hashFiles('**/go.sum') }} restore-keys: | - ${{ runner.os }}-go-${{ matrix.go-version }}- + ${{ runner.os }}-go-${{ steps.setup-go.outputs.go-version }}- - name: Get dependencies run: | @@ -118,7 +123,11 @@ jobs: CGO_ENABLED: 0 build-and-test-kernel: - name: Test (kernel backend) + name: Test (kernel backend, ${{ matrix.lane }}) + strategy: + matrix: *go-matrix + env: + GOTOOLCHAIN: local # Exercises the opt-in SEA-via-kernel backend: builds the Rust kernel static # lib from the pinned KERNEL_REV and runs the `databricks_kernel`-tagged unit # tests with CGO. Separate from build-and-test so that job's CGO_ENABLED=0 @@ -132,7 +141,7 @@ jobs: # branch is pushed repeatedly (each push cancels the prior in-flight run). timeout-minutes: 30 concurrency: - group: kernel-build-${{ github.workflow }}-${{ github.ref }} + group: kernel-build-${{ github.workflow }}-${{ github.ref }}-${{ matrix.lane }} cancel-in-progress: true runs-on: group: databricks-protected-runner-group @@ -177,7 +186,9 @@ jobs: - name: Set up Go Toolchain uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0 with: - go-version-file: go.mod + go-version: ${{ matrix.go-version }} + go-version-file: ${{ matrix.go-version-file }} + check-latest: true cache: false # Install the exact toolchain the kernel .a is built with. rust-toolchain.toml diff --git a/CHANGELOG.md b/CHANGELOG.md index 67a08e6ea..2f6bcc02b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ ### Driver changes -- Lower the minimum supported Go version from 1.27.3 to 1.26.11, which includes the emSign certificate distrust fix. +- Lower the minimum supported Go version from 1.27.3 to 1.26.11. Go 1.27 users need 1.27.4 or newer for the emSign certificate distrust and November security fixes. The `go.mod` minimum accepts every Go 1.27 patch, including 1.27.0 through 1.27.3. - Read buffered kernel result batches without a runtime hop, falling back to a blocking fetch when needed. - Honor `WithPort` and the DSN port on the kernel backend, including after automatic Reyden recovery, instead of rejecting a non-default port. IPv6 hosts need brackets, and a port the kernel rejects returns an error wrapping both `ErrInvalidKernelConfig` and `ErrNotSupportedByKernel`. - **Behavior change:** Nested `DATE` and `TIMESTAMP_NTZ` text changes in every session time zone, UTC included, with no option to restore the old text. This covers `ARRAY` elements, `MAP` values and keys, and `STRUCT` fields (databricks/databricks-sql-go#604).