Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ private void submitReconciliationExecution(ResourceState state) {
controllerUnderExecution,
maybeLatest.isPresent());
if (maybeLatest.isEmpty()) {
log.debug("no custom resource found in cache for resource id: {}", resourceID);
log.debug("no primary resource found in cache with resource id: {}", resourceID);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better but still doesn't address the fact that we might get into that state because we're triggering event processing even though we don't expect a resource to even exist in the cache (like if a user sends events for resources that are not tracked by the Reconciler), i.e. the cache is an implementation detail that might be confusing, i.e. a user might then think: ok, it's not in cache, then fetch it from the server instead!
That said, it's indeed a debug level log so maybe it doesn't matter all that much.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't expect a resource to even exist in the cache

Yeah, but this is not always the case, if the controller informer is lagging (reconnect issues), the resource might be actually expected, just not yet there.

it's not in cache, then fetch it from the server instead!

this is for primary, not sure if there is a place to fetch it; since the reconciler never triggered.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But can add some comments there above the log message, to explain why this can happen.

}
}
} finally {
Expand Down