-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Fix loading of periodic tasks and clean up extension loading. #4064
Conversation
@arikfr Hey, just wanted to say that this is something we really need to ship in v8 since the periodic task loading mechanism was simply broken last time we touched the code. I forgot to not only load the entrypoints but also call the them to get the schedule parameters to be passed to Celery. |
This does a few things: - add tests for extension loading - refactor the extension and periodic task loading - better handle assertions raised by extensions (e.g. when an extension tries to override an already registered view) - attach exception traceback to error log during loading for improved debugging
b4b93a5
to
56ff952
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯 on adding tests. Can you see why they fail in the CI build?
Hm, the tests pass locally, it's weird. Must be a difference in environment since it calls pip to actually install the dummy package. Let me see if I can figure out a different way to ship the dummy package. |
Did the local tests work inside a container? |
@arikfr Oh yeah, totally. I've been running them locally in the regular Docker dev environment. I just pushed a change to use |
Update: Yep, using |
For the record, I created the
The egg-info directory is not cleaned up by pip, just the link in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about adding the instructions on how to create the egg-info
directory to a README file in the extension directory?
👍 |
…ash#4064) * Fix loading of periodic tasks and clean up extension loading. This does a few things: - add tests for extension loading - refactor the extension and periodic task loading - better handle assertions raised by extensions (e.g. when an extension tries to override an already registered view) - attach exception traceback to error log during loading for improved debugging * Use site.addsitedir instead of calling pip. * Use sys.path instead of site.addsitedir and also the setup.py egg_info command.
What type of PR is this? (check all applicable)
Description
This does a few things: