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

standardize regex and messaging for names #2003

Merged
merged 5 commits into from
Sep 14, 2023

Conversation

kenafoster
Copy link
Contributor

Reference Issues or PRs

Fixes #1813

What does this implement/fix?

Put a x in the boxes that apply

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds a feature)
  • Breaking change (fix or feature that would cause existing features not to work as expected)
  • Documentation Update
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no API changes)
  • Build related changes
  • Other (please describe):

Testing

  • [X ] Did you test the pull request locally?
  • Did you add new tests?

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.

src/nebari/schema.py Outdated Show resolved Hide resolved
src/_nebari/subcommands/init.py Outdated Show resolved Hide resolved
Copy link
Member

@iameskild iameskild left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for working on this @kenafoster and @sblair-metrostar!

@iameskild iameskild merged commit d48b38e into nebari-dev:develop Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

[BUG] - project name validation
3 participants