kubernetes/kops · error

found multiple matching assets for key: %q

Error message

found multiple matching assets for key: %q

What it means

AssetStore.Find resolved the key to more than one asset (multiple asset paths matched the key/assetPath pair); the store expects a unique resolution and refuses to pick arbitrarily.

Source

Thrown at upup/pkg/fi/assetstore.go:168

			}
		}

		matches = append(matches, asset)
	}

	if len(matches) == 0 {
		return nil, nil
	}
	if len(matches) == 1 {
		klog.Infof("Resolved asset %s:%s to %s", key, assetPath, matches[0].AssetPath)
		return &assetResource{Asset: matches[0]}, nil
	}

	klog.Infof("Matching assets:")
	for _, match := range matches {
		klog.Infof("    %s %s", match.Key, match.AssetPath)
	}
	return nil, fmt.Errorf("found multiple matching assets for key: %q", key)
}

// Add an asset into the store, in one of the recognized formats (see Assets in types package)
func (a *AssetStore) AddForTest(id string, path string, content string) {
	a.assets = append(a.assets, &asset{
		Key:       id,
		AssetPath: path,
		resource:  NewStringResource(content),
	})
}

func hashFromHTTPHeader(url string) (*hashing.Hash, error) {
	klog.Infof("Doing HTTP HEAD on %q", url)
	response, err := http.Head(url)
	if err != nil {
		return nil, fmt.Errorf("error doing HEAD on %q: %v", url, err)
	}
	defer response.Body.Close()

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Provide a more specific assetPath so only one asset matches
  2. Eliminate duplicate asset entries for the same key
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at upup/pkg/fi/assetstore.go:168 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/4334b841b6f44310. Report an issue: GitHub.