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
ParseVersion() — Strip leading v prefix before regex matching. All callers (plugins, packs, constraints) benefit automatically.
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).
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
Root Cause
The
MakefilesetsVersionviagit describe --tags --always --dirty, which produces strings like:v0.8.1v0.8.1-dirtyv0.8.1-3-gabcdefv0.8.1-3-gabcdef-dirtyParseVersion()inpkg/registry/version.godoes not strip the leadingvprefix before applying the semver regex, causing allgit describeoutputs to fail parsing. TheNormalizeTag()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
ParseVersion()— Strip leadingvprefix before regex matching. All callers (plugins, packs, constraints) benefit automatically.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).