Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Site recommended values should match those from web UI #42

Open
3 tasks
Jamesclark32 opened this issue Apr 12, 2022 · 0 comments · May be fixed by #50
Open
3 tasks

Create Site recommended values should match those from web UI #42

Jamesclark32 opened this issue Apr 12, 2022 · 0 comments · May be fixed by #50
Labels
Scope: CLI Type: Bug Fixes broken functionality that prevents something from being achieved.

Comments

@Jamesclark32
Copy link
Contributor

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

  1. 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.
  2. Step through the sites:create process using the CLI, reusing the same subdomain. Observer the recommended Database Name and Database Username values.
  3. Note the differences between the two.

Related

Acceptance Criteria

  • The CLI recommendations for Database Name and Database Username values should strip the same characters from the domain as the web UI currently does.
  • The CLI recommendations for Database Name and Database Username values 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.
@Jamesclark32 Jamesclark32 added the Type: Bug Fixes broken functionality that prevents something from being achieved. label Apr 12, 2022
@danielmlozano danielmlozano self-assigned this Jul 13, 2022
@danielmlozano danielmlozano linked a pull request Jul 26, 2022 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: CLI Type: Bug Fixes broken functionality that prevents something from being achieved.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants