cli
cli copied to clipboard
Suggested site names may have illegal-length domains
Describe the bug
The pattern used for generating default site names can lead to it generating domains that cannot be resolved as they are too long. According to RFC 1035, a label may be up to 63 characters long. The longest template is netlify-thinks-${slug}-is-great${suffix}, where suffix is six characters and slug is the slugified username, so can be arbitrarily long. When generating a deploy preview, a 24 character hash is prepended. This means that any username that is over 6 characters will lead to a domain that is too long.
Related: #4630
Steps to reproduce
- generate a site using
ntl sites:create - choose the default site name
- run
ntl deploy - observe length of domain, and see that it won't resolve
Configuration
No response
Environment
System:
OS: macOS 11.6.4
CPU: (8) arm64 Apple M1
Memory: 74.05 MB / 8.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 16.14.2 - ~/.nvm/versions/node/v16.14.2/bin/node
Yarn: 1.22.15 - ~/.nvm/versions/node/v16.14.2/bin/yarn
npm: 8.5.0 - ~/.nvm/versions/node/v16.14.2/bin/npm
Watchman: 2021.06.07.00 - /opt/homebrew/bin/watchman
npmGlobalPackages:
netlify-cli: 10.3.1
Cross-linking these as they are related issues:
https://github.com/netlify/product/issues/743 https://github.com/netlify/bitballoon/issues/5996
@ascorbic Is there some public dependency which Netlify uses for its standard site name pattern as mentioned in https://github.com/netlify/cli/issues/4630 ?
If yes, I can pick https://github.com/netlify/cli/issues/4630 & this issue up.
Related issue: https://github.com/netlify/cli/issues/4503
There is also a PR for this (or at least parts) already: https://github.com/netlify/cli/pull/4553
@danez that's related, but different. This issue is about auto-generated names, rather than user-specified ones