Giter VIP home page Giter VIP logo

Comments (15)

sbidoul avatar sbidoul commented on July 30, 2024 1

Hi Sylvain,

The simplest is to add git references in the test-requirements.txt file of grap/grap-odoo-business, such as odoo12-addon-product_print_category @ git+https://github.com/grap/grap-odoo-incubator#subdirectory=setup/product_print_category. It's a bit chatty but should be easy to setup. That is what we do at Acsone in such situations.

Alternatively, you could setup an internal PEP 503 package index such as devpi and publish your addons there using the oca-github-bot. It's a bit more work to setup. Or you could even configure your bot to publish to PyPI.

Do you mind if I label this as a question and not a bug ?

from oca-ci.

legalsylvain avatar legalsylvain commented on July 30, 2024

Hi @sbidoul.

First thanks for your quick answer.

  1. your suggestion works ! thanks. It's in fact more verbose, but in the other hand, it is more possible to target various PR in some tricky cases.
  2. AFAIU, github actions are fully replacing travis. (pre-commit, test, etc.) Do you know the reason to keep travis in oca repositories ? I just compared Travis and "Test" github action and the github action is faster.
  3. if we use only github actions, the oca_dependencies.txt file seems totally obsolete. Right ?

Or you could even configure your bot to publish to PyPI.

I usually prevent to publish grap modules Odoo appstore. The reason is that some of the modules are incubated, but can be at some point shared under OCA umbrella. If it occures, it generates conflict on the stores and the old version remains the visible one. Should be the same problem with pypi i guess.

Do you mind if I label this as a question and not a bug ?

Of course not ! the current issue template only propose "bug report" or "feature request".

from oca-ci.

legalsylvain avatar legalsylvain commented on July 30, 2024

Addendum : i continue to deploy this strategy.
For the time being, I see a limitation :

  • if a repo "incubator" contains a module A that depends on modules B,C,D (same repo)
  • if a repo "custom" contains a module E, depending on A.
  • -> we have, in the repo "custom" to add dependency to module A (of course) and also module B,C and D. (4 lines, and duplicated information to maintain with the manifest of module A)

That's quite a regression regarding the previous design with the file oca_dependencies.txt (1 line before)

Except that annoying point, implementing the oca-ci is very easy. Thanks !

from oca-ci.

legalsylvain avatar legalsylvain commented on July 30, 2024

Hi @sbidoul.

I have a trouble with one of my repository.
I managed to migrate all my repo with this new syntax and it works. (for exemple : https://github.com/grap/grap-odoo-business/blob/12.0/test-requirements.txt).
However, for the last repo, my CI is red here : grap/grap-odoo-custom#217

ERROR: Could not find a version that satisfies the requirement odoo12-addon-technical_partner_access (from odoo12-addon-fiscal-company-base) (from versions: none)
ERROR: No matching distribution found for odoo12-addon-technical_partner_access
INFO: pip is looking at multiple versions of odoo12-addon-name-search-reset-res-partner to determine which version is compatible with other requirements. This could take a while.

It seems similar to OCA/website#588 (comment) but :

  • similar syntax works for other repo.
  • having this line in the workflow should pip install odoo correctly AFAIU - container: ghcr.io/oca/oca-ci/py3.6-odoo12.0:latest

do you have any idea ?

Note :
if you find it interesting, maybe I can write a piece of OCA documentation following our exchanges, to share these answers to recurrent questions...
(in that repo, or in other place, I don't know)

from oca-ci.

sbidoul avatar sbidoul commented on July 30, 2024

ERROR: No matching distribution found for odoo12-addon-technical_partner_access

Where is technical_partner_access supposed to come from ? Is it an OCA module or a grap module ? If it is a grap module in a different repo it should be in your test-requirements.txt.

if you find it interesting, maybe I can write a piece of OCA documentation following our exchanges, to share these answers to recurrent questions...

Sure, that would be great !

(in that repo, or in other place, I don't know)

Improving the README of this project would certainly be useful. For instance with an example GitHub workflow that uses it and a mention of test-requirements.txt, etc.

The OCA Guidelines will also need updating to mention these, and at some point, remove Travis-specific stuff.

AFAIU, github actions are fully replacing travis. (pre-commit, test, etc.) Do you know the reason to keep travis in oca repositories ? I just compared Travis and "Test" github action and the github action is faster.

For OCA 15.0 there is no more Travis. For 13 and 14, PSC can run copier update and answer GitHub instead of Travis for the CI question. For older branches, we need to implement the copier template first (OCA/oca-addons-repo-template#103). But yeah, at some point we are going to shutdown Travis for all branches, that is the plan.

from oca-ci.

LoisRForgeFlow avatar LoisRForgeFlow commented on July 30, 2024

Hi @legalsylvain and @sbidoul

I have run into a similar issue while setting up a CI pipeline for a private repository, using the test-requirements as you suggest works as long as you have control of the private repository the dependencies are in, because you can create the setup folder and use the syntax you suggested in the test-requirements.

However, when the repository is not under your control (odoo/enterprise) you have no way to install dependencies with pip.

Do you have any workaround for this?

Apart from this problem, the project works really well and it is faster than its predecesor.

Thanks for you help.

from oca-ci.

sbidoul avatar sbidoul commented on July 30, 2024

@LoisRForgeFlow actually, it is possible to package multiple addons (such as odoo/enterprise) with setuptools-odoo. This is explained in the docs. You can create your own setup.py and with a symlink structure you can package odoo/enterprise. That is what we do for our enterprise projects, so we can pip freeze it and such...

But that is not strictly necessary. If you can bring odoo/enterprise in the test image, you can simply update the Odoo addons-path in $ODOO_RC to point to it. Pip install of addons is compatible with addons path and you can mix both.

from oca-ci.

LoisRForgeFlow avatar LoisRForgeFlow commented on July 30, 2024

@sbidoul Interesting, but if you depend in an enterprise addon you cannot package multiple addons according to the documentation (https://pypi.org/project/setuptools-odoo/#packaging-multiple-addons).

The second proposal was the hint I needed, it is working perfectly. Many thanks!

from oca-ci.

sbidoul avatar sbidoul commented on July 30, 2024

if you depend in an enterprise addon you cannot package multiple addons

Not sure what you mean with that ? Actually you can, because setuptools-odoo has built-in knowledge of all the CE and EE addon names and considers that dependencies on these addons are satisfied by the odoo package.

from oca-ci.

LoisRForgeFlow avatar LoisRForgeFlow commented on July 30, 2024

@sbidoul I did not try, I just red this in the docs:

Addons that are intended to be reused or depended upon by other addons MUST be packaged individually

I understood that from that sentence, but if you do it, I have no doubt it works.

from oca-ci.

sbidoul avatar sbidoul commented on July 30, 2024

@LoisRForgeFlow hm, indeed that calls for a clarification. I'm adding a section to the setuptools-odoo documentation in acsone/setuptools-odoo#79.

from oca-ci.

celm1990 avatar celm1990 commented on July 30, 2024

Hi,

I have same problem as @legalsylvain applied same configuration but in my case my repo is private
image

For testing purpose i make the repo as public and working, any idea to working in private repo?

image

Thanks for any suggestion

from oca-ci.

sbidoul avatar sbidoul commented on July 30, 2024

You need to use git+ssh// URLs and find a way to bring in the ssh private key.
Or you can mount your private repo in the container.

from oca-ci.

OpenCode avatar OpenCode commented on July 30, 2024

@LoisRForgeFlow actually, it is possible to package multiple addons (such as odoo/enterprise) with setuptools-odoo. This is explained in the docs. You can create your own setup.py and with a symlink structure you can package odoo/enterprise. That is what we do for our enterprise projects, so we can pip freeze it and such...

But that is not strictly necessary. If you can bring odoo/enterprise in the test image, you can simply update the Odoo addons-path in $ODOO_RC to point to it. Pip install of addons is compatible with addons path and you can mix both.

Hi @sbidoul. Do you have any suggestions or examples on how to add enterprise modules among those available for testing?

from oca-ci.

legalsylvain avatar legalsylvain commented on July 30, 2024

I'm closing this issue because the question is solved. Regarding EE modules, please open a new issue.

regards.

from oca-ci.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.