Skip to content

chore: update to go 1.26 and fix vitess build#3925

Merged
slayerjain merged 15 commits intomainfrom
go-1.26
Mar 14, 2026
Merged

chore: update to go 1.26 and fix vitess build#3925
slayerjain merged 15 commits intomainfrom
go-1.26

Conversation

@slayerjain
Copy link
Copy Markdown
Member

@slayerjain slayerjain commented Mar 13, 2026

Describe the changes that are made

  • Upgraded Go version from 1.24/1.25 to 1.26 across go.mod, Dockerfile, and all GitHub Actions workflows
  • Upgraded vitess.io/vitess from v0.22.1 to v0.23.3 to fix Go 1.26 compatibility (swissmap build constraint issue)
  • Upgraded charm.land/glamour from v0.6.0 (github.com/charmbracelet/glamour) to v2.0.0 (module moved to charm.land/glamour/v2)
  • Migrated github.com/olekukonko/tablewriter usage from v0.0.5 API to v1.1.0 API (breaking changes pulled in by vitess v0.23.3)
    • Updated pkg/matcher/utils.go, pkg/service/replay/utils.go, and pkg/service/contract/consumer/consumer.go to use new tablewriter API (NewTable, Header(), Options(), tw.AlignCenter, colorized renderer, etc.)

Links & References

Closes: #3922

🔗 Related PRs

  • NA

🐞 Related Issues

  • NA

📄 Related Documents

  • NA

What type of PR is this? (check all applicable)

  • 📦 Chore
  • 🍕 Feature
  • 🐞 Bug Fix
  • 📝 Documentation Update
  • 🎨 Style
  • 🧑‍💻 Code Refactor
  • 🔥 Performance Improvements
  • ✅ Test
  • 🔁 CI
  • ⏩ Revert

Added e2e test pipeline?

  • 👍 yes
  • 🙅 no, because they aren't needed

Added comments for hard-to-understand areas?

  • 🙅 no, because the code is self-explanatory

Added to documentation?

  • 🙅 no documentation needed

Are there any sample code or steps to test the changes?

  • 👍 yes, mentioned below
# Verify build succeeds with Go 1.26
go build -tags=viper_bind_struct -ldflags="-X main.api_server_uri=https://api.keploy.io" .

# Run tests
go test -tags=viper_bind_struct ./pkg/...

Self Review done?

  • ✅ yes
  • ❌ no, because I need help

Any relevant screenshots, recordings or logs?

  • NA

🧠 Semantics for PR Title & Branch Name

Please ensure your PR title and branch name follow the Keploy semantics:

📌 PR Semantics Guide
📌 Branch Semantics Guide

Examples:

  • PR Title: fix: patch MongoDB document update bug
  • Branch Name: feat/#1-login-flow (You may skip mentioning the issue number in the branch name if the change is small and the PR description clearly explains it.)

Additional checklist:

Copilot AI review requested due to automatic review settings March 13, 2026 15:32
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR upgrades the repository to Go 1.26, updates Vitess (and related dependencies) for Go 1.26 compatibility, and migrates existing terminal table rendering to the github.com/olekukonko/tablewriter v1.x API while aligning CI, Docker, and workflows to the new Go version.

Changes:

  • Bump Go version to 1.26 across go.mod, Dockerfile, and GitHub Actions workflows.
  • Upgrade dependencies including vitess.io/vitess (0.22.1 → 0.23.3) and migrate Glamour to charm.land/glamour/v2.
  • Update table output code to tablewriter v1.x (NewTable, tw options, renderer changes).

Reviewed changes

Copilot reviewed 20 out of 21 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
pkg/service/tools/tools.go Switch Glamour import to v2 module path and update renderer option usage.
pkg/service/replay/utils.go Migrate failure summary table to tablewriter v1.x API with tw configuration.
pkg/service/contract/consumer/consumer.go Migrate summary table to tablewriter v1.x, including vertical cell merge config.
pkg/matcher/utils.go Migrate multiple diff/schema table renderers to tablewriter v1.x (tw + renderer).
go.mod Set Go version to 1.26 and update dependency versions (Vitess, tablewriter, viper, etc.).
go.sum Refresh module checksums to match upgraded dependencies.
Dockerfile Update build image to golang:1.26.
.github/workflows/schema_match_linux.yml Run schema match workflow on Go 1.26.
.github/workflows/sample-run.yml Require Go >= 1.26 for sample run pipeline.
.github/workflows/release.yml Require Go >= 1.26 for release pipeline.
.github/workflows/main.yml Require Go >= 1.26 for main CI workflow.
.github/workflows/grpc_linux.yml Update gRPC linux workflows to Go 1.26.
.github/workflows/golangci-lint.yml Require Go >= 1.26 for golangci-lint workflow.
.github/workflows/golang_linux.yml Update linux build/record jobs to Go 1.26.
.github/workflows/go_windows.yml Require Go >= 1.26 for Windows workflow.
.github/workflows/go_macos.yaml Require Go >= 1.26 for macOS workflow.
.github/workflows/go.yml Require Go >= 1.26 for general Go workflow.
.github/workflows/go-test.yaml Update test workflow Go version to 1.26.
.github/workflows/fuzzer_linux.yml Require Go >= 1.26 across fuzzer jobs.
.github/workflows/docker-publish.yml Require Go >= 1.26 for docker publish pipeline.
.github/actions/setup-private-parsers/action.yaml Require Go >= 1.26 in shared composite action.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 888 to 890
table.Header([]string{initalPart + midPartpaint + endPaint})
table.Append([]string{initalPart + midPartpaint + endPaint})
}
Comment on lines 933 to 934
table.Header([]string{initalPart + midPartpaint + endPaint})
table.Append([]string{initalPart + midPartpaint + endPaint})
Comment on lines +1025 to +1034
var opts []tablewriter.Option
opts = append(opts, tablewriter.WithRowAutoWrap(0))
if !models.IsAnsiDisabled {
table.SetHeaderColor(
tablewriter.Colors{tablewriter.FgHiRedColor},
tablewriter.Colors{tablewriter.FgHiGreenColor},
tablewriter.Colors{tablewriter.FgHiRedColor},
)
opts = append(opts, tablewriter.WithRenderer(renderer.NewColorized(renderer.ColorizedConfig{
Header: renderer.Tint{FG: renderer.Colors{color.FgHiRed}},
})))
}
table.SetAlignment(tablewriter.ALIGN_LEFT)
opts = append(opts, tablewriter.WithRowAlignment(tw.AlignLeft))
table := tablewriter.NewTable(s.out, opts...)
table.Header([]string{"Schema Check Failed", "Expected", "Actual"})
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the repository’s Go/tooling baseline to Go 1.26 and refreshes key dependencies (Vitess, Glamour, Tablewriter) to restore/build compatibility and align CLI output formatting with upstream breaking changes.

Changes:

  • Bumped Go version to 1.26 across go.mod, Dockerfile, and GitHub Actions workflows.
  • Upgraded dependencies including vitess.io/vitess (for Go 1.26 compatibility) and migrated glamour to charm.land/glamour/v2.
  • Migrated github.com/olekukonko/tablewriter usage to the v1.1.0 API across matcher/replay/consumer outputs.

Reviewed changes

Copilot reviewed 21 out of 22 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
go.mod Sets module Go version to 1.26.0 and updates dependency versions (Vitess, Tablewriter, Glamour, etc.).
go.sum Updates checksums for the dependency upgrades.
Dockerfile Builds with golang:1.26 base image.
pkg/service/tools/tools.go Switches Glamour import path to v2 and updates renderer options.
pkg/service/replay/utils.go Updates failure-summary table rendering to the new Tablewriter API.
pkg/service/contract/consumer/consumer.go Updates contract summary table rendering to the new Tablewriter API.
pkg/models/const.go Fixes variadic formatting for highlight helpers (fmt.Sprint(a...)).
pkg/matcher/utils.go Updates diff/schema table rendering to the new Tablewriter API and new color renderer.
.github/workflows/schema_match_linux.yml Uses Go 1.26.x in CI.
.github/workflows/sample-run.yml Raises minimum Go version to >=1.26.
.github/workflows/release.yml Raises minimum Go version to >=1.26.
.github/workflows/main.yml Raises minimum Go version to >=1.26.
.github/workflows/grpc_linux.yml Uses Go 1.26.x in CI matrix jobs.
.github/workflows/golangci-lint.yml Raises minimum Go version to >=1.26.
.github/workflows/golang_linux.yml Uses Go 1.26.x across Linux CI jobs.
.github/workflows/go_windows.yml Raises minimum Go version to >=1.26.
.github/workflows/go_macos.yaml Raises minimum Go version to >=1.26.
.github/workflows/go.yml Raises minimum Go version to >=1.26.
.github/workflows/go-test.yaml Sets Go version to 1.26 for tests workflow.
.github/workflows/fuzzer_linux.yml Raises minimum Go version to >=1.26 across fuzzer jobs.
.github/workflows/docker-publish.yml Raises minimum Go version to >=1.26.
.github/actions/setup-private-parsers/action.yaml Raises minimum Go version to >=1.26 for the composite action.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the repository toolchain and key dependencies to build and run cleanly on Go 1.26, including upstream dependency changes that required API migrations (notably tablewriter and glamour).

Changes:

  • Bumped Go version/toolchain to 1.26 across go.mod, Docker image, and GitHub Actions workflows.
  • Upgraded dependencies (e.g., vitess, glamour module path, tablewriter v1.x) and migrated call sites to new APIs.
  • Adjusted terminal/table rendering output code paths to compile with updated libraries.

Reviewed changes

Copilot reviewed 21 out of 22 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
pkg/service/tools/tools.go Switches to charm.land/glamour/v2 and updates renderer options.
pkg/service/replay/utils.go Migrates mocks mismatch summary table to tablewriter v1.x API.
pkg/service/contract/consumer/consumer.go Migrates contract summary table to tablewriter v1.x API.
pkg/models/const.go Fixes varargs forwarding for highlight formatting helpers.
pkg/matcher/utils.go Migrates diff/schema table rendering to tablewriter v1.x API + color renderer.
go.mod Updates Go version/toolchain and bumps dependencies (vitess, tablewriter, glamour v2, etc.).
go.sum Refreshes module checksums after dependency upgrades.
Dockerfile Updates build stage base image to Go 1.26.
.github/workflows/schema_match_linux.yml Updates CI Go version to 1.26.x.
.github/workflows/sample-run.yml Updates CI Go version constraint to >=1.26.
.github/workflows/release.yml Updates CI Go version constraint to >=1.26.
.github/workflows/main.yml Updates CI Go version constraint to >=1.26.
.github/workflows/grpc_linux.yml Updates CI Go versions to 1.26.x.
.github/workflows/golangci-lint.yml Updates CI Go version constraint to >=1.26.
.github/workflows/golang_linux.yml Updates CI Go versions to 1.26.x.
.github/workflows/go_windows.yml Updates CI Go version constraint to >=1.26.
.github/workflows/go_macos.yaml Updates CI Go version constraint to >=1.26.
.github/workflows/go.yml Updates CI Go version constraint to >=1.26.
.github/workflows/go-test.yaml Updates CI Go version to 1.26 (but still uses setup-go@v4).
.github/workflows/fuzzer_linux.yml Updates CI Go version constraint to >=1.26.
.github/workflows/docker-publish.yml Updates CI Go version constraint to >=1.26.
.github/actions/setup-private-parsers/action.yaml Updates composite action Go version constraint to >=1.26.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

uses: actions/setup-go@v5
with:
go-version: ">=1.24"
go-version: ">=1.26"
Copy link
Copy Markdown

@stefanb stefanb Mar 14, 2026

Choose a reason for hiding this comment

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

I would strongly recommend upgrading to v6 and using the toolchain as defined in go.mod:

      uses: actions/setup-go@v6
      with:
        go-version-file: go.mod

That way you have Go toolchain version defined in only one place, making further upgrades easier and it behaves same as in local developer's environment.
That applies to all workflows with setup-go step.
The only "downside" with this approach is that you need to upgrade every minor version to use it instead of having it defined as minimum using ">=1.xx" pattern, which can also be considered good, giving you exact control.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Agreed, Thanks for the suggestion!

Let me implement it

uses: actions/setup-go@v6
with:
go-version: ">=1.24"
go-version-file: go.mod
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It seems that in custom action this needs to be handled slightly different (as an input?)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Ah, it seems that

uses: webfactory/ssh-agent@v0.9.0

should also be upgraded to use https://github.com/webfactory/ssh-agent/releases/tag/v0.10.0

Copy link
Copy Markdown
Member

@officialasishkumar officialasishkumar Mar 14, 2026

Choose a reason for hiding this comment

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

Thanks for the suggestion!

made the changes

the problem was our macos runner was on an older version. I have updated it to 2.332.0.

https://github.com/actions/setup-go/blob/v6/README.md#v6-changes

steps:
- name: Set up Go
uses: actions/setup-go@v6
uses: actions/setup-go@v5
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

v5 does not properly support toolchain selection, because

was released in v6.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks! made the changes

@slayerjain slayerjain merged commit d6541ac into main Mar 14, 2026
16 of 17 checks passed
@slayerjain slayerjain deleted the go-1.26 branch March 14, 2026 10:34
@github-actions github-actions bot locked and limited conversation to collaborators Mar 14, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants