Skip to content

Event sources M1 #235

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 95 commits into from
Dec 4, 2020
Merged

Event sources M1 #235

merged 95 commits into from
Dec 4, 2020

Conversation

csviri
Copy link
Collaborator

@csviri csviri commented Nov 24, 2020

This is the core of the new extensible approach for the framework. Where an user can register and de-register sources of events other than custom resource events. This PR intends to be the first Milestone. But the intention is to merge it into the master, so all the upcoming work is already based on this approach.

Current state is that it builds, tests are passing. Will work on further tests, and improvements. But please review, also we can have a call and discussion with bugger audience.

csviri added 30 commits August 6, 2020 17:27
# Conflicts:
#	operator-framework/src/main/java/com/github/containersolutions/operator/Operator.java
# Conflicts:
#	operator-framework/src/main/java/io/javaoperatorsdk/operator/Operator.java
#	operator-framework/src/main/java/io/javaoperatorsdk/operator/api/DeleteControl.java
#	operator-framework/src/main/java/io/javaoperatorsdk/operator/processing/CustomResourceEvent.java
#	operator-framework/src/main/java/io/javaoperatorsdk/operator/processing/EventBuffer.java
#	operator-framework/src/main/java/io/javaoperatorsdk/operator/processing/EventConsumer.java
#	operator-framework/src/main/java/io/javaoperatorsdk/operator/processing/EventScheduler.java
#	operator-framework/src/main/java/io/javaoperatorsdk/operator/processing/EventStore.java
#	operator-framework/src/main/java/io/javaoperatorsdk/operator/processing/ExecutionConsumer.java
#	operator-framework/src/main/java/io/javaoperatorsdk/operator/processing/ExecutionScope.java
#	operator-framework/src/main/java/io/javaoperatorsdk/operator/processing/PostExecutionControl.java
#	operator-framework/src/main/java/io/javaoperatorsdk/operator/processing/ProcessingUtils.java
#	operator-framework/src/main/java/io/javaoperatorsdk/operator/processing/ResourceCache.java
#	operator-framework/src/main/java/io/javaoperatorsdk/operator/processing/event/AbstractEvent.java
#	operator-framework/src/main/java/io/javaoperatorsdk/operator/processing/event/AbstractEventSource.java
#	operator-framework/src/main/java/io/javaoperatorsdk/operator/processing/event/DefaultEventSourceManager.java
#	operator-framework/src/main/java/io/javaoperatorsdk/operator/processing/event/Event.java
#	operator-framework/src/main/java/io/javaoperatorsdk/operator/processing/event/EventHandler.java
#	operator-framework/src/main/java/io/javaoperatorsdk/operator/processing/event/EventSource.java
#	operator-framework/src/main/java/io/javaoperatorsdk/operator/processing/event/EventSourceManager.java
#	operator-framework/src/main/java/io/javaoperatorsdk/operator/processing/event/ExecutionDescriptor.java
#	operator-framework/src/main/java/io/javaoperatorsdk/operator/processing/event/internal/CustomResourceEvent.java
#	operator-framework/src/main/java/io/javaoperatorsdk/operator/processing/event/internal/CustomResourceEventSource.java
#	operator-framework/src/main/java/io/javaoperatorsdk/operator/processing/event/internal/DelayedEventSource.java
#	operator-framework/src/main/java/io/javaoperatorsdk/operator/processing/event/internal/DelayedReprocessEvent.java
#	operator-framework/src/test/java/io/javaoperatorsdk/operator/EventDispatcherTest.java
#	operator-framework/src/test/java/io/javaoperatorsdk/operator/EventSchedulerTest.java
#	operator-framework/src/test/java/io/javaoperatorsdk/operator/sample/TestCustomResourceController.java
#	operator-framework/src/test/java/io/javaoperatorsdk/operator/sample/subresource/SubResourceTestCustomResourceController.java
#	samples/common/src/main/java/io/javaoperatorsdk/operator/sample/CustomServiceController.java
#	samples/mysql-schema/src/main/java/io/javaoperatorsdk/operator/sample/SchemaController.java
#	samples/tomcat/src/main/java/io/javaoperatorsdk/operator/sample/TomcatController.java
#	samples/tomcat/src/main/java/io/javaoperatorsdk/operator/sample/WebappController.java
#	samples/webserver/src/main/java/io/javaoperatorsdk/operator/sample/WebServerController.java
#	spring-boot-starter/src/test/java/io/javaoperatorsdk/operator/spingboot/starter/TestController.java
@kirek007 kirek007 linked an issue Dec 1, 2020 that may be closed by this pull request
@csviri csviri linked an issue Dec 3, 2020 that may be closed by this pull request
@csviri csviri merged commit 8983918 into master Dec 4, 2020
@Mallington
Copy link

@jfgosselin in version 1.4 the retry is not there yet, currently working on it. Should be ready this or next week.
Currently what you can do is manage it for yourself, catching all the exceptions in the controller, and scheduling a timed event with TimerEventSource. Or wait few days.

What will the retry mechanism look like when it is released?

@csviri
Copy link
Collaborator Author

csviri commented Dec 14, 2020

@jfgosselin in version 1.4 the retry is not there yet, currently working on it. Should be ready this or next week.
Currently what you can do is manage it for yourself, catching all the exceptions in the controller, and scheduling a timed event with TimerEventSource. Or wait few days.

What will the retry mechanism look like when it is released?

Pls take a look on the changes on this branch: https://github.com/java-operator-sdk/java-operator-sdk/tree/retry-experiment

@Mallington
Copy link

@jfgosselin in version 1.4 the retry is not there yet, currently working on it. Should be ready this or next week.
Currently what you can do is manage it for yourself, catching all the exceptions in the controller, and scheduling a timed event with TimerEventSource. Or wait few days.

Hi @csviri, could you elaborate a bit more on where these exceptions would be caught and what I would have to reschedule? Many thanks

@csviri
Copy link
Collaborator Author

csviri commented Dec 17, 2020

@Mallington it's released, so you have just to specify a retry when registering a controller.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants