You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 Site process in the web UI. Use a lengthy subdomain with special characters, such as this-is-a-very-long-subdomain.yoursite.com. Observer the recommended Database Name and Database Username values.
Step through the sites:create process using the CLI, reusing the same subdomain. Observer the recommended Database Name and Database Username values.
Current Outcome
Currently the CLI
sites:create
process calculates recommended values forDatabase Name
andDatabase 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
Add Site
process in the web UI. Use a lengthy subdomain with special characters, such asthis-is-a-very-long-subdomain.yoursite.com
. Observer the recommendedDatabase Name
andDatabase Username
values.sites:create
process using the CLI, reusing the same subdomain. Observer the recommendedDatabase Name
andDatabase Username
values.Related
Acceptance Criteria
Database Name
andDatabase Username
values should strip the same characters from the domain as the web UI currently does.Database Name
andDatabase Username
values should limit value lengths to match those of the current web UI solution.The text was updated successfully, but these errors were encountered: