Skip to content

chore(go): enable race detector in tests #4622

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

Merged
merged 1 commit into from
Jan 26, 2025

Conversation

erikgb
Copy link
Contributor

@erikgb erikgb commented Jan 26, 2025

Closes

What changed?

  • Enable Go race detector for Go testing (which requires CGO_ENABLED=1)
  • Fix a race detected by the detector when running tests.

Why was this change made?

I am trying to figure out why the Go tests sometimes blocks "forever" in CI. Example: https://github.com/weaveworks/weave-gitops/actions/runs/12973902776/job/36183126193. And I have a feeling this problem is related to Goroutines, missing error handling and/or races. I want to eliminate the latter, so I suggest we enable the race detector for the tests.

How was this change implemented?

How did you validate the change?

Release notes

Documentation Changes

@erikgb erikgb requested a review from a team January 26, 2025 13:40
@erikgb erikgb merged commit 3899dcb into weaveworks:main Jan 26, 2025
18 checks passed
This was referenced Feb 4, 2025
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