Skip to content
This repository has been archived by the owner on Dec 7, 2023. It is now read-only.

Fix false positive object already exists error #517

Merged

Conversation

darkowlzz
Copy link
Contributor

verifyUIDOrName() performs a prefix match of a given object name. This
results in false positive errors when objects have similar names.

For example, if an object vm11 already exists. Creating another object
vm1 results in already exists error.

Instead of NewIDNameFilter(), use NewNameFilter() for exact match
filter.

Adds tests to verify the fix.

verifyUIDOrName() performs a prefix match of a given object name. This
results in false positive errors when objects have similar names.

For example, if an object `vm11` already exists. Creating another object
`vm1` results in already exists error.

Instead of `NewIDNameFilter()`, use `NewNameFilter()` for exact match
filter.

Adds tests to verify the fix.
@stealthybox
Copy link
Contributor

+1
/lgtm

@stealthybox stealthybox merged commit e6f4bfb into weaveworks:master Feb 3, 2020
@luxas luxas added this to the v0.7.0 milestone Jun 2, 2020
@darkowlzz darkowlzz deleted the already-exists-prefix-match branch July 19, 2020 12:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants