| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
Note
Copilot was unable to run its full agentic suite in this review.
Updates the Eventing documentation to clarify event source concepts, refresh diagrams, and align references/examples with the current repository structure.
Changes:
Sorry, something went wrong.
| public class WebPageReconciler implements Reconciler<WebPage> { | ||
|
|
||
| @Override | ||
| public List<EventSource<?, Webapp>> prepareEventSources(EventSourceContext<Webapp> context) { | ||
| InformerEventSourceConfiguration<Webapp> configuration = | ||
| InformerEventSourceConfiguration.from(Deployment.class, Webapp.class) | ||
| public List<EventSource<?, WebPage>> prepareEventSources(EventSourceContext<WebPage> context) { | ||
| var configuration = | ||
| InformerEventSourceConfiguration.from(Deployment.class, WebPage.class) | ||
| .withLabelSelector(SELECTOR) | ||
| .build(); | ||
| return List.of(new InformerEventSource<>(configuration, context)); | ||
| } |
| - The `ControllerEventSource` is a special, internal event source responsible for handling events | ||
| pertaining to changes affecting the primary resource. The SDK registers it automatically for every | ||
| controller and you never instantiate it yourself. | ||
| - Every controller also gets a dedicated `TimerEventSource` (named | ||
| `RetryAndRescheduleTimerEventSource`) that the SDK uses to drive retry attempts after a failed | ||
| reconciliation, `UpdateControl.rescheduleAfter(...)` requests, and the periodic max-interval | ||
| failsafe trigger. The `EventProcessor` is the sole caller into this timer, scheduling delayed | ||
| events back to itself via `scheduleOnce(...)`. Like the controller event source, this one is | ||
| wired internally and is not something you register or interact with directly. | ||
| - Once an event reaches the `EventProcessor`, dispatch is delegated to the | ||
| `ReconciliationDispatcher`, which prepares the execution context, handles finalizers and other | ||
| framework concerns, and ultimately invokes `reconcile(...)` on the internal `Controller` wrapper, | ||
| which in turn calls the user-implemented `Reconciler`. |
There was a problem hiding this comment.
@Dennis-Mircea I basically agree with this comment, there is a separate architecture and internals page:
https://javaoperatorsdk.io/docs/documentation/architecture/
Where such level of details can be expressed.
Sorry, something went wrong.
There was a problem hiding this comment.
But we can improve this in a separate PR.
Sorry, something went wrong.
There was a problem hiding this comment.
Nice, thanks!
Sorry, something went wrong.
There was a problem hiding this comment.
Thank you @Dennis-Mircea awesome! I just added one comment to discuss with TimerEventSource. pls take a look
Sorry, something went wrong.
| back to the `EventProcessor`, namely retry attempts after a failed reconciliation, explicit | ||
| rescheduling requests via `UpdateControl.rescheduleAfter(...)`, and the periodic failsafe trigger | ||
| governed by `maxReconciliationInterval`. As with `ControllerEventSource`, this is not something | ||
| you instantiate or configure directly. `TimerEventSource` is also available as a public type if |
There was a problem hiding this comment.
This I would not propagate like this. Note that TimerEventSource at this time is only for internal usage, there are other approaches dedicated for periodic reconciliation if needed. (Mostly reSchedule but also:
So we should not propagate it as public api.
Sorry, something went wrong.
There was a problem hiding this comment.
Good point, thanks! I reframed it as internal-only, dropped the line implying it can be reused, and pointed readers at UpdateControl.rescheduleAfter(...) / maxReconciliationInterval for periodic or delayed reconciliation instead.
Sorry, something went wrong.
Signed-off-by: Dennis-Mircea Ciupitu <dennis.mircea.ciupitu@gmail.com>
Signed-off-by: Dennis-Mircea Ciupitu <dennis.mircea.ciupitu@gmail.com>
Signed-off-by: Dennis-Mircea Ciupitu <dennis.mircea.ciupitu@gmail.com>
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
Refreshes docs/content/en/docs/documentation/eventing.md, which had drifted from the current code on several fronts and was missing an overview of the event source class hierarchy.
Highlights:
No code changes. Docs only.
Fixes #3368