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

Support application name with '.' #873

Open
vdice opened this issue Jun 13, 2022 · 2 comments
Open

Support application name with '.' #873

vdice opened this issue Jun 13, 2022 · 2 comments
Labels
API Issues or pull requests that affect the API enhancement New feature or request

Comments

@vdice
Copy link
Member

vdice commented Jun 13, 2022

I have a Spin app with the name configured to example.com. When I attempt to deploy to Hippo, I am greeted with the following:

$ cat spin.toml | head -n1
name = "example.com"

$ spin deploy
Error: Error creating Hippo app called example.com: One or more validation errors occurred. {"Name": ["'Name' is not in the correct format."]}

Would it be possible to add support in Hippo for application names that include a '.' character?

Note: tested with spin 0.2.0 (60907c4 2022-06-10) and Hippo v0.15.1

@bacongobbler
Copy link
Contributor

bacongobbler commented Jun 13, 2022

Yes. The only thing we want to ensure nothing breaks is with regards to the default domain. In Hippo, if a Channel is created with no domain name, the default domain name is channel_name.app_name.platform_domain. If you created an app with the name example.com with a platform domain of hippo.local.fermyon.link, then you could end up with a domain called staging.example.com.hippo.local.fermyon.link. Is that acceptable, or do we need to perform some santization?

Here's where the validation occurs:

private readonly Regex validName = new Regex("^[a-zA-Z0-9-_]*$");

@bacongobbler bacongobbler added enhancement New feature or request API Issues or pull requests that affect the API labels Jun 13, 2022
@bacongobbler
Copy link
Contributor

Perhaps a more realistic name could be fermyon.dev. An app with a “canary” channel could have the domain canary.fermyon.dev.fermyon.dev.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Issues or pull requests that affect the API enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants