Using Go data race detector to gather data race occurances while running tests
- Dominant language
- Python
- Stars
- 7
- Forks
- 29
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 7
Description
**Summary**
Go data race detector is a build-in run-time checker for concurrency problems in Go code. Go programs can be compiled with this detector enabled which outputs the detection into a log file.
I suggest using following options for the race detector:
- `halt_on_error` set to false. We just want to detect data races, no need for crash
- `log_path` to set a custom path which can be located on a persitentVolume to collect the the logs separately as by default its outputed to stderr. But this would require deploying Kuadrant with some modifications to deployments so maybe its bit out of scope. We could just collect the regular stderr logs and filter out data race occurrences. But would be cleaner with the persistentVolume.
List of Kuadrant components that are build with Go:
- kuadrant-operator
- authorino-operator
- authorino
- dns-operator
- limitador-operator
**Procedure:**
1. Compile Kuadrant components written in Go with data race detector enabled
2. Deploy such modified Kuadrant onto cluster/kind
3. Run testsuite against it
4. Collect logs and send them to devs for investigation
**Additional context**
More info: https://go.dev/doc/articles/race_detector
**Test cases**
No new test cases, just running existing ones with race detector.
Contributor guide
Assessment
This issue has not been assessed yet.