-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Flaky test: TestCoreDNSApplyChanges #4240
Comments
I had a look and I'm not exactly sure why the test is failing in CI. There are two problems that I've identified so far:
|
Interesting this sounds like a common Go iteration issue if you hold only the reference to the last one of a list.... |
I had another look and it could be this code in coredns_test.go, where we directly store the pointers to the given service in the map. func (c fakeETCDClient) SaveService(service *Service) error {
c.services[service.Key] = service
return nil
} I have no idea about Go, so I don't know which guarantees there are around pointers, but during debugging I saw that in this loop, after the 3rd run, the fakeETCDClient contains 3 pointers which all point to the same memory, so they all have Host=7.7.7.7, even though the "Add/set key..." logging output shows the 3 different IPs for _, service := range services {
log.Infof("Add/set key %s to Host=%s, Text=%s, TTL=%d", service.Key, service.Host, service.Text, service.TTL)
if !p.dryRun {
err := p.client.SaveService(&service) I'm trying to create a PR, but, as I said, no idea about Go |
@szuecs OK, I created a PR. Please have a look, I hope it will fix the issues! 🙏 |
Issue for TestCoreDNSApplyChanges test failure, as it's currently affecting multiple PRs
The text was updated successfully, but these errors were encountered: