kubernetes/kops · error
task %T did not have a name
Error message
task %T did not have a name
What it means
Thrown in TaskKey when the task does implement HasName but GetName() returned nil or an empty string after fi.ValueOf dereferencing. The task is nameable but currently unnamed, so the canonical key cannot be built — usually a task constructed without setting its Name field.
Source
Thrown at upup/pkg/fi/cloudup/template_functions.go:586
matches := make([]fi.CloudupTask, 0, len(keys))
for _, key := range keys {
matches = append(matches, tasks[key])
}
return matches, nil
}
// TaskKey returns the canonical task key used in the task map.
func (tf *TemplateFunctions) TaskKey(task fi.CloudupTask) (string, error) {
if task == nil {
return "", fmt.Errorf("task is nil")
}
hasName, ok := task.(fi.HasName)
if !ok {
return "", fmt.Errorf("task %T does not implement HasName", task)
}
name := fi.ValueOf(hasName.GetName())
if name == "" {
return "", fmt.Errorf("task %T did not have a name", task)
}
return fi.TypeNameForTask(task) + "/" + name, nil
}
// SharedVPC is a simple helper function which makes the templates for a shared VPC clearer
func (tf *TemplateFunctions) SharedVPC() bool {
return tf.Cluster.SharedVPC()
}
// GetInstanceGroup returns the instance group with the specified name
func (tf *TemplateFunctions) GetInstanceGroup(name string) (*kops.InstanceGroup, error) {
ig := tf.KopsModelContext.FindInstanceGroup(name)
if ig == nil {
return nil, fmt.Errorf("InstanceGroup %q not found", name)
}
return ig, nil
}
View on GitHub (pinned to 4c8573c808)
When it happens
Trigger: Thrown at upup/pkg/fi/cloudup/template_functions.go:586 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05).
Data as JSON: /api/errors/7f370cc384d2d213.
Report an issue: GitHub.