Skip to content

Update to Go 1.25#656

Merged
JaydipGabani merged 6 commits intomasterfrom
copilot/update-go-version-1-25
Dec 18, 2025
Merged

Update to Go 1.25#656
JaydipGabani merged 6 commits intomasterfrom
copilot/update-go-version-1-25

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Dec 17, 2025

Updates Go version to 1.25 across the project.

Changes

  • constraint/go.mod: go 1.24.6go 1.25
  • .github/workflows/dependency-review.yml: go-version: "1.22""1.25" (vuln-check job was lagging behind)

Already on 1.25

  • constraint/Dockerfile (golang:1.25-bookworm)
  • .github/workflows/gatekeeper.yml, lint.yml, workflow.yml
Original prompt

Update to go 1.25 for this project, should include go.mod files, any dockerfile where go binary is being used, any workflow files where go is being used or set up.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: JaydipGabani <20255485+JaydipGabani@users.noreply.github.com>
Copilot AI changed the title [WIP] Update project to use Go 1.25 Update to Go 1.25 Dec 17, 2025
Copilot AI requested a review from JaydipGabani December 17, 2025 21:27
Signed-off-by: Jaydip Gabani <gabanijaydip@gmail.com>
Signed-off-by: Jaydip Gabani <gabanijaydip@gmail.com>
Signed-off-by: Jaydip Gabani <gabanijaydip@gmail.com>
Copy link
Copy Markdown

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 pull request aims to update the Go version to 1.25 across the project, but critically, it attempts to use Go 1.25 which does not exist as of January 2025. The PR also includes substantial unrelated code quality improvements including documentation additions, linter configuration updates, code refactoring, and error handling improvements.

Key Issues

  • Critical: Go version 1.25 does not exist (latest is 1.24.x as of January 2025)
  • Critical: golangci-lint version 2.7.2 does not exist (should be v1.x series)
  • The PR mixes version updates with extensive code quality improvements that are unrelated to the stated purpose

Key Changes Beyond Version Update

  • Added extensive package and function documentation comments across multiple files
  • Refactored ObjectMeta.Field to direct field access (e.g., ObjectMeta.NameName)
  • Updated error messages to follow Go conventions (lowercase first letter)
  • Added nolint directives with justifications for security and other linter warnings
  • Improved error handling (e.g., explicit error checking for Close() calls)
  • Updated .golangci.yaml configuration including new version field and formatters section
  • Removed duplicate import in constraint/cmd/rewrite-compatibility/main.go
  • Refactored external data builtin to defer provider lookups until needed

Reviewed changes

Copilot reviewed 64 out of 64 changed files in this pull request and generated no comments.

Show a summary per file
File Description
constraint/go.mod Updates Go version to 1.25 (non-existent version)
.github/workflows/dependency-review.yml Updates Go version in vuln-check job to 1.25
constraint/Makefile Updates golangci-lint version to 2.7.2 (non-existent version)
constraint/.golangci.yaml Adds version field, updates Go to 1.25, restructures linters/formatters
Multiple .go files Adds package and function documentation comments
constraint/pkg/client/crds/crds.go Refactors ObjectMeta field access to direct field access
constraint/pkg/client/crds/crds_test.go Refactors ObjectMeta.Labels to Labels
constraint/pkg/client/client.go Refactors ObjectMeta.Name to Name
constraint/pkg/core/templates/constrainttemplate_types.go Refactors ObjectMeta.Labels to Labels
constraint/pkg/client/clienttest/cts/opts.go Refactors ObjectMeta field access to direct access
Multiple error files Adds documentation and changes error message capitalization
constraint/pkg/regorewriter/ files Renames new parameter to newPath to avoid builtin conflict
constraint/pkg/externaldata/request.go Improves defer error handling
constraint/pkg/client/drivers/rego/builtin.go Defers provider lookups to optimize performance
Multiple test files Improves error handling with explicit error checking
CRD YAML files Updates OpenAPI schema descriptions
constraint/cmd/rewrite-compatibility/main.go Removes duplicate glog import

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

@JaydipGabani JaydipGabani marked this pull request as ready for review December 18, 2025 20:28
@JaydipGabani JaydipGabani merged commit a254e1c into master Dec 18, 2025
11 checks passed
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.

4 participants