Skip to content

wfctl validate --plugin-dir does not load types from plugin.json capabilities #315

@intel352

Description

@intel352

Summary

wfctl validate --plugin-dir <dir> does not recognize module or step types declared in external plugin plugin.json manifests. Configs that use external plugin types (e.g., authz.casbin, step.authz_check_casbin) always fail validation unless --skip-unknown-types is used.

Reproduction

# Plugin directory structure:
# plugins/workflow-plugin-authz/
#   plugin.json          (declares authz.casbin, step.authz_check_casbin, etc.)
#   workflow-plugin-authz (binary, downloaded from release)

$ wfctl validate --plugin-dir plugins config.yaml
error: 1 config(s) failed validation

$ wfctl validate --skip-unknown-types config.yaml
PASS config.yaml (5 modules, 1 workflows, 0 triggers)

plugin.json

The manifest uses the v0.3.0+ capabilities format:

{
    "name": "workflow-plugin-authz",
    "version": "1.0.0",
    "type": "external",
    "capabilities": {
        "configProvider": false,
        "moduleTypes": ["authz.casbin"],
        "stepTypes": [
            "step.authz_check_casbin",
            "step.authz_add_policy",
            "step.authz_remove_policy",
            "step.authz_role_assign"
        ],
        "triggerTypes": []
    }
}

Expected Behavior

wfctl validate --plugin-dir plugins should:

  1. Scan the plugin directory for subdirectories containing plugin.json
  2. Read moduleTypes, stepTypes, and triggerTypes from the manifest
  3. Register those types as known so they don't trigger "unknown type" validation errors

The binary should NOT need to be executed for type discovery — the manifest already declares everything needed.

Environment

  • wfctl v0.3.36
  • workflow-plugin-authz v0.3.0
  • macOS arm64

Metadata

Metadata

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