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
add entry to modify the retry times in QueueWorker #324
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: If they are not already assigned, you can assign the PR to them by writing 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 |
/assign @yue9944882 |
@@ -114,6 +114,11 @@ func (c *{{.Target.Kind}}Controller) GetName() string { | |||
return c.Name | |||
} | |||
|
|||
// change the retry time at runtime | |||
func (c *{{.Target.Kind}}Controller) SetRetryTimes(r int) { |
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.
rather than a setter, plz add another constructor func to avoid thread-safety issue, like NewBucketControllerWithMaxRetries
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.
Got it. It would be better to do this. It will be user's responsibility to add such a function. And it will be unnecessary to add function here.
My fault and will close it.
Thanks!
@@ -7,7 +7,7 @@ ETCD_VER=v3.2.0 | |||
# choose either URL | |||
GOOGLE_URL=https://storage.googleapis.com/etcd | |||
GITHUB_URL=https://github.com/coreos/etcd/releases/download | |||
DOWNLOAD_URL=${GOOGLE_URL} | |||
DOWNLOAD_URL=${GITHUB_URL} |
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.
what's the point?
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.
The GOOGLE_URL is invalid. The travis is always failed with google url. To make travis pass, use github url instead.
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.
could be flakiness from the download link, let's revert and see what'll happen
There is no entry to modify the retry times in controllers now. This means that if I want to set the retry times in queue worker, new controller need to implemented.
Adding a function to controller may be a good idea. But I am not sure if there is a better one.