Skip to content

Bump Go to 1.26.3#5302

Merged
pietern merged 4 commits into
mainfrom
bump-go1.26
May 21, 2026
Merged

Bump Go to 1.26.3#5302
pietern merged 4 commits into
mainfrom
bump-go1.26

Conversation

@pietern
Copy link
Copy Markdown
Contributor

@pietern pietern commented May 21, 2026

Bumps go to 1.26.0 and toolchain to go1.26.3 across all four modules (root, tools/, tools/task/, bundle/internal/tf/codegen/), and folds in the golangci-lint --fix output that the new minor version requires.

Bumping the go directive to 1.26 unlocks two modernize analyzers (already enabled in .golangci.yaml) that were silent on 1.25:

  • stditerators — prefer reflect.Type.Fields()/Methods() and reflect.Value.Fields()/Methods() over the NumField()/Field(i) loop pattern.
  • newexpr — replace local *T helpers like func intPtr(v int) *int { return &v } (and their callers) with Go 1.26's new(expr).

These fixes are in the same PR so CI doesn't fail the moment the bump lands. A manual fixup commit removes the redundant field := field shadows and the now-dead *Ptr helpers the auto-fix left behind (including rewriting 20 int64Ptr(N) callers to new(int64(N))).

Release notes: https://go.dev/doc/go1.26

Test plan

  • go build ./... and go vet ./... clean on all four modules
  • go tool -modfile=tools/go.mod golangci-lint run ./... — 0 issues
  • Unit tests pass on all packages touched by the --fix and cleanup

This pull request and its description were written by Isaac.

pietern added 3 commits May 21, 2026 20:24
Bump Go to `go1.26.0` / `toolchain go1.26.3` across all four modules. This
cleans up an inconsistency: `go.mod`, `tools/task/go.mod`, and
`bundle/internal/tf/codegen/go.mod` were sitting at `go 1.25.8` while
`tools/go.mod` had drifted back to `go 1.25.0`. All four are now in sync.

Release notes: https://go.dev/doc/go1.26

Co-authored-by: Isaac
Bumping the `go` directive to 1.26.0 unlocks two modernize analyzers that
were silent on 1.25:

  * stditerators - prefer reflect.Type.Fields()/Methods() and
    reflect.Value.Fields()/Methods() over the classic
    NumField()/Field(i) loop pattern.
  * newexpr - replace local `*T` helpers like `func intPtr(v int) *int
    { return &v }` (and their callers) with Go 1.26's `new(expr)`.

This commit is the verbatim output of `golangci-lint run --fix ./...`,
applied at the same time as the toolchain bump so CI doesn't fail the
moment the bump lands.

A few `field := field` style redeclarations the fixer leaves behind are
harmless (the loop variable is fresh per-iteration since Go 1.22). Leaving
those for a follow-up cleanup rather than expanding the diff here.

Co-authored-by: Isaac
Follow-up to the previous commit, which the previous commit message
deferred. Two cosmetic clean-ups:

1. Remove 14 redundant `x := x` redeclarations the modernize fixer left
   inside `for x := range t.Fields()` (or `.Methods()`) loops. The loop
   variable is already fresh per-iteration since Go 1.22, so the shadow
   was a no-op kept only to preserve the variable name from the old
   `field := t.Field(i)` pattern.

2. Remove dead `*Ptr` helper functions whose call sites were inlined to
   `new(expr)`. The fixer added `//go:fix inline` directives and rewrote
   the bodies to `return new(v)`, leaving the functions themselves with
   zero callers (except `int64Ptr`, where `new(700)` would yield `*int`
   instead of `*int64`; here we rewrite the 20 callers to
   `new(int64(N))` and drop the helper too).

  * bundle/docsgen/nodes_test.go: drop strPtr
  * libs/apps/runlocal/spec_test.go: drop stringPtr
  * libs/structs/structaccess/convert_test.go: drop stringPtr, intPtr,
    float64Ptr, boolPtr
  * cmd/pipelines/history_test.go: rewrite int64Ptr callers, drop helper

Co-authored-by: Isaac
@pietern pietern temporarily deployed to test-trigger-is May 21, 2026 18:47 — with GitHub Actions Inactive
@pietern pietern temporarily deployed to test-trigger-is May 21, 2026 18:47 — with GitHub Actions Inactive
@eng-dev-ecosystem-bot
Copy link
Copy Markdown
Collaborator

Commit: 10c0395

Run: 26246340662


func boolPtr(b bool) *bool {
return &b
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good riddance

@pietern pietern added this pull request to the merge queue May 21, 2026
Merged via the queue into main with commit 0c676dc May 21, 2026
30 checks passed
@pietern pietern deleted the bump-go1.26 branch May 21, 2026 20:46
@eng-dev-ecosystem-bot
Copy link
Copy Markdown
Collaborator

Commit: 0c676dc

Run: 26252187456

@eng-dev-ecosystem-bot
Copy link
Copy Markdown
Collaborator

Commit: 0c676dc

Run: 26252157726

TanishqDatabricks pushed a commit to TanishqDatabricks/cli that referenced this pull request May 22, 2026
Bumps `go` to `1.26.0` and `toolchain` to `go1.26.3` across all four
modules (root, `tools/`, `tools/task/`, `bundle/internal/tf/codegen/`),
and folds in the `golangci-lint --fix` output that the new minor version
requires.

Bumping the `go` directive to 1.26 unlocks two `modernize` analyzers
(already enabled in `.golangci.yaml`) that were silent on 1.25:

- `stditerators` — prefer `reflect.Type.Fields()`/`Methods()` and
`reflect.Value.Fields()`/`Methods()` over the `NumField()`/`Field(i)`
loop pattern.
- `newexpr` — replace local `*T` helpers like `func intPtr(v int) *int {
return &v }` (and their callers) with Go 1.26's `new(expr)`.

These fixes are in the same PR so CI doesn't fail the moment the bump
lands. A manual fixup commit removes the redundant `field := field`
shadows and the now-dead `*Ptr` helpers the auto-fix left behind
(including rewriting 20 `int64Ptr(N)` callers to `new(int64(N))`).

Release notes: https://go.dev/doc/go1.26

## Test plan

- `go build ./...` and `go vet ./...` clean on all four modules
- `go tool -modfile=tools/go.mod golangci-lint run ./...` — 0 issues
- Unit tests pass on all packages touched by the `--fix` and cleanup

This pull request and its description were written by Isaac.
deco-sdk-tagging Bot added a commit that referenced this pull request May 27, 2026
## Release v1.1.0

### Bundles
* The error reported when a direct-only resource (catalogs, external locations, vector search endpoints) is used with the terraform engine now also suggests setting `bundle.engine: direct` in `databricks.yml`, in addition to the `DATABRICKS_BUNDLE_ENGINE` environment variable ([#5295](#5295)).

* Added `vector_search_indexes` as a bundle resource (direct engine only). Supports UC grants and prompts for confirmation on recreate or delete since both are destructive ([#5123](#5123)).

### Dependency updates

* Bump Go toolchain to 1.26.3 ([#5302](#5302)).
* Bump `github.com/databricks/databricks-sdk-go` from v0.132.0 to v0.136.0.
denik pushed a commit that referenced this pull request May 28, 2026
Bumps `go` to `1.26.0` and `toolchain` to `go1.26.3` across all four
modules (root, `tools/`, `tools/task/`, `bundle/internal/tf/codegen/`),
and folds in the `golangci-lint --fix` output that the new minor version
requires.

Bumping the `go` directive to 1.26 unlocks two `modernize` analyzers
(already enabled in `.golangci.yaml`) that were silent on 1.25:

- `stditerators` — prefer `reflect.Type.Fields()`/`Methods()` and
`reflect.Value.Fields()`/`Methods()` over the `NumField()`/`Field(i)`
loop pattern.
- `newexpr` — replace local `*T` helpers like `func intPtr(v int) *int {
return &v }` (and their callers) with Go 1.26's `new(expr)`.

These fixes are in the same PR so CI doesn't fail the moment the bump
lands. A manual fixup commit removes the redundant `field := field`
shadows and the now-dead `*Ptr` helpers the auto-fix left behind
(including rewriting 20 `int64Ptr(N)` callers to `new(int64(N))`).

Release notes: https://go.dev/doc/go1.26

## Test plan

- `go build ./...` and `go vet ./...` clean on all four modules
- `go tool -modfile=tools/go.mod golangci-lint run ./...` — 0 issues
- Unit tests pass on all packages touched by the `--fix` and cleanup

This pull request and its description were written by Isaac.
denik pushed a commit that referenced this pull request May 28, 2026
Stacked on top of #5302.

Go 1.26 fixed the inlining regression that made `b.Loop()` worse than
`b.N` on 1.24/1.25. Migrates the 4 remaining loops and adds a ruleguard
rule. Redundant `b.ResetTimer()`/`b.StopTimer()` around each loop are
removed too.

This pull request and its description were written by Isaac.
denik pushed a commit that referenced this pull request May 28, 2026
Stacked on top of #5302.

Go 1.26 adds the generic, compile-time-checked `errors.AsType[T]`.
Migrates the 75 call sites and adds a forbidigo rule. One `//nolint`
exception where the target type is dynamic.

This pull request and its description were written by Isaac.

---------

Co-authored-by: Jan N Rose <janniklas.rose@gmail.com>
denik pushed a commit that referenced this pull request May 28, 2026
## Release v1.1.0

### Bundles
* The error reported when a direct-only resource (catalogs, external locations, vector search endpoints) is used with the terraform engine now also suggests setting `bundle.engine: direct` in `databricks.yml`, in addition to the `DATABRICKS_BUNDLE_ENGINE` environment variable ([#5295](#5295)).

* Added `vector_search_indexes` as a bundle resource (direct engine only). Supports UC grants and prompts for confirmation on recreate or delete since both are destructive ([#5123](#5123)).

### Dependency updates

* Bump Go toolchain to 1.26.3 ([#5302](#5302)).
* Bump `github.com/databricks/databricks-sdk-go` from v0.132.0 to v0.136.0.
bernardo-rodriguez pushed a commit to bernardo-rodriguez/b-cli that referenced this pull request Jun 2, 2026
Stacked on top of databricks#5302.

Go 1.26 fixed the inlining regression that made `b.Loop()` worse than
`b.N` on 1.24/1.25. Migrates the 4 remaining loops and adds a ruleguard
rule. Redundant `b.ResetTimer()`/`b.StopTimer()` around each loop are
removed too.

This pull request and its description were written by Isaac.
bernardo-rodriguez pushed a commit to bernardo-rodriguez/b-cli that referenced this pull request Jun 2, 2026
Stacked on top of databricks#5302.

Go 1.26 adds the generic, compile-time-checked `errors.AsType[T]`.
Migrates the 75 call sites and adds a forbidigo rule. One `//nolint`
exception where the target type is dynamic.

This pull request and its description were written by Isaac.

---------

Co-authored-by: Jan N Rose <janniklas.rose@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants