Giter Club home page Giter Club logo

pluginhook's Issues

Pluginhook runs plugin scripts in parallel, which may be a problem for certain scripted tasks

An example of the situation is:

  • dokku plugins each have their own install script
  • running pluginhook install will run all of these scripts in parallel
  • if more than one of these scripts includes use of apt-get, there's a pretty high likelihood that they'll both be trying to use apt-get in two processes. In one process, apt-get will be unable to get the dpkg lock and will therefore fail
  • the result is that plugins may fail to install their dependencies, potentially at random

@progrium, what's your preferred course of action to resolve this? @asm89 and I were discussing two possibilities last night:

  • plugin script authors should explicitly make sure scripts run safely in parallel with each other, e.g. through use of flock
  • there could be a way to force pluginhook to run scripts in series, e.g. in the form of a -serial flag which dokku could use for running install phases of plugins

Either of these approaches would work, I think, but each has some fairly significant tradeoffs.

Any strong preference either way?

environment variable to indicate currently running hook

As a potential solution to dokku/dokku#425, I think it would make sense for pluginhook to inject an environment variable that scripts can check for to see if they were triggered by a pluginhook call, and what the trigger was.

For example, the solution to the mentioned issue would be to check for RUNNING_PLUGINHOOK=pre-release and just not trigger the restart code in config:set if true.

Pluginhook hangs when launched from ssh

If I specify a command to ssh, sshd runs it in a non-interactive session.
This causes pluginhook to attach an stdin to the first plugin process, and thus to hang.

Running ssh with -t (eg ssh -t dokku@host logs) forces an interactive session whichs makes it work.
Alternatively running echo | ssh dokku@host logs works too.

If have no idea whether there is a simple fix to the problem.
The workaround above might be the only easy solution.

Missing LICENSE file

Hi,

While I've been working on the Debian's packaging for pluginhook I noticed that, although the README.md file mentions MIT as the license under which the sources are distributed, the sources lack a proper LICENSE or COPYING file.

Could you please add such file to clarify the license terms?

Thanks for considering.

Only last plugin commands are executed

I noticed that only alphabeticaly-last plugin commands can be executed, even if all of them are displayed on "help".

For example, with a fresh install of dokku:

$ pluginhook commands help
    logs <app>      Show the last logs for an application
    url <app>       Show the URL for an application
$  pluginhook commands url myapp  # Nginx plugin
    http://myapp.mydomain.com
$ pluginhook commands logs myapp  # 00_dokku-standard plugin
$ (no output)

By extension dokku logs myapp does not work on dokku ;)

Debug Flag?

Using dokku, I'm having an issue where pluginhook is erroring out, but I have not way to capture the error. Would it be possible to add a debug flag to show stdout/stderr?

I tried doing this in go myself, but I'm having version mismatch issues between the compiler and the code.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.