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

[extending] openwisp-users cannot be extended. #377

Closed
atb00ker opened this issue Feb 1, 2021 · 5 comments · Fixed by #390
Closed

[extending] openwisp-users cannot be extended. #377

atb00ker opened this issue Feb 1, 2021 · 5 comments · Fixed by #390
Assignees
Labels
bug Important Higher priority or release blocker

Comments

@atb00ker
Copy link
Member

atb00ker commented Feb 1, 2021

The openwisp-users models are hardcoded in places, example:

To solve this problem, we should:

@atb00ker atb00ker added the bug label Feb 1, 2021
@nemesifier
Copy link
Member

@atb00ker I'd be happy also with simply fixing the import, without extending openwisp_users, although the test would surely allow us to ensure everything works but if we follow that approach then we should do it also in firmware-upgrader with the controller models and in monitoring with the controller models, but we risk to bloat the test code and make our life painful so we should be cautious.

@atb00ker
Copy link
Member Author

atb00ker commented Feb 5, 2021

@nemesisdesign I understand but if we are providing the feature to extend, I think it's easier to develop it when we can test by extending as well, but I understand your point too! 😄

@okraits
Copy link
Member

okraits commented Feb 5, 2021

I think it should be verified and tested that the extension feature actually works and that all modules are prepared.

After updating our setup to the latest releases of all OpenWISP modules I started to create extended apps for all apps of openwisp-controller and openwisp-users, investing many hours to get this to work until I realized that there are still issues like this one (and possibly others). I noticed I was probably the first one to really use this feature and then resorted to add my changes with few patches.

@nemesifier
Copy link
Member

nemesifier commented Feb 5, 2021

@atb00ker @okraits when important issues like this arise, please help me to make sure these are listed in the priority board.
The same issue is affecting other modules, I just did a project wide search on all the openwisp modules.
OpenWISP uses swapping with django-organizations and django-notifications-hq successfully, but we did the effort to patch those modules first, so the same process will have to be repeated with this new feature.
I'm going to open issues in all the modules I find and report.

@nemesifier
Copy link
Member

IPAM suffers the same issue.
Docker-openwisp has several imports in which models are imported directly.
Network topology only had a couple of lines in the tests: openwisp/openwisp-network-topology@c275a5a
The most important module suffering the issue is this one.

@devkapilbansal devkapilbansal self-assigned this Feb 11, 2021
devkapilbansal added a commit that referenced this issue Feb 18, 2021
devkapilbansal added a commit that referenced this issue Feb 24, 2021
devkapilbansal added a commit that referenced this issue Mar 11, 2021
devkapilbansal added a commit that referenced this issue Mar 15, 2021
devkapilbansal added a commit that referenced this issue Mar 21, 2021
@nemesifier nemesifier added the Important Higher priority or release blocker label Mar 25, 2021
devkapilbansal added a commit that referenced this issue Apr 3, 2021
nemesifier pushed a commit that referenced this issue Apr 3, 2021
…st app #377

Closes #377

Co-authored-by: Ajay Tripathi <ajay39in@gmail.com>
pandafy pushed a commit that referenced this issue Apr 9, 2021
…st app #377

Closes #377

Co-authored-by: Ajay Tripathi <ajay39in@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Important Higher priority or release blocker
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants