-
Notifications
You must be signed in to change notification settings - Fork 219
Temporal resource cache in Event Source #965
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
Conversation
# Conflicts: # operator-framework/src/test/java/io/javaoperatorsdk/operator/sample/standalonedependent/StandaloneDependentTestReconciler.java
# Conflicts: # operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/dependent/kubernetes/KubernetesDependentResource.java
…ic. And filtering in informers by the just updated resource version
For now without tests, will add tomorrow. |
...ore/src/main/java/io/javaoperatorsdk/operator/api/config/informer/InformerConfiguration.java
Outdated
Show resolved
Hide resolved
Will update the docs (probably together with dependent resources docs). |
# Conflicts: # operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/dependent/kubernetes/KubernetesDependentResource.java # operator-framework/src/main/java/io/javaoperatorsdk/operator/config/runtime/AnnotationControllerConfiguration.java # operator-framework/src/test/java/io/javaoperatorsdk/operator/sample/standalonedependent/StandaloneDependentTestReconciler.java
.../src/main/java/io/javaoperatorsdk/operator/processing/event/source/informer/EventBuffer.java
Outdated
Show resolved
Hide resolved
.../src/main/java/io/javaoperatorsdk/operator/processing/event/source/informer/EventBuffer.java
Outdated
Show resolved
Hide resolved
.../src/main/java/io/javaoperatorsdk/operator/processing/event/source/informer/EventBuffer.java
Outdated
Show resolved
Hide resolved
.../src/main/java/io/javaoperatorsdk/operator/processing/event/source/informer/EventBuffer.java
Outdated
Show resolved
Hide resolved
.../src/main/java/io/javaoperatorsdk/operator/processing/event/source/informer/EventBuffer.java
Outdated
Show resolved
Hide resolved
...n/java/io/javaoperatorsdk/operator/processing/event/source/informer/InformerEventSource.java
Outdated
Show resolved
Hide resolved
...java/io/javaoperatorsdk/operator/processing/event/source/informer/TemporalResourceCache.java
Outdated
Show resolved
Hide resolved
...io/javaoperatorsdk/operator/processing/event/source/informer/ManagedInformerEventSource.java
Outdated
Show resolved
Hide resolved
...n/java/io/javaoperatorsdk/operator/processing/event/source/informer/InformerEventSource.java
Outdated
Show resolved
Hide resolved
return; | ||
} | ||
if (temporalCacheHasResourceWithVersionAs(resource)) { | ||
super.onAdd(resource); |
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.
Move this code outside of if/else since it's used in both branches.
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.
there is now a different log message, so hmm not sure...
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.
I meant the super.onAdd(resource)
: it could be put outside of the if/else since it's done anyway.
…tor/processing/event/source/informer/ManagedInformerEventSource.java Co-authored-by: Chris Laprun <[email protected]>
"Skipping event propagation for {}, since was a result of a reconcile action. Resource ID: {}", | ||
operation, | ||
ResourceID.fromResource(newObject)); | ||
superOnOp.run(); |
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.
superOnOp
is run in both branches so could be run outside of the if/else. No big deal either way. :)
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.
I don't have a good grasp of how things are supposed to work right now so trusting you on this! 😄
Let's merge and see how it goes with use.
Kudos, SonarCloud Quality Gate passed! |
See two linked issues.