Tecnativa / doodba

Base image for making the creation of customized Odoo environments a piece of cake
Apache License 2.0
436 stars 305 forks source link

No pip-install in Doodba QA #119

Closed yajo closed 6 years ago

yajo commented 6 years ago

It seems that fixing #98 broke some scripts from Doodba QA that used pip to download things from the Internet inside the running Odoo container, such as coverage.

Gotta fix that. I think that we could bundle tools such as coverage, flake8 and pylint-odoo directly in the base image. It would make them fatter, but CI would be faster too. What do you think? @pedrobaeza

pedrobaeza commented 6 years ago

I prefer not to, because we will need to manually update them (or rebuild Docker image), with no clear separation between image version and tools versions.

yajo commented 6 years ago

OK, I'll try to fix it by other means then.

pniederlag commented 6 years ago

Not sure if this is related but I ran into an issue using pip within the scaffolding approach.

It turned out that the tecnativa/odoo-base has an "ONBUILD USER odoo" instruction inside the Dockerfile leaving me puzzled with an:

 Permission denied: '/usr/local/lib/python2.7/dist-packages/openupgradelib-1.3.2-py2.7.egg-info/PKG-INFO'

I could easily fix that by adding a USER instruction in odoo/Dockerfile

# edit odoo/Dockerfile
USER root
RUN pip install --upgrade git+https://github.com/OCA/openupgradelib.git@master
pedrobaeza commented 6 years ago

@pniederlag but why don't you add git+https://github.com/OCA/openupgradelib.git@master on pip.txt file in /odoo/custom/dependencies/pip.txt?

pniederlag commented 6 years ago

@pedrobaeza just because I didn't know of this possibility to adapt the setup. Thx for pointing me at it. Would this update openupgradelib or will I end up with two different versions?

Experience has taught me that having different versions of one library will cause trouble at some point in the future, so I really like to stick with one version of each component. ;)

Regards, Peter

pedrobaeza commented 6 years ago

One version

yajo commented 6 years ago

Yikes, I forgot to close this issue.

It was fixed from https://github.com/Tecnativa/doodba-qa/commit/5261e5601e5c2125280ce35767444c673eb52877 onwards. It adds a relocatable virtualenv that contains all QA dependencies and it gets mounted inside the dooba running container. This way, all QA dependencies are in the QA image, making it correctly separated and faster (no more download than the image itself).