-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Run plugins-install hooks in series #366
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
Conversation
|
I'd prefer plugins-install not be installing dependencies in the first place. Needless to say this is an issue no matter what the name of the hook |
|
A dependencies hook would be nice, but it seems to me that the PR #276 has the same issue of trying to install packages in parallel. |
|
Yes, it's an issue no matter the name of the hook. |
|
I should read comments more carefully 😓 |
|
😄 The only issue I see with running things in serial is eventually someone is going to want to put an order of some kind on things. How will that be handled? |
|
pluginhook already defines an order: the alphabetic order (see https://github.com/progrium/pluginhook#pipeline-filtering-with-plugins). |
|
The order is just file system order since it takes a glob of the directory its passed (https://github.com/progrium/pluginhook/blob/master/pluginhook.go#L24) I'm just saying that IMO serial execution invites plugins that depend on other plugins during the installation process. I think plugins should be relatively "self-contained" as opposed to making system level modifications and the like. |
|
Globs are lexicographically ordered, and pluginhook already specify how to handle plugins requiring an order of execution. |
|
I don't like the way of doing this. We're just reimplementing pluginhook there. I'll leave this open, just as a reminder. |
|
I just did the same as commit 455be29 to be able to use some plugins. Fixing progrium/pluginhook#1 would be ideal, but there is not much activity... |
|
Fixed by progrium/pluginhook#8. |
If several plugins install new packages with
apt-get,dokku plugins-installbreaks becausepluginhookruns scripts in parallel, andapt-getcannot run in parallel (dpkglocks/var/lib/apt/lists/lock).This happens as soon as we add a plugin using
apt-get(like dokku-mongodb-plugin) sincenginx-vhostsalready callsapt-get.This PR fixes it by running hooks in series (progrium/pluginhook#1 would be a nicer fix).