Yeah. It's the optimisation I mentioned that's missing now.

But I realised that you can (and it's easy) run the ci/mypy/flake once you
enter the environment. I will add a few scripts so that you can just run
scripts (and will update the docs).

The scripts to run on host are mainly for CI purpose now but in the near
future I will use them to automatically run tests during the pre-commit
hooks (and there I have optimisation that the "rebuild" happen only when
needed. And there I have implemented switching to python3 automatically. I
might actually port most of it even now I think.

Thanks for the feedbac. Very valuable!

J.

On Wed, Jul 10, 2019 at 8:18 AM Stefan Seelmann <[email protected]>
wrote:

> On 7/9/19 7:36 PM, Jarek Potiuk wrote:
> >    - The warning with /root/.docker/config.json is nothing to worry about
> >    (it tries to access your host configuration for credentials - but we
> do not
> >    need any credentials for the environment).
>
> Ok, fine
>
> >    - The CLEAN_FILES unbound variable was an interesting one - not sure
> why
> >    it was not set at the first run and set it on the other (likely
> because
> >    CLEAN_FILES is propagated through docker-compose settings and set to
> empty
> >    after initialisation) but I protected against such case now
>
> Works now.
>
> >    - Running flake/pylint is not supposed to be run from the container
> but
> >    from the host. I looked at the docs and realised it was not at all
> clear
> >    :). It was obvious for me but not for someone new :). That's big
> value of
> >    such tests. I updated CONTRIBUTING.md with a note and also added extra
> >    protection.
>
> When I just run `./scripts/ci/ci_flake8.sh` it attempts to build the
> Python 2.7 image `apache/airflow:master-python2.7-ci-slim` (I assume
> because my default Python interpreter is 2.7) which fails.
>
> When I run `PYTHON_VERSION=3.6 ./scripts/ci/ci_flake8.sh` it works.
> However on every invocation it rebuilds the "Airflow CI slim image", it
> uses cached layers, but still takes 23 seconds, it that wanted?
>
> Kind Regards,
> Stefan
>
>
>

-- 

Jarek Potiuk
Polidea <https://www.polidea.com/> | Principal Software Engineer

M: +48 660 796 129 <+48660796129>
[image: Polidea] <https://www.polidea.com/>

Reply via email to