Handle errors by logging/rescheduling and prevent 2nd error log
A potential improvement is to not requeue immediately, but include a requeuing delay with exponential backoff based on the time when the error was initially observed.
Such a mechanism needs to store 1 number (lastTransitionTime) on a Status condition:
status:
conditions:
- type: TransientError
status: true
reason: ${tranientErr.Unwrap().error()}
message: ${transientErr.error()}
lastTransitionTime: <time when the error was first observed>
Setting TransientError
for the condition type is probably not a best practice.
It might not be a bad idea however for errors that the business logic identifies as transient and allows for a sufficient requeuing mechanism.
Permanent errors instead can be noted with the error condition as condition.type
.
We can design the conditions more consistently in a followup MR.
partial #90