Skip to content

Conversation

hwdef
Copy link
Contributor

@hwdef hwdef commented Aug 27, 2025

@hwdef hwdef force-pushed the bump-go125 branch 2 times, most recently from 6bc8c7f to 199725a Compare August 27, 2025 03:19
@hwdef
Copy link
Contributor Author

hwdef commented Aug 28, 2025

@ivanvc
It looks like I need to update the version of golangci-lint in test-infra. Do you know how to do that? I haven't modified test-infra before. :)

@ivanvc
Copy link
Member

ivanvc commented Aug 28, 2025

Hey @hwdef, Prow (test-infra) is using the golangci-lint version defined in tools/mod:

github.com/golangci/golangci-lint v1.64.8

@hwdef
Copy link
Contributor Author

hwdef commented Aug 28, 2025

@hwdef
Copy link
Contributor Author

hwdef commented Aug 29, 2025

@ivanvc @ahrtr
It looks like I have to modify a lot of lint-related code. Is it better to create a new PR?

@ivanvc
Copy link
Member

ivanvc commented Aug 29, 2025

@ivanvc @ahrtr
It looks like I have to modify a lot of lint-related code. Is it better to create a new PR?

Yes, let's bump golangci-lint. It doesn't need or depend on Go 1.25.

@hwdef
Copy link
Contributor Author

hwdef commented Sep 2, 2025

/retest

@ivanvc
Copy link
Member

ivanvc commented Sep 2, 2025

I read the logs from the Prow job. Even though there are some warning logs, there doesn't seem to be any failed tests (looking for "FAIL"). I ran this locally by running go mod tidy; make test. The output is the same from the Prow job, but the exit status is zero.

Then, I ran the tests using pj-on-kind.sh (running ./config/pj-on-kind.sh pull-etcd-operator-test from the test-infra repository, then entering this pull request number). It does fail with the same error, but there are no test failures.

I'm investigating further.

@ivanvc
Copy link
Member

ivanvc commented Sep 2, 2025

It must be something in cert_manager, as it is failing just before it. Comparing logs from 1.24 (https://prow.k8s.io/view/gs/kubernetes-ci-logs/logs/post-etcd-operator-test/1962815493249175552)

...
coverage: 84.8% of statements
ok      go.etcd.io/etcd-operator/internal/etcdutils     154.430s        coverage: 84.8% of statements
        go.etcd.io/etcd-operator/pkg/certificate                coverage: 0.0% of statements
?       go.etcd.io/etcd-operator/pkg/certificate/auto   [no test files]
        go.etcd.io/etcd-operator/pkg/certificate/cert_manager           coverage: 0.0% of statements
?       go.etcd.io/etcd-operator/pkg/certificate/interfaces     [no test files]
        go.etcd.io/etcd-operator/test/utils             coverage: 0.0% of statements

vs. 1.25 (https://prow.k8s.io/view/gs/kubernetes-ci-logs/pr-logs/pull/etcd-io_etcd-operator/196/pull-etcd-operator-test/1962910352807038976#)

...
 ok  	go.etcd.io/etcd-operator/internal/etcdutils	153.646s	coverage: 84.8% of statements
?   	go.etcd.io/etcd-operator/pkg/certificate/auto	[no test files]
?   	go.etcd.io/etcd-operator/pkg/certificate/interfaces	[no test files]
make: *** [Makefile:67: test] Error 1 

Note that the warnings we're seeing in 1.25 are also present in 1.24.

@ahrtr
Copy link
Member

ahrtr commented Sep 2, 2025

Note that the warnings we're seeing in 1.25 are also present in 1.24.

But go 1.24 won't fail the workflow. cc @ArkaSaha30

@ivanvc
Copy link
Member

ivanvc commented Sep 2, 2025

But go 1.24 won't fail the workflow

One of the issues is that this is only reproducible in the kubekins image using Go 1.25. Running locally make test with Go 1.25 works fine.

@ivanvc
Copy link
Member

ivanvc commented Sep 3, 2025

I ran the tests for every module one by one, with the kubekins image, and I couldn't get it to fail 🤕

@ivanvc
Copy link
Member

ivanvc commented Sep 3, 2025

I found the issue. It wasn't very clear, but there are some log lines:

go: no such tool "covdata"

Which are the ones causing the issue. The problem was that the exit code and message weren't clear about it.

Reference: golang/go#75031

The solution (and confirmed by me in the kubekins image with pj-on-kind.sh) is to set the GOTOOLCHAIN environment variable to go1.25.0.

Related to: etcd-io/etcd#20576

@hwdef
Copy link
Contributor Author

hwdef commented Sep 4, 2025

I found the issue. It wasn't very clear, but there are some log lines:

go: no such tool "covdata"

Which are the ones causing the issue. The problem was that the exit code and message weren't clear about it.

Reference: golang/go#75031

The solution (and confirmed by me in the kubekins image with pj-on-kind.sh) is to set the GOTOOLCHAIN environment variable to go1.25.0.

Related to: etcd-io/etcd#20576

Awesome, you're a genius.🫡

@ivanvc
Copy link
Member

ivanvc commented Sep 4, 2025

@hwdef, could you update the version to 1.25.1? So we can re-use the same PR? Thanks.

Link to etcd-io/etcd#20602.

@hwdef
Copy link
Contributor Author

hwdef commented Sep 4, 2025

@hwdef, could you update the version to 1.25.1? So we can re-use the same PR? Thanks.

Link to etcd-io/etcd#20602.

sure.

@hwdef hwdef changed the title Bump Go to 1.25.0 Bump Go to 1.25.1 Sep 4, 2025
@ahrtr
Copy link
Member

ahrtr commented Sep 4, 2025

I found the issue. It wasn't very clear, but there are some log lines:

go: no such tool "covdata"

Which are the ones causing the issue. The problem was that the exit code and message weren't clear about it.

Reference: golang/go#75031

The solution (and confirmed by me in the kubekins image with pj-on-kind.sh) is to set the GOTOOLCHAIN environment variable to go1.25.0.

Related to: etcd-io/etcd#20576

Thanks for the investigation.

We can apply a workaround similar to spegel-org/spegel#975

@ivanvc
Copy link
Member

ivanvc commented Sep 4, 2025

We can apply a workaround similar to spegel-org/spegel#975

I think the question is, where should we put the environment variable? In the job, or in our Makefile (x-ref: etcd-io/etcd#20576 (comment))

@ivanvc
Copy link
Member

ivanvc commented Sep 4, 2025

I think the question is, where should we put the environment variable? In the job, or in our Makefile (x-ref: etcd-io/etcd#20576 (comment))

In #205 I placed it in the Makefile. Ensuring that running locally also uses the version defined in go.mod.

@ivanvc
Copy link
Member

ivanvc commented Sep 5, 2025

@hwdef, could you please rebase your pull request? Thanks :)

Signed-off-by: hwdef <[email protected]>
@hwdef
Copy link
Contributor Author

hwdef commented Sep 7, 2025

@hwdef, could you please rebase your pull request? Thanks :)

done :)

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ahrtr, hwdef

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ahrtr ahrtr merged commit 8fe8096 into etcd-io:main Sep 7, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants