Spec discussion: Should plugins support a top level container_spec
?
#6459
aaronsteers
announced in
Spec Discussions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We considered supporting a plugin-level
container_spec
option when we released thecontainer_spec
feature. The two reasons we declined a plugin-levelcontainer_spec
at the time were:Challenge 1. Problematic UX around inheritance between the plugin and its commands.
There are a number of confusing and difficult-to-impossible UX problems that inheritance would create:
ports
are defined on the parent image, does this mean that no two commands can ever be run simultaneously. (At the command level, we solve this by only claiming ports for commands that need them.)volumes
. If some commands don't need volumes, they nevertheless would be inherited by default from a top-level declaration.Note:
container_spec
settings with explicit (often empty) command-level ones; however, then we end up with a solution which is potentially more verbose and less intuitive (perhaps harder to read/debug) than relying on self-contained command-level specs.Challenge 2. Unclear resolution path for commands that themselves do not have
container_spec
definedThe presence of a
container_spec
at the plugin level implies that the entire plugin supports containerization and would inherit the spec of the plugin which is parent to the command. However, there are clear cases where this should not be the case. Just because a plugin has some commands that have acontainer_spec
, this does not imply that all commands are containerizable.pull_image
command which would be run before the image is available to run - and which itself would fail if run from inside the container.container_spec
, thenargs
and/orexecutable
would/could/should be executable from within that spec. However, this is not the case, since the (native/local)executable
andargs
would be designed to executing locally, and often would be different than the syntax and args needed within that command'scontainer_spec
declaration.Beta Was this translation helpful? Give feedback.
All reactions