-
Notifications
You must be signed in to change notification settings - Fork 499
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 a new RequeueError type #80
Conversation
/run-e2e-tests |
It looks like this removes aggregate error creation because they will not pass the test |
I have the function |
This sounds good. We should be waiting for that feature. |
Switched to |
5e6891c
to
8b0fd5b
Compare
8b0fd5b
to
18ce1fe
Compare
@@ -216,7 +217,13 @@ func (tcc *Controller) processNextWorkItem() bool { | |||
} | |||
defer tcc.queue.Done(key) | |||
if err := tcc.sync(key.(string)); err != nil { | |||
utilruntime.HandleError(fmt.Errorf("Error syncing TidbCluster %v, requeuing: %v", key.(string), err)) | |||
if reqErr := pingcaperrors.Find(err, func(e error) bool { |
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 you can just do pingcaperrors.Find(err, controller.IsRequeueError)
I am asking over on pingcap/tidb#7151 about importing pingcap/errors as pkg/errors since we are maintaining backwards compatibility. |
We are maintaining backwards compatibility for pingcap/errors with pkg/errors, so it is better to import pingcap/errors as pkg/errors as done in TiDB |
/run-e2e-tests |
/run-e2e-tests |
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
* add RequeueError * make lint happy * use pingcap/errors.Find
This PR resolves #50 .
@tennix @onlymellb @xiaojingchen @gregwebs PTAL