Skip to content

build: update Go to 1.27.1 and modernize the codebase - #2798

Merged
yxxhero merged 1 commit into
mainfrom
chore/update-go-to-1.27
Sep 16, 2026
Merged

yxxhero merged 1 commit into
mainfrom
chore/update-go-to-1.27

Conversation

@yxxhero

@yxxhero yxxhero commented Sep 15, 2026

Copy link
Copy Markdown
Member

Summary

Updates the toolchain to Go 1.27.1 and modernizes the codebase accordingly, mirroring the scope of the 1.25 → 1.26 bump (#2535).

Toolchain and CI

  • go.mod: go 1.26.8 → go 1.27.1; CI picks it up automatically via go-version-file: go.mod
  • Dockerfiles: golang:1.26-alpine → golang:1.27-alpine (verified the tag exists)
  • golangci-lint v2.11.4 → v2.13.2 (first release with go1.27 support)

Lint fixes required by golangci-lint v2.13.2

  • goconst: ignore-tests: true — goconst got stricter since v2.12; all 436 new findings are test-only strings ("foo", "1.0.0", …) and the option was added specifically for this case
  • openai.go: keep deprecated MaxTokens with a //nolint:staticcheck rationale — max_tokens is the only form universally supported by OpenAI-compatible backends (One-API, LiteLLM, Ollama shim); switching to MaxCompletionTokens would break them
  • state.go: appendChartVersionFlags → chartVersionFlags — dropped the always-nil flags param (unparam)

Modernization (go fix ./..., 62 files)

  • interface{} → any, maps.Copy, strings.SplitSeq, range-over-int, builtin min/max, slices.Contains/ContainsFunc/Sort, sync.WaitGroup.Go, reflect.Type.Fields() (1.27), new(expr)
  • exit_error.go: strings.Builder + fmt.Fprintf instead of string concatenation and WriteString(fmt.Sprintf(...)) — byte-identical output, goldens unchanged
  • chart_dependency.go: strings.CutLast (new in 1.27) for the OCI dependency helpers

New CI gate for outdated Go patterns

Added a step to the lint job running go fix -diff ./... — it fails (exit 1) whenever a modernizer would rewrite code, so old-style Go can't creep back in. Locally: make check-modernize; fix with go fix ./... && make fmt.

Notes for release

⚠️ darwin binaries now require macOS 13+ (Go 1.27 dropped older versions) — worth a line in the next release notes.

Verification

  • go build ./..., go vet ./...
  • golangci-lint run (v2.13.2, same as CI): 0 issues
  • Full unit test suite passes on go1.27.1 (encoding/json v2 backend swap verified — no error-message assertions)
  • go fix -diff ./... clean; negative test confirmed the new gate fails on old-style code

Toolchain and CI:
- Bump go directive from 1.26.8 to 1.27.1 (go.mod)
- Use golang:1.27-alpine builder images in all Dockerfiles
- Bump golangci-lint to v2.13.2 (first release with go1.27 support)
- Add CI gate: `go fix -diff` fails when outdated Go patterns are
  detected (locally: `make check-modernize`)

Note: darwin binaries now require macOS 13 or later.

Lint fixes required by golangci-lint v2.13.2:
- goconst: ignore tests (all 436 findings were test-only; goconst
  got stricter since v2.12 and this option was added for it)
- openai.go: keep deprecated MaxTokens deliberately with a nolint
  rationale (max_tokens is the only form universally supported by
  OpenAI-compatible backends like One-API, LiteLLM, Ollama shim)
- state.go: drop always-nil flags param from appendChartVersionFlags
  (renamed to chartVersionFlags, unparam)

Modernization (go fix ./..., 62 files):
- interface{} -> any, maps.Copy, strings.SplitSeq, range-over-int,
  builtin min/max, slices.Contains/ContainsFunc/Sort, WaitGroup.Go,
  reflect.Type.Fields(), new(expr)
- exit_error.go: strings.Builder + fmt.Fprintf instead of string
  concatenation and WriteString(fmt.Sprintf(...)) (QF1012)
- chart_dependency.go: strings.CutLast for OCI dependency helpers

Co-authored-by: Claude <[email protected]>
Signed-off-by: yxxhero <[email protected]>
@yxxhero
yxxhero merged commit ad81e42 into main Sep 16, 2026
16 checks passed
@yxxhero
yxxhero deleted the chore/update-go-to-1.27 branch September 16, 2026 05:29
hbjydev pushed a commit to hbjydev/phoebe that referenced this pull request Oct 5, 2026
…#829)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [aqua:helmfile/helmfile](https://github.com/helmfile/helmfile) | tools | patch | `1.8.0` → `1.8.1` |

---

### Release Notes

<details>
<summary>helmfile/helmfile (aqua:helmfile/helmfile)</summary>

### [`v1.8.1`](https://github.com/helmfile/helmfile/releases/tag/v1.8.1)

[Compare Source](helmfile/helmfile@v1.8.0...v1.8.1)

#### What's Changed

- feat: add HELMFILE\_DISABLE\_VALS env var to skip vals processing by [@&#8203;jimmyR](https://github.com/jimmyR) in [#&#8203;2471](helmfile/helmfile#2471)
- build(deps): bump github.com/mattn/go-runewidth from 0.0.29 to 0.0.30 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2796](helmfile/helmfile#2796)
- build(deps): bump golang.org/x/term from 0.45.0 to 0.46.0 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2795](helmfile/helmfile#2795)
- build(deps): bump github.com/sashabaranov/go-openai from 1.42.0 to 1.42.1 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2792](helmfile/helmfile#2792)
- fix: cancel kubedog-tracked helm subprocesses on SIGINT/SIGTERM by [@&#8203;vulragrag-star](https://github.com/vulragrag-star) in [#&#8203;2791](helmfile/helmfile#2791)
- build(deps): bump github.com/hashicorp/go-getter/v2 from 2.2.3 to 2.2.4 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2793](helmfile/helmfile#2793)
- build(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.33.3 to 1.33.4 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2794](helmfile/helmfile#2794)
- build(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.111.0 to 1.113.1 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2797](helmfile/helmfile#2797)
- build: update Go to 1.27.1 and modernize the codebase by [@&#8203;yxxhero](https://github.com/yxxhero) in [#&#8203;2798](helmfile/helmfile#2798)
- build(deps): bump github.com/helmfile/chartify from 0.28.2 to 0.29.0 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2803](helmfile/helmfile#2803)
- build(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.33.4 to 1.33.5 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2801](helmfile/helmfile#2801)
- build(deps): bump github.com/hashicorp/hcl/v2 from 2.24.0 to 2.25.0 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2802](helmfile/helmfile#2802)
- feat: add per-release continue-on-error support by [@&#8203;Tsukoyachi](https://github.com/Tsukoyachi) in [#&#8203;2804](helmfile/helmfile#2804)
- fix: remove partially extracted chart when helm pull fails by [@&#8203;schmidtjohannes](https://github.com/schmidtjohannes) in [#&#8203;2805](helmfile/helmfile#2805)
- build(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.113.1 to 1.113.2 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2808](helmfile/helmfile#2808)
- build(deps): bump github.com/helmfile/vals from 0.46.1 to 0.47.0 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2806](helmfile/helmfile#2806)
- ci: publish a signed packslip with each release by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;2809](helmfile/helmfile#2809)
- build(deps): bump github.com/aws/aws-sdk-go-v2/service/s3 from 1.113.2 to 1.113.4 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2811](helmfile/helmfile#2811)
- build(deps): bump github.com/aws/aws-sdk-go-v2/config from 1.33.5 to 1.33.6 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;2810](helmfile/helmfile#2810)
- add --track-logs-interval flag by [@&#8203;pznamensky](https://github.com/pznamensky) in [#&#8203;2807](helmfile/helmfile#2807)
- fix: drop leading dot from release condition error message by [@&#8203;Cayan](https://github.com/Cayan) in [#&#8203;2812](helmfile/helmfile#2812)

#### New Contributors

- [@&#8203;jimmyR](https://github.com/jimmyR) made their first contribution in [#&#8203;2471](helmfile/helmfile#2471)
- [@&#8203;vulragrag-star](https://github.com/vulragrag-star) made their first contribution in [#&#8203;2791](helmfile/helmfile#2791)
- [@&#8203;Tsukoyachi](https://github.com/Tsukoyachi) made their first contribution in [#&#8203;2804](helmfile/helmfile#2804)
- [@&#8203;schmidtjohannes](https://github.com/schmidtjohannes) made their first contribution in [#&#8203;2805](helmfile/helmfile#2805)
- [@&#8203;jdx](https://github.com/jdx) made their first contribution in [#&#8203;2809](helmfile/helmfile#2809)
- [@&#8203;pznamensky](https://github.com/pznamensky) made their first contribution in [#&#8203;2807](helmfile/helmfile#2807)
- [@&#8203;Cayan](https://github.com/Cayan) made their first contribution in [#&#8203;2812](helmfile/helmfile#2812)

**Full Changelog**: <helmfile/helmfile@v1.8.0...v1.8.1>

</details>

---

### Configuration

📅 **Schedule**: (in timezone Europe/London)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMzMuMCIsInVwZGF0ZWRJblZlciI6IjQ0LjEzMy4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJ0eXBlL3BhdGNoIl19-->

Reviewed-on: https://git.hayden.moe/hayden/phoebe/pulls/829
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.

2 participants