weaviate/weaviate · error
unexpected threshold version tag: %s
Error message
unexpected threshold version tag: %s
What it means
extractVersionAndCompare also validates the required-minimum version constant with minimumVersionRegexString. If the threshold configured in code/config doesn't match the expected format, it returns 'unexpected threshold version tag'. This is effectively a programming/configuration error in the required-version string, not a remote service problem.
Source
Thrown at modules/text2vec-contextionary/client/version_checks.go:34
"regexp"
"strconv"
)
const (
inputVersionRegexString = `^.*-v(?P<Major>[0-9]+)\.(?P<Minor>[0-9]+)\.(?P<Patch>[0-9]+)$`
minimumVersionRegexString = `^(?P<Major>[0-9]+)\.(?P<Minor>[0-9])+\.(?P<Patch>[0-9]+)$`
)
func extractVersionAndCompare(input, requiredMin string) (bool, error) {
inputRegexp := regexp.MustCompile(inputVersionRegexString)
minimumRegexp := regexp.MustCompile(minimumVersionRegexString)
if ok := inputRegexp.MatchString(input); !ok {
return false, fmt.Errorf("unexpected input version tag: %s", input)
}
if ok := minimumRegexp.MatchString(requiredMin); !ok {
return false, fmt.Errorf("unexpected threshold version tag: %s", requiredMin)
}
inputMatches := inputRegexp.FindAllStringSubmatch(input, 4)
inputMajor, _ := strconv.Atoi(inputMatches[0][1])
inputMinor, _ := strconv.Atoi(inputMatches[0][2])
inputPatch, _ := strconv.Atoi(inputMatches[0][3])
minimumMatches := minimumRegexp.FindAllStringSubmatch(requiredMin, 4)
minimumMajor, _ := strconv.Atoi(minimumMatches[0][1])
minimumMinor, _ := strconv.Atoi(minimumMatches[0][2])
minimumPatch, _ := strconv.Atoi(minimumMatches[0][3])
return compareSemver(inputMajor, inputMinor, inputPatch, minimumMajor, minimumMinor, minimumPatch), nil
}
func compareSemver(iMaj, iMin, iPat, rMaj, rMin, rPat int) bool {
if iMaj > rMaj {
return trueView on GitHub (pinned to 75aa4b6d11)
Solutions
- Fix the requiredMin value to full semver 'major.minor.patch' in the format the regex expects (no leading 'v' unless allowed).
- Inspect version_checks.go for the exact minimumVersionRegexString and match your threshold to it.
- If triggered only in tests, correct the test fixture to a valid threshold string.
Example fix
// before extractVersionAndCompare(input, "v1.0") // after extractVersionAndCompare(input, "1.0.0")
Defensive patterns
Strategy: validation
Validate before calling
var minVersionRe = regexp.MustCompile(`^[0-9]+\.[0-9]+\.[0-9]+$`)
if !minVersionRe.MatchString(requiredMin) {
return fmt.Errorf("configured min version %q is not valid semver", requiredMin)
} Prevention
- Keep requiredMin constants in full major.minor.patch form without a leading 'v'.
- Add a unit test asserting the minimum-version constant matches the regex.
- Review version_checks.go regex before editing version constants.
When it happens
Trigger: WaitForStartupAndValidateVersion invoked with a requiredMin string that doesn't match the minimum-version regex (e.g. 'v1.0', '1.0', '1.0.0-beta' if the regex disallows suffixes, or an empty value).
Common situations: Someone editing the minimum required version constant with a non-semver value; overriding version checks via config with a malformed threshold; tests exercising bad thresholds deliberately.
Related errors
- multi-tenancy is not enabled
- not possible to use the cache without compression
- RQ bits must be either 1 or 8
- cannot enable multiple quantization methods at the same time
- PQ is not currently supported for flat indices
AI-assisted analysis of weaviate/weaviate@75aa4b6d11 (2026-09-04).
Data as JSON: /api/errors/ab5ceb6c50fb0935.
Report an issue: GitHub.