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

Fix type assertion bug #910

Merged
merged 2 commits into from
Aug 2, 2017
Merged

Fix type assertion bug #910

merged 2 commits into from
Aug 2, 2017

Commits on Aug 2, 2017

  1. Fix type assertion bug that could lead to reporting of incorrect task…

    … status.
    
    A type assertion of event.Error assumed that the variable being tested was a
    reference, when we actually weren't consistent in how we assigned that
    variable. This caused the assertion to fail in places where it should have
    passed, ultimately causing us to falsely report containers as stopped in the
    case where docker returned an API error in response to the 'stop' call.
    
    To fix this, we define a new 'cannotStopContainerError' interface and perform
    the type assertion on the interface.
    Noah Meyerhans committed Aug 2, 2017
    Configuration menu
    Copy the full SHA
    3615e31 View commit details
    Browse the repository at this point in the history
  2. Replace CannotStopContainerError.IsUnretryableError with CannotStopCo…

    …ntainerError.IsUnretryableError
    
    The only place this method was used was in a negated test. Negating negatives
    requires unnecessarily mental work on the part of the reader. IsRetryableError
    is quicker to understand.
    Noah Meyerhans committed Aug 2, 2017
    Configuration menu
    Copy the full SHA
    c8405db View commit details
    Browse the repository at this point in the history