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 bundle (re-)loading #22013
Fix bundle (re-)loading #22013
Conversation
🦋 Changeset detectedLatest commit: 70bc671 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Note on the potential fixing of #21758: Currently this PR only inserts missing module entries and removes DB records of entries that were removed from the bundle (matched based on the bundle ID + folder / entry name). If we want, we can extend the scope of this PR to instead upsert all entries, since we're touching on it anyways. |
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.
As already discussed, I think we can consider #21758 fixed with this PR as the missing bundle entries should be added now.
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.
- renaming an endpoint in a bundle (Extensions: Changing name of an
entry
on abundle
it's not reflected #21942)
successfully updates the database but doesnt actually load the newly named endpoint either on auto-reload or on a manual restart(endpoint names get compiled into the bundle unlike regular endpoints, so missed a rebuild in that specific test)
- adding a new entry to a bundle (Extensions: Adding a new entry to bundle does not update extensions list #21946, New extensions in bundle aren't reloaded in development mode #21922) (tested with
displays
,endpoints
andhooks
) - removing an entry from a bundle
Interesting find. I'll have a look |
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.
Great work 🎉
Scope
What's changed:
directus_extensions
bundle entry records when loading a bundle extension, by removing stale ones and adding new onesdatabase.insert
I'm now using theextensionsItemService.insert
, was there any reason it was not used before?Potential Risks / Drawbacks
Review Notes / Questions
Fixes #21942, fixes #21946, fixes #21922