helm/helm · warning
version is required
Error message
version is required
What it means
The default branch of literalParser.listItem (pkg/strvals/literal_parser.go:235) fires only when the scanner's last rune is none of the stop runes '[', '.', '=' while no error occurred. With the current stop set every terminating rune is handled by an explicit case, so this branch is defensive: it guards against internal invariant breakage or future parser changes rather than normal user input.
Source
Thrown at internal/chart/v3/lint/rules/chartfile.go:140
}
return nil
}
func validateChartAPIVersion(cf *chart.Metadata) error {
if cf.APIVersion == "" {
return errors.New("apiVersion is required. The value must be \"v3\"")
}
if cf.APIVersion != chart.APIVersionV3 {
return fmt.Errorf("apiVersion '%s' is not valid. The value must be \"v3\"", cf.APIVersion)
}
return nil
}
func validateChartVersion(cf *chart.Metadata) error {
if cf.Version == "" {
return errors.New("version is required")
}
version, err := semver.StrictNewVersion(cf.Version)
if err != nil {
return fmt.Errorf("version '%s' is not a valid SemVerV2", cf.Version)
}
c, err := semver.NewConstraint(">0.0.0-0")
if err != nil {
return err
}
valid, msg := c.Validate(version)
if !valid && len(msg) > 0 {
return fmt.Errorf("version %w", msg[0])
}
return nilView on GitHub (pinned to 2a29f1770b)
Solutions
- Capture the exact input string and Helm version and report it as a bug upstream
- Verify you are on a released Helm build, not a fork or local modification
- Reduce the failing --set-string expression to the minimal repro before filing
Defensive patterns
Strategy: try-catch
Try / catch
if err := strvals.ParseLiteral(s); err != nil {
if strings.Contains(err.Error(), "unexpected token") { /* internal/defensive: report input + version upstream */ }
return err
} Prevention
- Treat this branch appearing as a bug signal, not a user error
- Keep the failing input for the bug report
- Pin a released Helm/strvals version
When it happens
Trigger: Not reachable through ordinary ParseLiteral input with the current stop set {'[','.','='}; would require an internal parser regression or an unexpected rune returned without error.
Common situations: Virtually never seen in practice; if it appears, it indicates a modified/patched parser, an exotic rune stream, or a Helm bug.
Related errors
- chart name not specified
- should be a file, not a directory
- name is required
- apiVersion is required. The value must be "v3"
- each maintainer requires a name
AI-assisted analysis of helm/helm@2a29f1770b (2026-08-15).
Data as JSON: /api/errors/ce135efb343c6d6a.
Report an issue: GitHub.