-
Notifications
You must be signed in to change notification settings - Fork 20
Add Foreign Addon Imps feature: addon implemenations as external packages #318
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
base: develop
Are you sure you want to change the base?
Add Foreign Addon Imps feature: addon implemenations as external packages #318
Conversation
|
Hi. I have just realized that the |
f00ff94 to
c7f7dc7
Compare
brianjgeiger
left a comment
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.
Quick drive-by, saw a typo.
Thank you for catching that typo. My apologies for the oversight. |
|
@chiku-samugari It looks like there are some merge conflicts that should be addressed here. Someone should be reviewing this PR shortly, as well |
|
@futa-ikeda Thanks, I will work on merge conflicts. But the code base grows a lot since the PR was opened and it is better to check for necessary follow-up changes caused by this PR. I will work on this aspect too. |
A Foreign Addon Imp is an addon implementation that is put outside of gravyvalet codebase offered as a Django application. A collection of Foreign Addon Imps is distributed as a Django project. AddonRegistry class is the dynamic addon imp registry that holds the addon imps in use. Even the built-in addon implementation needs to be registered to be used, by adding the name and imp number pair to `app.settings.ADDON_IMPS` configuration. `AddonImpNumbers` enum is discarded. In addition, AddonImpRegistry class replaces the public interface of `addon_service.common.known_imps` module. Foreign Addon Imps needs to be registered to `ADDON_IMPS` too. Moreover, they needs to be registered to `INSTALLED_APPS`.
8848fb8 to
4976efe
Compare
|
@futa-ikeda @brianjgeiger I have rebased onto |
sh-andriy
left a comment
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.
Overall: Good implementation with a few concerns
This is a solid feature that opens the addon system to external packages.
The new AddonImpRegistry is well-structured, the ADDON_IMPS mapping correctly replaces the old KnownAddonImps / AddonImpNumbers setup, and the test coverage is strong.
The documentation for foreign addon authors is also clear.
A few concerns worth noting:
-
Removal of
AddonImpNumbers- this is the only meaningful breaking change.
Anything downstream that relied on that enum will no longer work. Should be mentioned in release notes. -
Settings dependency - with the static registry gone,
ADDON_IMPSbecomes the single source of truth.
When we deploy this, we have to be aware that any misconfiguration here means built-in addons simply won’t register. -
Icon path handling - the
parts[-4:]slicing feels brittle and may not work for all external addon layouts.
Not blocking, but something to revisit.
Otherwise the architecture looks clean, and overall direction makes sense.
Approve with the above noted.
Deployment note
When this goes out, we should re-test the main addons (OAuth flow, listing, icons, etc..) to ensure nothing regressed with the registry switch.
Not a blocker - just something to keep in mind during rollout.
CC: @brianjgeiger @adlius @futa-ikeda - highlighting so it’s on everyone’s radar.
|
Quick status update: I'd like to release this after we release a smaller feature here #335. This may create an issue where the migration numbers in these PRs will conflict, so once PR #335 is merged, this will need to be updated once more. Hopefully this PR will be merged and released in mid-January, if things go well |
|
Thanks for the clarification. I understand that PR #335 will be merged first, and I'm happy to make the necessary updates afterward. |
|
Unfortunately, with the holiday coming up, many people will be out for the next couple of weeks (including myself). I will work to get this out as soon as possible, but it will be January when this is released |
|
Thanks for letting me know. That makes sense given the timing. |
Purpose
Introduce Foreign Addon Imps that enables third-party developers to create addon implemenations not built in to the gravyvalet codebase.
Changes
ADDON_IMPS.Nonetype fromenum_*_fieldsof GravyvaletModelAdminSide Effects
icon_nameofaddon_services_externalservicetable field type change requires database migration (0017_change_icon_name_to_charfield.py)API Documentation
No changes to external API endpoints.
Internal API for addon imp registration has been replaced by AddonImpRegistry:
Foreign Addon Imp framework that supports third-party addon implementations is introduced:
QE Notes
CE Notes