Fix kube discovery service poll_interval value not set correctly#60982
Fix kube discovery service poll_interval value not set correctly#60982
poll_interval value not set correctly#60982Conversation
| func (f *mockAuthServer) CreateApp(ctx context.Context, _ types.Application) error { | ||
| return nil | ||
| } | ||
|
|
||
| func (m *mockAuthServer) GetApps(ctx context.Context) ([]types.Application, error) { | ||
| return nil, nil | ||
| } | ||
|
|
||
| func (m *mockAuthServer) ListApps(ctx context.Context, limit int, startKey string) ([]types.Application, string, error) { | ||
| return nil, "", nil | ||
| } | ||
|
|
||
| func (m *mockAuthServer) RangeApps(ctx context.Context, start, end string) iter.Seq2[types.Application, error] { | ||
| return func(yield func(types.Application, error) bool) {} | ||
| } | ||
|
|
There was a problem hiding this comment.
Currently, I have extended the mockAuthServer implementation here for use in my test in discovery_test.go, since it contains similar logic for my usage with synctest. I felt this was the best way to write the test without interfering with existing test logic in discovery_test.go. I specifically needed the functionality of a mock AccessPoint to eliminate non-durably blocking gRPC calls that impact synctest.
In a future PR, I want to migrate everything in discovery_eks_test.go back to discovery_test.go, and modify existing tests to utilize synctest (and use the same mockAuthServer implementation), but this would be extra scope not intended for this PR.
rosstimothy
left a comment
There was a problem hiding this comment.
Thanks for taking the time to convert the new test to use synctest @kshi36! The changes look good and I've validated them locally as well, just a few further comments I'd like to see addressed before approving.
|
It seems that converting the deprecated |
Using NewClientset is not the source of the flakiness, the number of locations that have been modified to use it is. The Flaky Test Detector runs all modified tests N times and expects them to complete in M seconds. You've modified so many tests that they no cannot complete fast enough. We can either change these one test at a time, or we can bypass the flaky test detector on this PR as is. |
Thank you for the explanation. I was wondering if it was something particular with the flaky test detector, or that I couldn't track flakiness from my local tests passing |
|
Friendly ping @r0mant @bernardjkim @kopiczko |
r0mant
left a comment
There was a problem hiding this comment.
3 line fix + 80 lines of tests. Love it!
|
/excludeflake * |
|
@rosstimothy Was the bypassing flaky test detector successful? |
|
@kshi36 you have to rerun the action for it to see the exclusion comment. |
…60982) * Fix kube discovery service poll interval * Add unit test, pass down clocks in discovery configs * Leverage synctest, pass down clocks properly * Refactor
…60982) * Fix kube discovery service poll interval * Add unit test, pass down clocks in discovery configs * Leverage synctest, pass down clocks properly * Refactor
…tly (#61792) * Fix kube discovery service `poll_interval` value not set correctly (#60982) * Fix kube discovery service poll interval * Add unit test, pass down clocks in discovery configs * Leverage synctest, pass down clocks properly * Refactor * Readd discovery_eks_test.go and new test * Refactor logger * Use NewClientset over deprecated NewSimpleClientset * Update license
…60982) * Fix kube discovery service poll interval * Add unit test, pass down clocks in discovery configs * Leverage synctest, pass down clocks properly * Refactor
Fixes #52581
Manual Tests
Test: Specify a poll interval not equal to the default value of 5 minutes
poll_intervalfieldpoll_intervalfieldExamples:
config file
result
changelog: Fixed bug where Kubernetes App Discovery
poll_intervalis not set correctly