@@ -67,8 +67,8 @@ private PostExecutionControl<R> handleDispatch(ExecutionScope<R> executionScope)
67
67
return PostExecutionControl .defaultDispatch ();
68
68
}
69
69
70
- Context context =
71
- new DefaultContext (executionScope .getRetryInfo ());
70
+ Context < R > context =
71
+ new DefaultContext <> (executionScope .getRetryInfo (), controller . getEventSourceRegistry ());
72
72
if (markedForDeletion ) {
73
73
return handleCleanup (resource , context );
74
74
} else {
@@ -91,7 +91,7 @@ private boolean shouldNotDispatchToDelete(R resource) {
91
91
}
92
92
93
93
private PostExecutionControl <R > handleReconcile (
94
- ExecutionScope <R > executionScope , R originalResource , Context context ) {
94
+ ExecutionScope <R > executionScope , R originalResource , Context < R > context ) {
95
95
if (configuration ().useFinalizer ()
96
96
&& !originalResource .hasFinalizer (configuration ().getFinalizer ())) {
97
97
/*
@@ -121,7 +121,7 @@ private PostExecutionControl<R> handleReconcile(
121
121
* resource is changed during an execution, and it's much cleaner to have to original resource in
122
122
* place for status update.
123
123
*/
124
- private R cloneResourceForErrorStatusHandlerIfNeeded (R resource , Context context ) {
124
+ private R cloneResourceForErrorStatusHandlerIfNeeded (R resource , Context < R > context ) {
125
125
if (isErrorStatusHandlerPresent () ||
126
126
shouldUpdateObservedGenerationAutomatically (resource )) {
127
127
return configuration ().getConfigurationService ().getResourceCloner ().clone (resource );
@@ -131,7 +131,7 @@ private R cloneResourceForErrorStatusHandlerIfNeeded(R resource, Context context
131
131
}
132
132
133
133
private PostExecutionControl <R > reconcileExecution (ExecutionScope <R > executionScope ,
134
- R resourceForExecution , R originalResource , Context context ) {
134
+ R resourceForExecution , R originalResource , Context < R > context ) {
135
135
log .debug (
136
136
"Executing createOrUpdate for resource {} with version: {} with execution scope: {}" ,
137
137
getName (resourceForExecution ),
@@ -161,7 +161,7 @@ && shouldUpdateObservedGenerationAutomatically(resourceForExecution)) {
161
161
return createPostExecutionControl (updatedCustomResource , updateControl );
162
162
}
163
163
164
- private void handleErrorStatusHandler (R resource , Context context ,
164
+ private void handleErrorStatusHandler (R resource , Context < R > context ,
165
165
RuntimeException e ) {
166
166
if (isErrorStatusHandlerPresent ()) {
167
167
try {
@@ -238,7 +238,7 @@ private void updatePostExecutionControlWithReschedule(
238
238
baseControl .getScheduleDelay ().ifPresent (postExecutionControl ::withReSchedule );
239
239
}
240
240
241
- private PostExecutionControl <R > handleCleanup (R resource , Context context ) {
241
+ private PostExecutionControl <R > handleCleanup (R resource , Context < R > context ) {
242
242
log .debug (
243
243
"Executing delete for resource: {} with version: {}" ,
244
244
getName (resource ),
0 commit comments