Skip to content
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

Closed
wants to merge 2 commits into from

Conversation

congcongke
Copy link
Contributor

@congcongke congcongke commented Mar 13, 2019

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.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 13, 2019
@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Mar 13, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: directxman12

If they are not already assigned, you can assign the PR to them by writing /assign @directxman12 in a comment when ready.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@congcongke congcongke changed the title add entry to modify the retry count in QueueWorker add entry to modify the retry times in QueueWorker Mar 13, 2019
@congcongke
Copy link
Contributor Author

/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) {
Copy link
Member

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

Copy link
Contributor Author

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}
Copy link
Member

Choose a reason for hiding this comment

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

what's the point?

Copy link
Contributor Author

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.

Copy link
Member

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

@congcongke congcongke closed this Mar 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants