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 nil

View on GitHub (pinned to 2a29f1770b)

Solutions

  1. Capture the exact input string and Helm version and report it as a bug upstream
  2. Verify you are on a released Helm build, not a fork or local modification
  3. 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

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


AI-assisted analysis of helm/helm@2a29f1770b (2026-08-15). Data as JSON: /api/errors/ce135efb343c6d6a. Report an issue: GitHub.