You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@airflow.apache.org by Russell Jurney <ru...@gmail.com> on 2017/04/28 03:51:47 UTC

DockerOperator - old API? What version/package API does this use?

I am trying to use DockerOperator and I get this error:

    from docker import Client, tls
ImportError: cannot import name 'Client'


There is no requirements.txt, so I can't figure out what docker API this
is, but it hasn't existed in the official docker Python module for ...
ever? I can't figure out how this is supposed to work.

I'm happy to fix it because... I have to, but can anyone comment on what is
going on here? What module and what version is this referring to? It does
not seem to be https://github.com/docker/docker-py, I even checked the 1.x
line and that doesn't match either.

Russell Jurney @rjurney <http://twitter.com/rjurney>
russell.jurney@gmail.com LI <http://linkedin.com/in/russelljurney> FB
<http://facebook.com/jurney> datasyndrome.com

Re: DockerOperator - old API? What version/package API does this use?

Posted by Gael Magnan <ga...@gmail.com>.
Hi Russell,
I think that if you look at this github ticket you will find some work has
been done on it.

https://github.com/apache/incubator-airflow/pull/2204

The problem is the package got renamed from docker-py to docker when they
switched to version 2.

Regards
Gael

Le ven. 28 avr. 2017 à 07:07, Russell Jurney <ru...@gmail.com> a
écrit :

> Wow, this is actually quite complex owing to the unit tests...
>
> Russell Jurney @rjurney <http://twitter.com/rjurney>
> russell.jurney@gmail.com LI <http://linkedin.com/in/russelljurney> FB
> <http://facebook.com/jurney> datasyndrome.com
>
> On Thu, Apr 27, 2017 at 9:12 PM, Russell Jurney <ru...@gmail.com>
> wrote:
>
> > I created a JIRA: https://issues.apache.org/jira/browse/AIRFLOW-1159
> >
> > Russell Jurney @rjurney <http://twitter.com/rjurney>
> > russell.jurney@gmail.com LI <http://linkedin.com/in/russelljurney> FB
> > <http://facebook.com/jurney> datasyndrome.com
> >
> > On Thu, Apr 27, 2017 at 9:00 PM, Russell Jurney <
> russell.jurney@gmail.com>
> > wrote:
> >
> >> Ok, after some more poking around I found that this is the docker-py 1.6
> >> API, which is pretty old. I'm going to update it to the latest and see
> if I
> >> can make it work, since we are using the newer docker API elsewhere.
> >>
> >> Russell Jurney @rjurney <http://twitter.com/rjurney>
> >> russell.jurney@gmail.com LI <http://linkedin.com/in/russelljurney> FB
> >> <http://facebook.com/jurney> datasyndrome.com
> >>
> >> On Thu, Apr 27, 2017 at 8:51 PM, Russell Jurney <
> russell.jurney@gmail.com
> >> > wrote:
> >>
> >>> I am trying to use DockerOperator and I get this error:
> >>>
> >>>     from docker import Client, tls
> >>> ImportError: cannot import name 'Client'
> >>>
> >>>
> >>> There is no requirements.txt, so I can't figure out what docker API
> this
> >>> is, but it hasn't existed in the official docker Python module for ...
> >>> ever? I can't figure out how this is supposed to work.
> >>>
> >>> I'm happy to fix it because... I have to, but can anyone comment on
> what
> >>> is going on here? What module and what version is this referring to? It
> >>> does not seem to be https://github.com/docker/docker-py, I even
> checked
> >>> the 1.x line and that doesn't match either.
> >>>
> >>> Russell Jurney @rjurney <http://twitter.com/rjurney>
> >>> russell.jurney@gmail.com LI <http://linkedin.com/in/russelljurney> FB
> >>> <http://facebook.com/jurney> datasyndrome.com
> >>>
> >>
> >>
> >
>

Re: DockerOperator - old API? What version/package API does this use?

Posted by Russell Jurney <ru...@gmail.com>.
Wow, this is actually quite complex owing to the unit tests...

Russell Jurney @rjurney <http://twitter.com/rjurney>
russell.jurney@gmail.com LI <http://linkedin.com/in/russelljurney> FB
<http://facebook.com/jurney> datasyndrome.com

On Thu, Apr 27, 2017 at 9:12 PM, Russell Jurney <ru...@gmail.com>
wrote:

> I created a JIRA: https://issues.apache.org/jira/browse/AIRFLOW-1159
>
> Russell Jurney @rjurney <http://twitter.com/rjurney>
> russell.jurney@gmail.com LI <http://linkedin.com/in/russelljurney> FB
> <http://facebook.com/jurney> datasyndrome.com
>
> On Thu, Apr 27, 2017 at 9:00 PM, Russell Jurney <ru...@gmail.com>
> wrote:
>
>> Ok, after some more poking around I found that this is the docker-py 1.6
>> API, which is pretty old. I'm going to update it to the latest and see if I
>> can make it work, since we are using the newer docker API elsewhere.
>>
>> Russell Jurney @rjurney <http://twitter.com/rjurney>
>> russell.jurney@gmail.com LI <http://linkedin.com/in/russelljurney> FB
>> <http://facebook.com/jurney> datasyndrome.com
>>
>> On Thu, Apr 27, 2017 at 8:51 PM, Russell Jurney <russell.jurney@gmail.com
>> > wrote:
>>
>>> I am trying to use DockerOperator and I get this error:
>>>
>>>     from docker import Client, tls
>>> ImportError: cannot import name 'Client'
>>>
>>>
>>> There is no requirements.txt, so I can't figure out what docker API this
>>> is, but it hasn't existed in the official docker Python module for ...
>>> ever? I can't figure out how this is supposed to work.
>>>
>>> I'm happy to fix it because... I have to, but can anyone comment on what
>>> is going on here? What module and what version is this referring to? It
>>> does not seem to be https://github.com/docker/docker-py, I even checked
>>> the 1.x line and that doesn't match either.
>>>
>>> Russell Jurney @rjurney <http://twitter.com/rjurney>
>>> russell.jurney@gmail.com LI <http://linkedin.com/in/russelljurney> FB
>>> <http://facebook.com/jurney> datasyndrome.com
>>>
>>
>>
>

Re: DockerOperator - old API? What version/package API does this use?

Posted by Russell Jurney <ru...@gmail.com>.
I created a JIRA: https://issues.apache.org/jira/browse/AIRFLOW-1159

Russell Jurney @rjurney <http://twitter.com/rjurney>
russell.jurney@gmail.com LI <http://linkedin.com/in/russelljurney> FB
<http://facebook.com/jurney> datasyndrome.com

On Thu, Apr 27, 2017 at 9:00 PM, Russell Jurney <ru...@gmail.com>
wrote:

> Ok, after some more poking around I found that this is the docker-py 1.6
> API, which is pretty old. I'm going to update it to the latest and see if I
> can make it work, since we are using the newer docker API elsewhere.
>
> Russell Jurney @rjurney <http://twitter.com/rjurney>
> russell.jurney@gmail.com LI <http://linkedin.com/in/russelljurney> FB
> <http://facebook.com/jurney> datasyndrome.com
>
> On Thu, Apr 27, 2017 at 8:51 PM, Russell Jurney <ru...@gmail.com>
> wrote:
>
>> I am trying to use DockerOperator and I get this error:
>>
>>     from docker import Client, tls
>> ImportError: cannot import name 'Client'
>>
>>
>> There is no requirements.txt, so I can't figure out what docker API this
>> is, but it hasn't existed in the official docker Python module for ...
>> ever? I can't figure out how this is supposed to work.
>>
>> I'm happy to fix it because... I have to, but can anyone comment on what
>> is going on here? What module and what version is this referring to? It
>> does not seem to be https://github.com/docker/docker-py, I even checked
>> the 1.x line and that doesn't match either.
>>
>> Russell Jurney @rjurney <http://twitter.com/rjurney>
>> russell.jurney@gmail.com LI <http://linkedin.com/in/russelljurney> FB
>> <http://facebook.com/jurney> datasyndrome.com
>>
>
>

Re: DockerOperator - old API? What version/package API does this use?

Posted by Russell Jurney <ru...@gmail.com>.
Ok, after some more poking around I found that this is the docker-py 1.6
API, which is pretty old. I'm going to update it to the latest and see if I
can make it work, since we are using the newer docker API elsewhere.

Russell Jurney @rjurney <http://twitter.com/rjurney>
russell.jurney@gmail.com LI <http://linkedin.com/in/russelljurney> FB
<http://facebook.com/jurney> datasyndrome.com

On Thu, Apr 27, 2017 at 8:51 PM, Russell Jurney <ru...@gmail.com>
wrote:

> I am trying to use DockerOperator and I get this error:
>
>     from docker import Client, tls
> ImportError: cannot import name 'Client'
>
>
> There is no requirements.txt, so I can't figure out what docker API this
> is, but it hasn't existed in the official docker Python module for ...
> ever? I can't figure out how this is supposed to work.
>
> I'm happy to fix it because... I have to, but can anyone comment on what
> is going on here? What module and what version is this referring to? It
> does not seem to be https://github.com/docker/docker-py, I even checked
> the 1.x line and that doesn't match either.
>
> Russell Jurney @rjurney <http://twitter.com/rjurney>
> russell.jurney@gmail.com LI <http://linkedin.com/in/russelljurney> FB
> <http://facebook.com/jurney> datasyndrome.com
>