Describe the bug
It is possible to create configuration store entries with differently cased versions of the same name (e.g., Meter.csv vs meter.csv). Most configuration store functionality assumes these labels to be case sensitive, but the handling is inconsistent and not all operations correctly lower-case the name before it is used.
To Reproduce
Steps to reproduce the behavior:
-
Create two different configurations:
$ echo "{This is": "Uppercase One"} > One.json
$ echo "{This is": "lowercase one"} > one.json
-
Store the configurations with the same name but different casing.
$ vctl config store foo one one.json
$ vctl config store foo One One.json
-
Confirm that both labels appear in the list.
$ vctl config list foo
One
one
-
Retrieve the configurations and note that they both have the contents assigned to the second label stored.
$ vctl config get foo One
{
"This is": "uppercase One"
}
$ vctl config get foo one
{
"This is": "uppercase One"
}
-
Delete the label which was stored first:
$ vctl config delete foo one
(does not display output)
-
Observe that the second configuration was removed, not the one we requested be removed.
$ vctl config list foo
one
-
Attempt to retrieve each configuration. Note that both labels have no contents now, despite one label remaining in the list.
$ vctl config get foo one
config: error: 'No configuration file "one" for VIP IDENTITY foo'
$ vctl config get foo One
config: error: 'No configuration file "One" for VIP IDENTITY foo'
Expected behavior
Either the configuration labels should be case sensitive or not:
- If they are case sensitive, they should never overwrite the other-cased item.
- If they are case insensitive, we should never have multiple labels stored, and any operation on one cased version will work the same as the other.
Describe the bug
It is possible to create configuration store entries with differently cased versions of the same name (e.g., Meter.csv vs meter.csv). Most configuration store functionality assumes these labels to be case sensitive, but the handling is inconsistent and not all operations correctly lower-case the name before it is used.
To Reproduce
Steps to reproduce the behavior:
Create two different configurations:
$ echo "{This is": "Uppercase One"} > One.json
$ echo "{This is": "lowercase one"} > one.json
Store the configurations with the same name but different casing.
$ vctl config store foo one one.json
$ vctl config store foo One One.json
Confirm that both labels appear in the list.
$ vctl config list foo
One
one
Retrieve the configurations and note that they both have the contents assigned to the second label stored.
$ vctl config get foo One
{
"This is": "uppercase One"
}
$ vctl config get foo one
{
"This is": "uppercase One"
}
Delete the label which was stored first:
$ vctl config delete foo one
(does not display output)
Observe that the second configuration was removed, not the one we requested be removed.
$ vctl config list foo
one
Attempt to retrieve each configuration. Note that both labels have no contents now, despite one label remaining in the list.
$ vctl config get foo one
config: error: 'No configuration file "one" for VIP IDENTITY foo'
$ vctl config get foo One
config: error: 'No configuration file "One" for VIP IDENTITY foo'
Expected behavior
Either the configuration labels should be case sensitive or not: