Skip to content

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

Merged
merged 34 commits into from
Feb 25, 2022

Conversation

csviri
Copy link
Collaborator

@csviri csviri commented Feb 22, 2022

See two linked issues.

@csviri
Copy link
Collaborator Author

csviri commented Feb 22, 2022

For now without tests, will add tomorrow.

@csviri csviri marked this pull request as ready for review February 23, 2022 15:26
@csviri csviri requested a review from metacosm February 23, 2022 15:26
@csviri
Copy link
Collaborator Author

csviri commented Feb 23, 2022

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
return;
}
if (temporalCacheHasResourceWithVersionAs(resource)) {
super.onAdd(resource);
Copy link
Collaborator

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.

Copy link
Collaborator Author

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...

Copy link
Collaborator

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.

csviri and others added 3 commits February 24, 2022 17:00
"Skipping event propagation for {}, since was a result of a reconcile action. Resource ID: {}",
operation,
ResourceID.fromResource(newObject));
superOnOp.run();
Copy link
Collaborator

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. :)

Copy link
Collaborator

@metacosm metacosm left a 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.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 31 Code Smells

39.4% 39.4% Coverage
0.4% 0.4% Duplication

@csviri csviri merged commit 844323f into next Feb 25, 2022
@csviri csviri deleted the temporal-resource-cache-in-eventsource branch February 25, 2022 10:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants