Skip to content

plugin: conditions.remote is validated but never evaluated #1040

Closed

Description

@scttfrdmn

Found while working on #1001.

The plugin spec and AUTHORING.md in spore-plugins describe conditions.remote as "pre-flight checks before install". Every registry plugin declares conditions.remote: [{type: platform, os: linux}], and some declare type: command checks as well. Nothing evaluates them, though: pkg/plugin/validate.go (lines 146 and 223) is the only code that reads Conditions.Remote. spored's pluginruntime never checks them before it runs remote.install, and neither does spawn plugin install.

The effect is that a remote pre-flight condition a plugin author writes is silently ignored. #1001 covers the Windows case with a blanket refusal (plugin.CheckSporeOS), but a type: command remote condition, such as "docker must already be present", still never runs.

Suggested fix: evaluate conditions.remote in Runtime.InstallWithProvenance before the install phase. platform would be checked against runtime.GOOS on the spore, and command would go through the executor. A failure should mark the plugin failed, using the condition's message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions