Skip to content

Conversation

cosmtrek
Copy link
Collaborator

@cosmtrek cosmtrek commented Sep 7, 2025

  • Updated Dockerfile to use Go 1.25.1 for both builder and final images.
  • Modified README files (Japanese, Chinese Simplified, Chinese Traditional, and English) to reflect the new Go version requirement of 1.25.1.
  • Updated go.mod to specify Go 1.25 and updated dependencies:
    • Upgraded hugo from v0.147.6 to v0.149.1
    • Upgraded testify from v1.10.0 to v1.11.1
    • Upgraded other indirect dependencies to their latest versions.
  • Updated go.sum to reflect the changes in dependencies.

@cosmtrek cosmtrek requested a review from Copilot September 7, 2025 01:48
Copilot

This comment was marked as outdated.

- Updated Dockerfile to use Go 1.25.1 for both builder and final images.
- Modified README files (Japanese, Chinese Simplified, Chinese Traditional, and English) to reflect the new Go version requirement of 1.25.1.
- Updated go.mod to specify Go 1.25 and updated dependencies:
  - Upgraded hugo from v0.147.6 to v0.149.1
  - Upgraded testify from v1.10.0 to v1.11.1
  - Upgraded other indirect dependencies to their latest versions.
- Updated go.sum to reflect the changes in dependencies.
Copy link

codecov bot commented Sep 7, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cosmtrek cosmtrek requested a review from Copilot September 7, 2025 02:12
Copy link

@Copilot 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 updates the project's Go version from 1.24 to 1.25.1 and upgrades various dependencies. It also adds new tooling improvements for golangci-lint version compatibility checking.

  • Updates Go version requirement to 1.25.1 across all environments and documentation
  • Upgrades dependencies including hugo (v0.147.6 → v0.149.1) and testify (v1.10.0 → v1.11.1)
  • Adds golangci-lint version compatibility checking in the check script

Reviewed Changes

Copilot reviewed 13 out of 14 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
go.mod Updates Go version to 1.25 and upgrades direct/indirect dependencies
Dockerfile Updates base images from golang:1.24 to golang:1.25
README*.md Updates Go version requirements in documentation from 1.23/1.24 to 1.25
hack/check.sh Adds golangci-lint version compatibility checking logic
Makefile Updates golangci-lint version and installation method
.github/workflows/*.yml Updates CI workflows to use Go 1.25 and latest golangci-lint
AGENTS.md Adds new contributor guidelines document

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +27 to +29
lint_go_ver=$(golangci-lint --version 2>/dev/null | sed -n 's/.*built with go\([0-9]\+\.[0-9]\+\).*/\1/p')
mod_go_ver=$(sed -n 's/^go \([0-9]\+\.[0-9]\+\).*/\1/p' go.mod | head -n1)
if [[ -n "${lint_go_ver}" && -n "${mod_go_ver}" ]]; then
Copy link

Copilot AI Sep 7, 2025

Choose a reason for hiding this comment

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

The regex pattern may not correctly extract the Go version from golangci-lint output. The actual output format might be different, and this could result in an empty string. Consider testing this regex against actual golangci-lint version output or adding error handling for when the extraction fails.

Suggested change
lint_go_ver=$(golangci-lint --version 2>/dev/null | sed -n 's/.*built with go\([0-9]\+\.[0-9]\+\).*/\1/p')
mod_go_ver=$(sed -n 's/^go \([0-9]\+\.[0-9]\+\).*/\1/p' go.mod | head -n1)
if [[ -n "${lint_go_ver}" && -n "${mod_go_ver}" ]]; then
lint_go_ver=$(golangci-lint --version 2>/dev/null | sed -n -e 's/.*built with go\([0-9]\+\.[0-9]\+\).*/\1/p' -e 's/.*go version go\([0-9]\+\.[0-9]\+\).*/\1/p')
mod_go_ver=$(sed -n 's/^go \([0-9]\+\.[0-9]\+\).*/\1/p' go.mod | head -n1)
if [[ -z "${lint_go_ver}" ]]; then
echo "${red}Warning: Could not extract Go version from golangci-lint output."
golangci-lint --version 2>/dev/null
elif [[ -n "${mod_go_ver}" ]]; then

Copilot uses AI. Check for mistakes.

@cosmtrek cosmtrek merged commit 53e3fb8 into master Sep 7, 2025
9 of 15 checks passed
@reneleonhardt
Copy link

reneleonhardt commented Sep 7, 2025

What does the go directive have to do with the go release used for building binaries or Docker images?
When I analyze all dependencies the maximum go directive is 1.24.0 to satisfy compatibility.
Interestingly enough, that's the exact version go mod tidy produces when you use the previous go directive (or an even older release like go 1.23 for double-checking).

$ go version
go version go1.24.7
$ go mod tidy

Changes the previous go 1.24 to go 1.24.0 to stay compatible to all dependencies.

All new versions in Dockerfile and workflows already ensure that go 1.25.1 is used to build binaries, as you can verify easily:

$ strings air_1.63.0_darwin_amd64 | grep "^go1\.2" | head
go1.25.1

@reneleonhardt
Copy link

Keep in mind that golangci-lint could break your CI unnecessarily, maybe for some workflows or events it shouldn't be allowed to break.
https://www.linkedin.com/pulse/15-hours-one-linter-error-hidden-cost-mismatched-ci-viraj-ghevariya-hb4mc

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