Skip to content

client.logs(stream=True) is broken when using docker 1.7 #656

@paetling

Description

@paetling

@shin-

The streaming functionality of client.logs is broken when using docker 1.7. I am working on a fix and have found the reason that it is now broken:
Line line 130 in the file daemon/logs.go

// write an empty chunk of data (this is to ensure that the
// HTTP Response is sent immediatly, even if the container has
// not yet produced any data)
outStream.Write(nil)

This messes up how _multiplexed_response_stream_helper works (will break if it sees a response like this).

The thing I am really wondering though, is why the test to catch this in integration_test.py has been commented out since this commit 8a63e70 in June 2014? This was a commit by you, @shin-. It seems like this is the exact reason you have integration tests, to catch bugs. I am not sure of the the best way to proceed given that I cannot show you a failing test. I would really appreciate it if you could explain:

  1. Why the test was removed
  2. Steps I need to take to put the tests back and merge my fix.

Alex

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions