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

server(plugins): update without downtime #6443

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

kontrollanten
Copy link
Contributor

@kontrollanten kontrollanten commented Jun 17, 2024

Description

  • Create a new folder each time a new plugin/theme is installed or updated. The folder name is created based on the package.json content hash.
  • Removes the need to decache nodes require cache when updating plugins.
  • Run install/update/uninstall operations in jobs.

Related issues

closes #4828

Has this been tested?

  • 👍 yes, I added tests to the test suite
  • 💭 no, because this PR is a draft and still needs work
  • 🙅 no, because this PR does not update server code
  • 🙋 no, because I need help

@kontrollanten kontrollanten force-pushed the feat-4828-plugin-update branch 5 times, most recently from 94f6fb5 to 38b0c31 Compare June 19, 2024 16:28
@kontrollanten kontrollanten marked this pull request as draft June 19, 2024 18:29
@kontrollanten
Copy link
Contributor Author

I don't know why the test is failing, it seems unrelated to the changes and it works when I test locally.

@Chocobozzz , currently this PR doesn't handle multiple parallell installs. The package.json is copied when install process begins, so if there's multiple parallell installations only the last one will be stored in package.json. I propose to move the plugin install/update/uninstall processes to be handled by a job instead. Cons:

a) More stable server. If the server restarts just after an admin has started a plugin installation it won't be aborted.
b) Better UX. Today the user get an error message saying the installation failed when there's a HTTP timeout.

@kontrollanten kontrollanten force-pushed the feat-4828-plugin-update branch from 38b0c31 to 5e13fda Compare June 20, 2024 05:26
Create a new folder each time a new plugin/theme is installed or
updated. The folder name is created based on the package.json content
hash.

closes Chocobozzz#4828
Upon an failed update, rollback to the previous version.
* To avoid long running operations in HTTP requests.
* To not collidate with other install/update/uninstall operations.
@kontrollanten kontrollanten force-pushed the feat-4828-plugin-update branch from 4e8eace to c6a1114 Compare June 26, 2024 15:21
@kontrollanten
Copy link
Contributor Author

@Chocobozzz Let me know what you think of this draft. If you're positive to the solution I'll fix the broken tests.

@kontrollanten
Copy link
Contributor Author

@Chocobozzz Ping

@Chocobozzz
Copy link
Owner

@Chocobozzz Ping

I'm sorry but I unfortunately don't have time at the moment to review your work

@kontrollanten kontrollanten changed the title server(plugins): upate without downtime server(plugins): update without downtime Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update plugins without downtime
2 participants