derailed/k9s · error

unable to parse version in %q

Error message

unable to parse version in %q

What it means

Helm history rows encode the resource path as ns/name:revision; getValsCmd() splits the name on ':' and requires at least two parts to extract (name, revision) for fetching revision values. If the selected row's name has no ':revision' suffix, the split yields 1 part and this error flashes before anything loads.

Source

Thrown at internal/view/helm_history.go:72

}

func (h *History) bindKeys(aa *ui.KeyActions) {
	if !h.App().Config.IsReadOnly() {
		h.bindDangerousKeys(aa)
	}

	aa.Delete(ui.KeyShiftA, ui.KeyShiftN, tcell.KeyCtrlS, tcell.KeyCtrlSpace, ui.KeySpace, tcell.KeyCtrlD)
	aa.Bulk(ui.KeyMap{
		ui.KeyShiftN: ui.NewKeyAction("Sort Revision", h.GetTable().SortColCmd("REVISION", true), false),
		ui.KeyShiftA: ui.NewKeyAction("Sort Age", h.GetTable().SortColCmd("AGE", true), false),
	})
}

func (h *History) getValsCmd(app *App, _ ui.Tabular, _ *client.GVR, path string) {
	ns, n := client.Namespaced(path)
	tt := strings.Split(n, ":")
	if len(tt) < 2 {
		app.Flash().Err(fmt.Errorf("unable to parse version in %q", path))
		return
	}
	name, rev := tt[0], tt[1]
	h.Values = model.NewRevValues(h.GVR(), client.FQN(ns, name), rev)
	v := NewLiveView(h.App(), "Values", h.Values)
	if err := v.app.inject(v, false); err != nil {
		v.app.Flash().Err(err)
	}
}

func (h *History) bindDangerousKeys(aa *ui.KeyActions) {
	aa.Add(ui.KeyR, ui.NewKeyActionWithOpts("RollBackTo...", h.rollbackCmd,
		ui.ActionOpts{
			Visible:   true,
			Dangerous: true,
		},
	))
}

View on GitHub (pinned to 2d3ccc6ba2)

Solutions

  1. Refresh the helm history view (:helm <release>) and retry on a freshly listed row
  2. Check you are on the stock helm history view — the row must look like 'myrelease:3'
  3. Verify the release with helm history <release> -n <ns>; if revisions exist but the row lacks them, upgrade k9s
Defensive patterns

Strategy: validation

Validate before calling

// guard the split before acting on the selection
if !strings.Contains(n, ":") {
    app.Flash().Errf("row %q lacks the name:revision format — refresh the view", path)
    return
}
name, rev, _ := strings.Cut(n, ":")

Prevention

When it happens

Trigger: Invoking the values action on a helm history row whose NAME column contains a plain release name without ':<rev>' — corrupted/stale table data, a custom column set that overwrote NAME, or a helm model that failed to append the revision suffix.

Common situations: Custom skins/views altering the NAME column format for helm history; pending-install releases where the revision is not yet assigned; version mismatches between k9s view and model code after partial upgrades.

Understand the failure class

Related errors


AI-assisted analysis of derailed/k9s@2d3ccc6ba2 (2026-08-15). Data as JSON: /api/errors/e0a2a2d5da00cb58. Report an issue: GitHub.