enonic/cli-enonic

Comparison of user input with a sandbox name should be case-insensitive

Closed this issue · 8 comments

  1. type the command - enonic sandbox create -v 7.12.2 test
  2. Try to delete the just created sanbox , type the command and the name starts with uppercaseenonic sandbox delete -f Test

image

  1. Try to create the sandbox with the name that starts with uppercase:

image

Message Sandbox 'Test' created with distro 'enonic-xp-windows-sdk-7.12.2'. apears , but actually new sandbox was not created

image

BUG - Sanbox name should be case-sensetive

jsi commented

What happens if the version number is not the same? - I tried this on Mac. There was a sandbox testAAA on version 7.9.2 with a number of content and apps installed. Then I created testaaa with version 7.12.2 and got:
Sandbox 'testaaa' created with distro 'enonic-xp-mac-sdk-7.12.2'.
However, just like Siarheis test case above, there was no testaaa sandbox. Instead, the testAAA sandbox had been upgraded to 7.12.2 with all the same contents and users as before.

image

The same issue is on Windows - sanbox with name Sandbox1 upgrated to 7.12.2

The title of this issue is wrong. Sandbox names are already case-sensitive - they are created with correct case. It's the check for existing sandboxes that should be case-INsensitive.

jsi commented

@sgauruseu tested the previous case on Windows, and it behaved the same as Mac, so there does not seem to be a problem with different behaviour on different platforms, just strange behaviour / incorrect feedback when we use the same name with different case for sandbox names.

jsi commented

@alansemenov - Regarding your comment from yesterday: Does this mean that we want case-sensitive names for sandboxes, but we will not allow any sandbox to have the same "case-INsensitive name"?

pmi commented

This is what happens on windows when you try creating folder sandbox1 with Sandbox1 already present:

Screenshot 2023-04-18 160520

pmi commented

So I assume we will be safer cross platform when ignoring the case ourselves as well 😉

@alansemenov - Regarding your comment from yesterday: Does this mean that we want case-sensitive names for sandboxes, but we will not allow any sandbox to have the same "case-INsensitive name"?

Yes - see Pavel's comment above. We want the same behaviour.