Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Go v1.22 broke getting test coverage #17560

Closed
4 tasks done
ivanvc opened this issue Mar 8, 2024 · 6 comments · Fixed by #17713
Closed
4 tasks done

Update to Go v1.22 broke getting test coverage #17560

ivanvc opened this issue Mar 8, 2024 · 6 comments · Fixed by #17713
Assignees
Labels
area/testing area/tooling priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. type/bug

Comments

@ivanvc
Copy link
Member

ivanvc commented Mar 8, 2024

Bug report criteria

What happened?

After the Go 1.22 update, the coverage workflow has been failing. See https://github.com/etcd-io/etcd/actions/workflows/coverage.yaml.

After some investigation, it is possible to duplicate the issue locally. It seems like v1.22 had a significant coverage rewrite, which appears to be broken.

What did you expect to happen?

The coverage workflow should run as expected.

How can we reproduce it (as minimally and precisely as possible)?

Currently, the main branch is presenting the issue. Refer to https://github.com/etcd-io/etcd/actions/workflows/coverage.yaml to see the failed runs.

Anything else we need to know?

No response

Etcd version (please run commands below)

$ etcd --version
# paste output here

$ etcdctl version
# paste output here

Etcd configuration (command line flags or environment variables)

paste your configuration here

Etcd debug information (please run commands below, feel free to obfuscate the IP address or FQDN in the output)

$ etcdctl member list -w table
# paste output here

$ etcdctl --endpoints=<member list> endpoint status -w table
# paste output here

Relevant log output

No response

@ivanvc ivanvc added the type/bug label Mar 8, 2024
@ivanvc
Copy link
Member Author

ivanvc commented Mar 8, 2024

I opened golang/go#66211, as this issue hasn't been reported yet.

An immediate workaround is running the coverage with the environment variable GOEXPERIMENT=nocoverageredesign.

I see two possible solutions inject GOEXPERIMENT=nocoverageredesign:

  1. in scripts/codecov_upload.sh (https://github.com/etcd-io/etcd/blob/main/scripts/codecov_upload.sh#L11)
  2. in scripts/test.sh

The first option will fix the GitHub workflow. But running the coverage locally will still fail. Given that it should be a temporary workaround, I think the first option is acceptable.

@ahrtr
Copy link
Member

ahrtr commented Mar 9, 2024

Thanks @ivanvc for raising this issue, which I wanted to raise but did not get time to do it.

The first option will fix the GitHub workflow. But running the coverage locally will still fail. Given that it should be a temporary workaround, I think the first option is acceptable.

Agreed for now. We can fix it for now, but let's keep this issue open and see what's the feedback on golang/go#66211

@ivanvc
Copy link
Member Author

ivanvc commented Mar 9, 2024

/assign

@ivanvc
Copy link
Member Author

ivanvc commented Mar 11, 2024

Seems like it's likely going to be fixed in Go 1.23

Ref: golang/go#66137

@jmhbnz jmhbnz added area/testing area/tooling priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. labels Mar 12, 2024
@ivanvc
Copy link
Member Author

ivanvc commented Mar 21, 2024

Update: The fix was backported into 1.22, so the next release (1.22.2) should close this issue.

@ivanvc
Copy link
Member Author

ivanvc commented Apr 4, 2024

I just tested locally with the newly released 1.22.2, and the issue is gone. Once we update it, I'll open a PR to remove the workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/testing area/tooling priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. type/bug
Development

Successfully merging a pull request may close this issue.

3 participants