Skip to content

Plugin version check fails on dev builds with v-prefix (git describe output) #343

@pocky

Description

@pocky

Description

Plugins fail to start on development builds (main branch or in-progress work) because the version compatibility check rejects versions produced by git describe --tags --always --dirty.

Error

some plugins failed to start error=init plugin event-logger: init [event-logger]: version compatibility check failed: version: invalid format "v0.8.1-dirty"
init plugin awf-plugin-time: init [awf-plugin-time]: version compatibility check failed: version: invalid format "v0.8.1-dirty"

Root Cause

The Makefile sets Version via git describe --tags --always --dirty, which produces strings like:

Git state Output
At tag, clean v0.8.1
At tag, dirty v0.8.1-dirty
Commits after tag v0.8.1-3-gabcdef
Commits after tag, dirty v0.8.1-3-gabcdef-dirty

ParseVersion() in pkg/registry/version.go does not strip the leading v prefix before applying the semver regex, causing all git describe outputs to fail parsing. The NormalizeTag() helper exists for this purpose but is never called in the version check flow.

Additionally, effectiveCLIVersion() only handles the "dev" prefix case and passes non-parseable git describe output (e.g., v0.8.1-3-gabcdef-dirty) through unchanged, which also fails parsing.

Fix

  1. ParseVersion() — Strip leading v prefix before regex matching. All callers (plugins, packs, constraints) benefit automatically.
  2. effectiveCLIVersion() — Fall back to "999.0.0" when the version string is not valid semver (handles complex git describe output with commit count and hash).

Affected Versions

Any development build from v0.8.0+ (when plugin system was introduced).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions