Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
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