-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixing the jobrunner #42
Fixing the jobrunner #42
Conversation
}) | ||
if err != nil { | ||
return fmt.Errorf("%w: %v", ErrICSenderJobFailed, err) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be defer watcher.Stop()
helpful around here to clean up resources?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And if you check RetryWatcher
from client-go
tools, link below. In that case it's trying to restart on closed ResultChan
channel. That's more likely a rare case but we've seen such reports in client's issue that ResultChan
is closed unexpectedly, but with recoverable error.
Finally I wonder if you couldn't reuse something like existing RetryWatcher code directly here.
https://github.com/kubernetes/client-go/blob/master/tools/watch/retrywatcher.go#L242-L275
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking that maybe that's not be possible in this exact case because of:
WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh, I recall that part now. Sure let's keep your watching implementation.
Do you think it's worth to address at least a bit of retry logic when ResultChan
is closed? Of course it can done as a future enhancement/hardening.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's good idea for an enhancement in future PR. Would you mind opening an issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, I'll do first thing tomorrow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm @cardil feel free to unhold. |
…b-runner Conflicts fixed: * pkg/tests/fakeclients.go
@dsimansk Thanks for review. I had to rebase. Please add LGTM flag again. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cardil, dsimansk The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/unhold |
Changes
batchv1.Job
runner to properly wait for completion of remote job that is sending the event./kind bug
Fixes #10
Release Note