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

Bug 1534715 - unbind checks for existence of binding before trying to delete it #642

Merged
merged 1 commit into from Jan 16, 2018

Conversation

mhrivnak
Copy link
Member

Unbind was not checking this previously. When doing an async unbind, this meant
multiple APBs got launched. Additionally, all but the first DELETE requests
were geting a 500 response code due to incorrect handling of "err" in code.

fixes #640

@openshift-ci-robot openshift-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jan 15, 2018
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling d33b2ad on mhrivnak:fix-unbind-multiple-apbs into ** on openshift:master**.

Copy link
Contributor

@jmrodri jmrodri left a comment

Choose a reason for hiding this comment

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

AWESOME! Just remove the else statement and feel free to commit.

if err != nil {
if client.IsKeyNotFound(err) {
return nil, ErrorNotFound
} else {
Copy link
Contributor

Choose a reason for hiding this comment

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

remove the else block

if client.IsKeyNotFound(err) {
    return nil, ErrorNotFound
}
return nil, err

… delete it

Unbind was not checking this previously. When doing an async unbind, this meant
multiple APBs got launched. Additionally, all but the first DELETE requests
were geting a 500 response code due to incorrect handling of "err" in code.

fixes openshift#640
Copy link
Contributor

@jmrodri jmrodri left a comment

Choose a reason for hiding this comment

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

ACK

@jmrodri jmrodri merged commit 5f88014 into openshift:master Jan 16, 2018
@mhrivnak mhrivnak deleted the fix-unbind-multiple-apbs branch January 16, 2018 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

multiple DELETEs to the same binding result in multiple APB runs
4 participants