-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
New database plugin API to reload by plugin name #24472
Conversation
CI Results: |
Build Results: |
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.
LGTM! Assuming API docs will come in a follow-up PR.
Yep definitely! In part, I wanted to make sure people were happy with the direction before committing to writing the docs. |
Given the reviews so far I decided to tack the API docs onto this PR for completeness. I also added some more details to the response so that a) users get a warning if nothing was reloaded, and b) users get some visibility over exactly what did get reloaded, which otherwise would be hard to verify |
This complements the reset connection API, to also be able to restart by plugin instead of just by connection. This is especially helpful for completing plugin upgrades. In a future PR, I plan to support making an internal call to this endpoint from a more generic plugin reload endpoint to support database plugin reloads across multiple database mounts.
I had originally planned to implement cross-mount plugin reloads by killing plugins directly from the plugin catalog. However, that wouldn't give the best possible UX because the plugin catalog only knows what's currently running, not what the next config should be, so it would only be able to kill the existing plugins and not restart them. Then if the new plugin fails to come up, users won't get the error message as soon as they could have if it got started again immediately. By adding the API to the database plugin directly, we can kill and restart the plugin in the same context and return errors immediately.