Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
carmenbianca opened this issue Jan 25, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@carmenbianca
Copy link
Member

carmenbianca commented Jan 25, 2024

Module

The issue first occurred in coopiteasy/cie-custom#109, which contains custom modules.

Describe the bug

Given:

Then:

  • The test for pos_shift_partner_can_shop will pass, correctly installing itself and spp_pos_mustard.
  • The test for other_module will fail, failing to install spp_pos_mustard because the dependency pos_shift_partner_can_shop is not met.

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 carmenbianca added the bug Something isn't working label Jan 25, 2024
@carmenbianca
Copy link
Member Author

Tagging @remytms

@sbidoul
Copy link
Member

sbidoul commented Jan 29, 2024

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
Copy link
Member Author

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/[email protected]#subdirectory=setup/spp_pos_mustard
git+https://github.com/carmenbianca/[email protected]#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
Copy link
Member

sbidoul commented Mar 17, 2024

@carmenbianca if I understood your issue correctely, it might be fixed by #72

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants