-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Current Outcome
Currently the CLI sites:create process calculates recommended values for Database Name and Database Username by stripping out any . characters from the provided Domain.
The recommendation calculations for these same values in the web UI includes a more complex find/replace process which will remove special characters beyond .s. This process also enforces maximum lengths for the values, which prevent these recommended values from being too long for mysql limitations. This processing happens within frontend javascript code.
Desired Outcome
Ideally these processes would return the exact same values.
Having these calculations happen in the same language would help ensure they would always reach the same result given the same value.
Additionally, if these processes could lean on the same point of calculation we would be left with a less brittle system as any future updates to this process would automatically change behavior at both points of user interaction.
I've not noticed any other discrepancies in recommendations between the two processes. However, this would be a good opportunity to carefully audit all others and ensure everything else matches.
Steps to Reproduce
- Step through an
Add Siteprocess in the web UI. Use a lengthy subdomain with special characters, such asthis-is-a-very-long-subdomain.yoursite.com. Observer the recommendedDatabase NameandDatabase Usernamevalues. - Step through the
sites:createprocess using the CLI, reusing the same subdomain. Observer the recommendedDatabase NameandDatabase Usernamevalues. - Note the differences between the two.
Related
Acceptance Criteria
- The CLI recommendations for
Database NameandDatabase Usernamevalues should strip the same characters from the domain as the web UI currently does. - The CLI recommendations for
Database NameandDatabase Usernamevalues should limit value lengths to match those of the current web UI solution. - If possible, the point of calculation used by both of these processes should be the same.