The validation of grafanaDependency
uses a regex pattern that is too strict
#279
Labels
bug
Something isn't working
See:
plugin-validator/config/plugin.schema.json
Line 173 in 762a056
This pattern:
^(<=|>=|<|>|=|~|\\^)?([0-9]+)(\\.[0-9x\\*]+)(\\.[0-9x\\*]+)?(\\s(<=|>=|<|=>)?([0-9]+)(\\.[0-9x]+)(\\.[0-9x]+))?(\\-[0-9]+)?$
does not permit more complicated, but valid, semantic version ranges such as:
>= 10.4.10 < 11 || >= 11.1.0
Options:
Background:
While building an urgent patch for the GEL Plugin (https://github.com/grafana/gex-plugins) for a customer POC, our build process spontaneously failed due to a change of
plugin-validator
where a strict pattern forgrafanaDependency
is required to pass. The gex-plugins currently use>= 10.4.10 < 11 || >= 11.1.0
to specify the officially supported range. This is a valid semver, but the pattern used in the schema forgrafanaDependency
does not allow for spaces, multiple operators, or multiple ranges separated by||
.To work around this issue, I had to disable this check altogether. In order to proceed, I will need to know which path the
plugin-validator
is choosing to take so I can respond accordingly.If the choice is A, I will have to alter the officially supported version range in gex-plugins, or find a way to disable this strict check without also disabling overall plugin-validation.
See:
The text was updated successfully, but these errors were encountered: