Skip to content

Validate endpoint names - #1712

Merged
James Newton-King (JamesNK) merged 3 commits into
mainfrom
jamesnk/validate-all-names
Jan 22, 2024
Merged

James Newton-King (JamesNK) merged 3 commits into
mainfrom
jamesnk/validate-all-names

Conversation

@JamesNK

@JamesNK James Newton-King (JamesNK) commented Jan 19, 2024 •

Copy link
Copy Markdown
Member

Follow up to #1691

Is anything else that has a name that should be validated? env vars are connection strings can both map to real world configuration so I left them out.

Microsoft Reviewers: Open in CodeFlow

@ghost ghost added the area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication label Jan 19, 2024
@davidfowl

Copy link
Copy Markdown
Collaborator

I'm so worried about this change. It's going to break so many existing applications. Did we validate that new projects will be fine for any project name?

@JamesNK

Copy link
Copy Markdown
Member Author

I'm so worried about this change. It's going to break so many existing applications. Did we validate that new projects will be fine for any project name?

What are some common examples of apps breaking?

The default name for endpoints is the scheme (http/https) so they're not impacted. And specified names will mostly be alpha numeric. The most common cause of failure would be underscores but they can be replaced with hyphens. Changing names to be valid should be pretty simple.

@davidfowl

Copy link
Copy Markdown
Collaborator

James Newton-King (@JamesNK) every app that uses dots in the resource names. After this change, we should update eshop and all of our samples (do we have a preview3 branch yet?).

@JamesNK

Copy link
Copy Markdown
Member Author

@davidfowl

Copy link
Copy Markdown
Collaborator

Lots of people are using . as separators, so we'll tell them to use - hopefully in the error message 😄

@JamesNK

James Newton-King (JamesNK) commented Jan 22, 2024 •

Copy link
Copy Markdown
Member Author

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-app-model Issues pertaining to the APIs in Aspire.Hosting, e.g. DistributedApplication

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants