standardize regex and messaging for names #2003
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reference Issues or PRs
Fixes #1813
What does this implement/fix?
Put a
x
in the boxes that applyTesting
Any other comments?
This splits out the namespace and project name validations into two separate regexes in code since the docs and messaging already imply there are different requirements.
I checked 'breaking change' because this technically DOES restrict project name to 32 characters where it wasn't before. I think anything longer likely won't deploy successfully somewhere down the line because some resources have smaller name requirements, but the documentation and messages previously put a 16 char limit on project names that wasn't actually enforced. But I have no concerns with removing that restriction as well in a follow-up commit if preferable.
Note that I had originally planned to restrict the project name further and/or address other, related bugs around project names (escaping doesn't work in AWS, some other characters such as underscores in project names do not work in practice) but there are other knock-on effects of making these changes so instead I created two new bugs #2001 and #2002 to track.