Reconcile utils new alg#3115
Reconcile utils new alg#3115csviri merged 2 commits intooperator-framework:reconcile-utils-new-algfrom
Conversation
@csviri regardless of event filtering my expectation is that is something is added to the cache, it is something that we don't then care to get an event about. I've updated things here to leave it more up to the caller to decide what to do in each of the cases. Could you provide an example where someone adds a version to the temporary resource cache, but still wants that event? |
Hi @shawkins thx for the PR, tests are failing, can take a look a bit later more in depth into this PR.
Yeah, this is up to the discussion, my original idea was to provide a backwards compatible way for the case if some implemented a controller, that at the end of the reconciliation call And we pass that flag also to in the reconciler for the utils, like here: However, now I'm thinking - and especially if this makes the implementation simlper - that we could rather just simply have a So we will produce that event explicitly in the event processor after reconciliation. I would acutally go rather with this option (will update the PR), and let you optimize filtering / caching part as in this PR, if that works for you. thank you! |
|
see: 00f3245 |
82b6075 to
ec6af52
Compare
Ahh there is one more place, when we adding a finalizer we want to receive an event (and having an up-to-date resource) but we can also have there an explicit additional event. |
Sure, I'll have a look.
An immediate re-reconciliation makes sense, and gives more control to the calling logic. |
f94b10b to
9c9d44a
Compare
Signed-off-by: Steve Hawkins <shawkins@redhat.com>
ec6af52 to
1501a6e
Compare
| // the result is deferred | ||
| assertThat(result).isEqualTo(EventHandling.DEFER); | ||
| temporaryResourceCache.putResource(nextResource); | ||
| temporaryResourceCache.doneEventFilterModify(resourceId, "3"); |
There was a problem hiding this comment.
Would be nice to assert the result here
There was a problem hiding this comment.
Ok, updated that test and added one more.
Sounds good to me. |
2f99379 to
3c3de5c
Compare
Signed-off-by: Steve Hawkins <shawkins@redhat.com>
3c3de5c to
6208e43
Compare
2f9767d
into
operator-framework:reconcile-utils-new-alg
|
Awesome, thank you @shawkins !! |
|
Thanks @csviri |
My continued appologies, I'm not having a good day. Via the IDE I still ended up targeting upstream, instead of origin.
That should be cleanup up now. Here's even further refinements to make clearer why I want to differentate the behavior.