OCA / oca-ci

Container image to run OCA CI tests
MIT License
30 stars 42 forks source link

Circular dependency feature not compatible with template's rebel modules #65

Open carmenbianca opened 9 months ago

carmenbianca commented 9 months ago

Module

The issue first occurred in https://github.com/coopiteasy/cie-custom/pull/109, which contains custom modules.

Describe the bug

Given:

Then:

See https://github.com/carmenbianca/circular-rebel-example for example GitHub CI runs.

To Reproduce

Affected versions: Any

Described above with example repository.

Expected behavior I expect pos_shift_partner_can_shop to be pip-installed always so that all modules in test-requirements.txt can be installed without error.

Additional context N/A

carmenbianca commented 9 months ago

Tagging @remytms

sbidoul commented 9 months ago

Did this scenario ever work or is it a regression of #58 (at first glance I don't see how it could have worked before) ?

carmenbianca commented 9 months ago

A version of this worked before. Before, as well as having spp_pos_mustard in the test-requirements.txt, pos_shift_partner_can_shop itself would also be in test-requirements.txt. Like so:

git+https://github.com/coopiteasy/cie-custom@12.0#subdirectory=setup/spp_pos_mustard
git+https://github.com/carmenbianca/circular-rebel-example@12.0#subdirectory=setup/pos_shift_partner_can_shop

This would satisfy the Python packaging requirements, and pos_shift_partner_can_shop would later be re-installed from the repository directory. Obviously not a perfect solution. But this stopped working after #58 because the pos_shift_partner_can_shop in test-requirements.txt would not be compatible with the generated pos_shift_partner_can_shop in test-constraints.txt.

The easy/naïve solution, to me, might be to list all local modules in test-constraints.txt. Whether or not excluded/not-included modules are pip-installed doesn't affect the outcome of the test, because they're not installed/initialised on the database. Alternatively, if that is too much installing, one could add an ALWAYS_PIP_INSTALL environment variable which the oca_list_addons_to_test_as_reqs script takes into account, and which would (manually) contain rebel modules with circular dependencies.

sbidoul commented 8 months ago

@carmenbianca if I understood your issue correctely, it might be fixed by https://github.com/OCA/oca-ci/pull/72