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
Edit:
The project name in ddev config must be a valid hostname, so a valid URL can be constructed.
If you enter a "project name" in ddev config which has spaces for example, it won't complain, but when you do a ddev start
Failed to start: nope not here.ddev.local is not a valid hostname. Please enter a site name in your configuration that will allow for a valid hostname. See https://en.wikipedia.org/wiki/Hostname#Restrictions_on_valid_hostnames for valid hostname requirements
So we're validating on start, but we need to validate at config.
What you expected to happen:
How to reproduce this:
Version: Please include the output of ddev version, docker version and the project's .ddev/config.yaml.
Updating to reflect that I believe this is 100% actionable with no additional AC defined, but if @cweagans doesn't believe that to be the case we should kick back with an incubate label and get this more fleshed out.
I was looking at this again. Go has a built in way to validate URLs, but we also agreed that we were standardizing on "project" instead of "site". I'm assuming that's still the case, so what would you like to do here? Leave the messaging the same and just validate that whatever we get is a valid hostname?
If we're using project name instead of site name, it's not obvious that this input is going to be validated like a URL. As a user, how am I supposed to know what to enter here the first time? Yeah, the error message will correct me, but how can we make this clear the first time a user is going through this process?
Thanks, @rfay, for the clarification. I'm tracking and onboard. Basically, whatever is submitted as a project name + the additional .ddev.local (or whatever if we ultimately change that as per #416 should validate. Ideally the validation from the Go library matches what @andrew-c-tran is using on the front-end.
As for expectation setting, it sounds like we're wanting to provide helper text to the end-user so that they know what is acceptable and why. There are two approaches. We could add an additional sentence before or after validation fails OR we could simply strip out invalid characters and suggest that along with text explaining why. I don't have a specific recommendation of verbiage, but wanted to confirm if that is the issue that @cweagans is surfacing.
Updated the milestone to reflect when this might be appropriate to address. Of course, if we're blocked on upcoming runway, this can be cherry-picked and completed ahead of that.
another thing which is related and hit us few times already, is the uppercase project name like "Myproject".
This gave us headaches because in some places ddev used uppercase name and in some cases it lowercased the name.
@tmotyl I have a PR up for this in #1147, but it doesn't deal with your upper/lower question, as upper and lower case should be valid in hostnames and thus projectnames. Could you give an example of a problematic usage?
Randy, I dont have an exaple at hand unfortunatelly. I remember we have troubles with this some months ago. If i remember correctly in some places in yaml the upprecsse name was used.
Activity
rickmanelius commentedon Dec 12, 2017
Updating to reflect that I believe this is 100% actionable with no additional AC defined, but if @cweagans doesn't believe that to be the case we should kick back with an incubate label and get this more fleshed out.
andrew-c-tran commentedon Jan 10, 2018
The UI is currently using RFC 2396 Section 3.2.2 rules to validate project names.
Standard can be found:
https://tools.ietf.org/html/rfc2396
Regex in use is:
/^([a-zA-Z0-9]+(-[a-zA-Z0-9]+)*)+(\.([a-zA-Z0-9]+(-[a-zA-Z0-9]+)*))*$/cweagans commentedon Jan 10, 2018
I was looking at this again. Go has a built in way to validate URLs, but we also agreed that we were standardizing on "project" instead of "site". I'm assuming that's still the case, so what would you like to do here? Leave the messaging the same and just validate that whatever we get is a valid hostname?
rfay commentedon Jan 10, 2018
I edited the OP, let me know if that's clear enough @cweagans
[-]Validate sitename in "ddev config"[/-][+]Validate project name in "ddev config"[/+]cweagans commentedon Jan 10, 2018
@rfay I'm sorry, I'm not being clear.
If we're using project name instead of site name, it's not obvious that this input is going to be validated like a URL. As a user, how am I supposed to know what to enter here the first time? Yeah, the error message will correct me, but how can we make this clear the first time a user is going through this process?
rickmanelius commentedon Jan 10, 2018
Thanks, @rfay, for the clarification. I'm tracking and onboard. Basically, whatever is submitted as a project name + the additional .ddev.local (or whatever if we ultimately change that as per #416 should validate. Ideally the validation from the Go library matches what @andrew-c-tran is using on the front-end.
As for expectation setting, it sounds like we're wanting to provide helper text to the end-user so that they know what is acceptable and why. There are two approaches. We could add an additional sentence before or after validation fails OR we could simply strip out invalid characters and suggest that along with text explaining why. I don't have a specific recommendation of verbiage, but wanted to confirm if that is the issue that @cweagans is surfacing.
rickmanelius commentedon Jan 23, 2018
Updated the milestone to reflect when this might be appropriate to address. Of course, if we're blocked on upcoming runway, this can be cherry-picked and completed ahead of that.
tmotyl commentedon Feb 2, 2018
I've just stumbled upon this one too. The term "project name" is confusing.
Also documentation like http://ddev.readthedocs.io/en/latest/users/cli-usage/#typo3-quickstart is not specific enough "ddev config will prompt you for a project name, docroot, and project type."
rickmanelius commentedon Feb 5, 2018
Related is our standardization around standardizing around "project" over "app" and "site" #526
4 remaining items
tmotyl commentedon Aug 4, 2018
another thing which is related and hit us few times already, is the uppercase project name like "Myproject".
This gave us headaches because in some places ddev used uppercase name and in some cases it lowercased the name.
Validate the project name when it's entered, fixes ddev#514
rfay commentedon Sep 30, 2018
@tmotyl I have a PR up for this in #1147, but it doesn't deal with your upper/lower question, as upper and lower case should be valid in hostnames and thus projectnames. Could you give an example of a problematic usage?
tmotyl commentedon Oct 1, 2018
Randy, I dont have an exaple at hand unfortunatelly. I remember we have troubles with this some months ago. If i remember correctly in some places in yaml the upprecsse name was used.
rfay commentedon Oct 1, 2018
Thanks. I'll be looking for that. I don't think it's directly related to this one, but will keep my eyes open.
Validate the project name when it's entered, fixes ddev#514
Validate the project name when it's entered, fixes ddev#514
Validate the project name when it's entered, fixes ddev#514
Add valid project name note (ddev/ddev#514)
feat: experimental Apple Container support via socktainer, fixes ddev…
feat: experimental Apple Container support via socktainer, fixes ddev…
feat: experimental Apple Container support via socktainer, fixes ddev…