Skip to content

Conversation

@gfariasalves-ionos
Copy link
Contributor

@gfariasalves-ionos gfariasalves-ionos commented Oct 6, 2025

What is the purpose of this pull request/Why do we need it?

Updating stuff so everything is up-to-date.

Issue #, if available:

Description of changes:

We now use go 1.25.1
We now use Mockery v3
We now use golangci-lint v2
License header was updated (2025)

Special notes for your reviewer:

Checklist:

  • Documentation updated
  • Unit Tests added
  • E2E Tests added
  • Includes emojis

@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 6, 2025

@gfariasalves-ionos gfariasalves-ionos changed the title Update to go 1.25.1 Update to go 1.25.1, update mockery to v3 and golangcilint to v2 Oct 6, 2025
@gfariasalves-ionos gfariasalves-ionos changed the title Update to go 1.25.1, update mockery to v3 and golangcilint to v2 🌱 Update to go 1.25.1, update mockery to v3 and golangcilint to v2 Oct 6, 2025
@gfariasalves-ionos gfariasalves-ionos marked this pull request as ready for review October 6, 2025 14:39
Copilot AI review requested due to automatic review settings October 6, 2025 14:39
Copy link

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 toolchain to use the latest versions of Go, Mockery, and golangci-lint, while also updating license headers to 2025.

  • Updates Go version from 1.24.7 to 1.25.1 across Dockerfile and go.mod
  • Upgrades Mockery from v2 to v3 and golangci-lint from v1 to v2
  • Updates all license headers to Copyright 2025 IONOS Cloud
  • Refactors concurrent test patterns to use sync.WaitGroup.Go() method

Reviewed Changes

Copilot reviewed 59 out of 60 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
go.mod Updates Go version and dependency versions
Makefile Updates tool versions for golangci-lint and mockery
Dockerfile Updates base Go image to 1.25.1
.golangci.yml Migrates configuration to golangci-lint v2 format
.mockery.yaml Updates configuration for mockery v3
internal/ionoscloud/clienttest/mock_client.go Regenerated mock with mockery v3
scope/cluster_test.go Refactors concurrency test to use WaitGroup.Go()
internal/util/locker/locker_test.go Refactors concurrency test to use WaitGroup.Go()
test/e2e/env_test.go Improves string formatting efficiency
internal/controller/ionoscloudmachine_controller.go Updates to use newer controller-runtime APIs
Multiple files Updates license headers to 2025

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

Comment on lines +368 to +369
id := strconv.Itoa(i)
wg.Go(func() {
Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

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

The variable id is captured by reference in the goroutine closure, which could lead to race conditions or incorrect values being used in concurrent execution. Consider passing id as a parameter to avoid closure capture issues.

Copilot uses AI. Check for mistakes.
Comment on lines +122 to +123
wg.Go(func() {
require.NoError(t, l.Lock(context.Background(), "test"))
Copy link

Copilot AI Oct 6, 2025

Choose a reason for hiding this comment

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

The variable t is captured by reference in the goroutine closure. In concurrent tests, this can lead to race conditions when accessing the testing.T instance. Consider using require.NoError in the main goroutine or use a different assertion approach.

Copilot uses AI. Check for mistakes.
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.

1 participant