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

Remove FailedResourceType and return custom error #19527

Merged
merged 2 commits into from
Jan 17, 2016

Conversation

hongchaodeng
Copy link
Contributor

To continue our discussion and work in #19487 and #19296.
The previous commit in #19296 didn't check the custom error from predicate() which caused failure cases.

Please let me know what you think. Highly appreciate it! @saad-ali @gmarek @lavalamp

@k8s-github-robot k8s-github-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jan 12, 2016
@k8s-github-robot
Copy link

Labelling this PR as size/M

@k8s-bot
Copy link

k8s-bot commented Jan 12, 2016

GCE e2e test build/test passed for commit fc79be0c0dc09d1960fc8553be9fb51663d9acd9.

@k8s-github-robot
Copy link

The author of this PR is not in the whitelist for merge, can one of the admins add the 'ok-to-merge' label?

fit, err := predicate(pod, machineToPods[node.Name], node.Name)
if err != nil {
return api.NodeList{}, FailedPredicateMap{}, err
switch err.(type) {
case *predicates.InsufficientResourceError:
Copy link
Member

Choose a reason for hiding this comment

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

for this case can you do some kind of assertion that !fit ?

return api.NodeList{}, FailedPredicateMap{}, err
switch e := err.(type) {
case *predicates.InsufficientResourceError:
if fit {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@davidopp
Addressed.

@k8s-bot
Copy link

k8s-bot commented Jan 12, 2016

GCE e2e test build/test passed for commit 252a956.

@hongchaodeng
Copy link
Contributor Author

The failing unit test is known flaky:

k8s.io/kubernetes/pkg/client/unversioned/portforward

@davidopp
Copy link
Member

LGTM

@davidopp davidopp added lgtm "Looks good to me", indicates that a PR is ready to be merged. ok-to-merge and removed needs-ok-to-merge labels Jan 14, 2016
@davidopp
Copy link
Member

@k8s-bot unit test this please

@k8s-github-robot
Copy link

@k8s-bot test this

Tests are more than 48 hours old. Re-running tests.

@k8s-bot
Copy link

k8s-bot commented Jan 14, 2016

GCE e2e test build/test passed for commit 252a956.

@k8s-github-robot
Copy link

@k8s-bot test this

Tests are more than 48 hours old. Re-running tests.

@k8s-bot
Copy link

k8s-bot commented Jan 16, 2016

GCE e2e test build/test passed for commit 252a956.

@k8s-github-robot
Copy link

@k8s-bot test this [submit-queue is verifying that this PR is safe to merge]

@k8s-bot
Copy link

k8s-bot commented Jan 17, 2016

GCE e2e test build/test passed for commit 252a956.

@k8s-github-robot
Copy link

Automatic merge from submit-queue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants