-
Notifications
You must be signed in to change notification settings - Fork 217
List continuation and watch bookmark support #1881
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
Changes from all commits
ee2b134
a98a366
8056b45
6ea6874
5fa913e
a642f8a
a94ab5e
604f41a
1e3b392
8a43b85
af2f2b3
80ddf89
94aafd6
6873ba6
b95eccc
a933fb4
61b5ba9
39ae629
5cf2335
c5c93f4
608af60
cf46795
f3ef12a
093e373
fb4b6a8
ee58238
704c4d3
9314171
7619b35
ecdb291
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,6 +93,11 @@ void waitForExit() { | |
} | ||
} | ||
|
||
// for test | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was thinking that getNewResourceVersion() method of There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you follow the logic through, you will see that this is what happens. I'm working on another branch, but tomorrow I'll find the existing code. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok, got it. I wonder if we need to test it functionally (in integration test or stress test) to verify if bookmark events helps in mitigating the impact of short event history window. In any case, this looks fine to me. |
||
String getResourceVersion() { | ||
return resourceVersion; | ||
} | ||
|
||
/** | ||
* Sets the listener for watch events. | ||
* | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ public class WatchBuilder { | |
/** Ignored for watches. */ | ||
private static final String START_LIST = null; | ||
|
||
private static final Boolean ALLOW_BOOKMARKS = false; | ||
private static final Boolean ALLOW_BOOKMARKS = true; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The ALLOW_BOOKMARKS is set to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I found that the behavior of the default branch of the switch was identical to what we would do for a specific BOOKMARK event, so there was no need to make further code change. |
||
|
||
@SuppressWarnings("FieldMayBeFinal") // Leave non-final for unit test | ||
private static WatchFactory FACTORY = new WatchFactoryImpl(); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code is becoming increasingly complex. The coupling between the listNamespace calls and the CRD processing should not be done at this level. One of the great things about the Step/Fiber architecture is that you have those separate steps, and let the code that sets them up define the chain. Putting the dependency directly in the response to the namespace list makes future maintenance ever more difficult.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's fair, but the complexity here really isn't new -- I just moved this code here. I'll see if I can separate them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I pulled the CRD steps out separately and earlier in the overall flow.