diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a7df12a19..43b94d520 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -125,7 +125,7 @@ jobs: - name: Set up Go 1.x uses: actions/setup-go@v7.0.0 with: - go-version: '1.25.3' + go-version: '1.26.10' check-latest: true cache: true id: go @@ -333,7 +333,7 @@ jobs: - name: Set up Go 1.x uses: actions/setup-go@v7.0.0 with: - go-version: '1.25.3' + go-version: '1.26.10' check-latest: true cache: true id: go @@ -596,7 +596,7 @@ jobs: - name: Set up Go 1.x uses: actions/setup-go@v7.0.0 with: - go-version: '1.25.3' + go-version: '1.26.10' check-latest: true cache: true id: go @@ -991,7 +991,7 @@ jobs: - name: Set up Go 1.x uses: actions/setup-go@v7.0.0 with: - go-version: '1.25.3' + go-version: '1.26.10' check-latest: true cache: true id: go @@ -1418,7 +1418,7 @@ jobs: - name: Set up Go 1.x uses: actions/setup-go@v7.0.0 with: - go-version: '1.25.3' + go-version: '1.26.10' check-latest: true cache: true id: go diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 8b5205c7b..f350bbd63 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -12,7 +12,7 @@ on: env: - GOLANGCI_LINT_VERSION: ${{ vars.GOLANGCI_LINT_VERSION == '' && 'v2.5.0' || vars.GOLANGCI_LINT_VERSION }} + GOLANGCI_LINT_VERSION: ${{ vars.GOLANGCI_LINT_VERSION == '' && 'v2.15.0' || vars.GOLANGCI_LINT_VERSION }} DEFAULT_STEP_TIMEOUT: ${{ vars.DEFAULT_STEP_TIMEOUT_MIN == '' && '20' || vars.DEFAULT_STEP_TIMEOUT_MIN }} jobs: @@ -25,7 +25,7 @@ jobs: - name: Setup Go environment uses: actions/setup-go@v7.0.0 with: - go-version: '1.25.3' + go-version: '1.26.10' cache: false - name: Check workflow files diff --git a/.github/workflows/mcp-packaging.yml b/.github/workflows/mcp-packaging.yml index d0f732eee..06a29a60e 100644 --- a/.github/workflows/mcp-packaging.yml +++ b/.github/workflows/mcp-packaging.yml @@ -54,7 +54,7 @@ jobs: - uses: actions/setup-go@v7.0.0 if: runner.os == 'Windows' with: - go-version: '1.25.3' + go-version: '1.26.10' - run: npm ci --prefix npm - run: python scripts/test-packaging.py diff --git a/.github/workflows/mcp-wringer.yml b/.github/workflows/mcp-wringer.yml index 1c9ba374c..80ed9073b 100644 --- a/.github/workflows/mcp-wringer.yml +++ b/.github/workflows/mcp-wringer.yml @@ -86,7 +86,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v7.0.0 with: - go-version: '1.25.3' + go-version: '1.26.10' check-latest: true cache: true diff --git a/.golangci.yml b/.golangci.yml index 5ad7f07e7..6bb0ac1ad 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -48,7 +48,6 @@ linters: - predeclared - promlinter - reassign - - revive - rowserrcheck - sqlclosecheck # - staticcheck @@ -70,7 +69,7 @@ linters: exhaustive: check: - switch - - map + - mapliteral exhaustruct: exclude: - ^net/http.Client$ diff --git a/AGENTS.md b/AGENTS.md index ce79a50f9..35398233e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -4,7 +4,7 @@ These guidelines help contributors, human and otherwise, understand and work eff We also encourage reading [`docs/developer_guide.md`](/docs/developer_guide.md) for further useful information. For deeper understanding of the "brains" of `stackql`, it is worthwhile to consult [the `AGENTS.md` file of `any-sdk`](https://github.com/stackql/any-sdk/blob/main/AGENTS.md) and linked documents from there. -We have upgraded to golang `>= 1.25.3` in order to take advantage of [time simulation and other capabilities in `testing/synctest`](https://go.dev/blog/testing-time). +We have upgraded to golang `>= 1.26.10` in order to take advantage of [time simulation and other capabilities in `testing/synctest`](https://go.dev/blog/testing-time). ## Project Structure & Module Organization diff --git a/Dockerfile b/Dockerfile index 8c1927c73..85fe21f28 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.25.3-bookworm AS sourceprep +FROM golang:1.26.10-bookworm AS sourceprep ENV SRC_DIR=/work/stackql/src diff --git a/docs/developer_guide.md b/docs/developer_guide.md index 28014de31..b5f816db1 100644 --- a/docs/developer_guide.md +++ b/docs/developer_guide.md @@ -33,7 +33,7 @@ Having installed all dependencies, the `robot` tests should be run from the repo Running linting locally is also a nice-to-have, and can be done: -- Install `golangci-lint` `v1.59.1` (the current version used in CI) per [the `golangci-lint` doco](https://golangci-lint.run/welcome/install/). +- Install `golangci-lint` `v2.15.0` (the current version used in CI) per [the `golangci-lint` doco](https://golangci-lint.run/welcome/install/). - From the root directory of the repository: `golangci-lint run`. @@ -69,7 +69,7 @@ env CGO_ENABLED=0 PLANCACHEENABLED=false go build \ At this time, we are not dogmatic about how to implement unit tests. Aspirationally, unit tests can be implemented in similar fashion to the none-too opinionated [official testing package documentation](https://pkg.go.dev/testing), and in particular [the overview section](https://pkg.go.dev/testing#pkg-overview). -We have upgraded to golang `>= 1.25.3` in order to take advantage of [time simultion and other capabilites in `testing/synctest`](https://go.dev/blog/testing-time). +We have upgraded to golang `>= 1.26.10` in order to take advantage of [time simultion and other capabilites in `testing/synctest`](https://go.dev/blog/testing-time). To run all unit tests: diff --git a/go.mod b/go.mod index c980a530b..da90f97cb 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/stackql/stackql -go 1.25.3 +go 1.26.10 require ( github.com/DATA-DOG/go-sqlmock v1.5.1 @@ -20,8 +20,8 @@ require ( github.com/spf13/cobra v1.10.2 github.com/spf13/pflag v1.0.10 github.com/spf13/viper v1.10.1 - github.com/stackql-labs/omnisdk v0.1.5-beta02 - github.com/stackql/any-sdk v0.6.1-alpha03 + github.com/stackql-labs/omnisdk v0.1.5-beta04 + github.com/stackql/any-sdk v0.6.1-alpha05 github.com/stackql/go-suffix-map v0.0.1-alpha01 github.com/stackql/psql-wire v0.1.3-beta01 github.com/stackql/stackql-parser v0.0.16-alpha02 diff --git a/go.sum b/go.sum index b32c32692..b5ba2e1a2 100644 --- a/go.sum +++ b/go.sum @@ -368,10 +368,10 @@ github.com/spf13/viper v1.10.1 h1:nuJZuYpG7gTj/XqiUwg8bA0cp1+M2mC3J4g5luUYBKk= github.com/spf13/viper v1.10.1/go.mod h1:IGlFPqhNAPKRxohIzWpI5QEy4kuI7tcl5WvR+8qy1rU= github.com/spiffe/go-spiffe/v2 v2.7.0 h1:uXe1MflJoHw58wAUvxVlcM7WpKtijWG7I1UidcGh6g4= github.com/spiffe/go-spiffe/v2 v2.7.0/go.mod h1:47Q0Q9/AqGha8QLHp+kxpH4Wca7X7EnOtlIJy3mxZ3U= -github.com/stackql-labs/omnisdk v0.1.5-beta02 h1:39dDzNj+zpgVl3RAZb1FADzlffJQTeiPbi6/aUMQmck= -github.com/stackql-labs/omnisdk v0.1.5-beta02/go.mod h1:2P2vFi+c/wEeQ3kFgIt0QuIlefpuzIoTm6bPJAiLAvQ= -github.com/stackql/any-sdk v0.6.1-alpha03 h1:8WPgE+MftTnLNsR/WbDkyujnuyaQbM1PvQTgEsuNbR4= -github.com/stackql/any-sdk v0.6.1-alpha03/go.mod h1:ahkRgwHHEn7RTmSfKrshPVk6i4X1BdHknSeBflSyRac= +github.com/stackql-labs/omnisdk v0.1.5-beta04 h1:oICaMprn4rIewH/tuEVJ4pPToTYpF0kfKEV38BnV460= +github.com/stackql-labs/omnisdk v0.1.5-beta04/go.mod h1:G3ny8qDG0WyH5NHeUdpDg1snkHIUtd+puOnW5B21FRs= +github.com/stackql/any-sdk v0.6.1-alpha05 h1:rAjZ/FibcM/FCs9yDtdaNky5Hh/obeYjD0vTrruRipU= +github.com/stackql/any-sdk v0.6.1-alpha05/go.mod h1:8/Es9uuqbR+mb2mbmVLSmXJrG7kcHIRZLbduuxkDpfs= github.com/stackql/go-suffix-map v0.0.1-alpha01 h1:TDUDS8bySu41Oo9p0eniUeCm43mnRM6zFEd6j6VUaz8= github.com/stackql/go-suffix-map v0.0.1-alpha01/go.mod h1:QAi+SKukOyf4dBtWy8UMy+hsXXV+yyEE4vmBkji2V7g= github.com/stackql/psql-wire v0.1.3-beta01 h1:xDpR3e09xt74GBSkxYKIhfTMPnKY/Utgu2rl1ctEuF8= diff --git a/internal/stackql/data_staging/input_data_staging/input_data_staging.go b/internal/stackql/data_staging/input_data_staging/input_data_staging.go index 9c140ebae..e2d771f0e 100644 --- a/internal/stackql/data_staging/input_data_staging/input_data_staging.go +++ b/internal/stackql/data_staging/input_data_staging/input_data_staging.go @@ -142,6 +142,7 @@ func (np *naiveNativeResultSetPreparator) nativeProtect( table := sqldata.NewSQLTable(0, "meta_table") rCols := make([]sqldata.ISQLColumn, len(columns)) for f := range rCols { + //nolint:gosec // Both slices are allocated from len(columns). rCols[f] = np.typCfg.GetPlaceholderColumn(table, columns[f], np.typCfg.GetDefaultOID()) } rv.SetSQLResultFn(func() sqldata.ISQLResultStream { diff --git a/internal/stackql/drm/drm_cfg.go b/internal/stackql/drm/drm_cfg.go index 33dd0c1a6..8c5062220 100644 --- a/internal/stackql/drm/drm_cfg.go +++ b/internal/stackql/drm/drm_cfg.go @@ -578,7 +578,7 @@ func (dc *staticDRMConfig) GenerateDDL( return dc.sqlSystem.GenerateDDL(relationalTable, dropTable) } -//nolint:gocritic,govet,funlen,nestif // defer fix +//nolint:gocritic,govet,funlen,nestif,gocognit // defer fix; this orchestration remains intentionally cohesive func (dc *staticDRMConfig) GenerateInsertDML( tabAnnotated util.AnnotatedTabulation, prov formulation.Provider, diff --git a/internal/stackql/planbuilder/plan_builder.go b/internal/stackql/planbuilder/plan_builder.go index 6908e2782..f7f6d3610 100644 --- a/internal/stackql/planbuilder/plan_builder.go +++ b/internal/stackql/planbuilder/plan_builder.go @@ -458,6 +458,7 @@ func (pgb *standardPlanGraphBuilder) arrangePrebuildIndirects( return selectPrimitiveNode, nil } +//nolint:gocognit // DDL dispatch stays together to preserve the existing control flow. func (pgb *standardPlanGraphBuilder) handleDDL(pbi planbuilderinput.PlanBuilderInput) error { handlerCtx := pbi.GetHandlerCtx() node, ok := pbi.GetDDL() diff --git a/internal/test/testhttpapi/httptestutils.go b/internal/test/testhttpapi/httptestutils.go index 8eb2e6b70..2a9be3ecc 100644 --- a/internal/test/testhttpapi/httptestutils.go +++ b/internal/test/testhttpapi/httptestutils.go @@ -190,7 +190,7 @@ func NewHTTPRequestExpectations(body io.ReadCloser, header http.Header, method s } func DefaultHandler(w http.ResponseWriter, r *http.Request) { - fmt.Fprintf(w, "hello %s\n", path.Base(r.URL.Path)) + fmt.Fprintf(w, "hello %s\n", path.Base(r.URL.Path)) //nolint:gosec // Test response is plain text, not HTML. } func getBodyMap(bodyBytes []byte, contentTypeHeader []string) (map[string]interface{}, error) { diff --git a/pkg/mcp_server/render/render.go b/pkg/mcp_server/render/render.go index e549f3826..0e9c816c0 100644 --- a/pkg/mcp_server/render/render.go +++ b/pkg/mcp_server/render/render.go @@ -65,7 +65,7 @@ func unwrap(v any) any { return nil } rv := reflect.ValueOf(v) - if rv.Kind() == reflect.Ptr { + if rv.Kind() == reflect.Ptr { //nolint:govet // Keep the explicit kind check for readability. if rv.IsNil() { return nil } diff --git a/pkg/prettyprint/prettyprint.go b/pkg/prettyprint/prettyprint.go index 457a43d61..b7d418ea5 100644 --- a/pkg/prettyprint/prettyprint.go +++ b/pkg/prettyprint/prettyprint.go @@ -142,6 +142,7 @@ func (pp *PrettyPrinter) PrintPlaceholderJSON(body interface{}) (string, error) } } +//nolint:gocognit // Recursive formatting keeps JSON type handling in one place. func (pp *PrettyPrinter) printTemplatedJSON(body interface{}) (string, error) { startPos := pp.getCurrentIndentation() switch bt := body.(type) {