Skip to content

Avoid adding non-HTTP URLs to ASPNETCORE_URLS during launch#2239

Merged
ReubenBond merged 2 commits intomainfrom
rebond/fix-non-http-uris-in-ASPNETCORE_URLS
Feb 15, 2024
Merged

Avoid adding non-HTTP URLs to ASPNETCORE_URLS during launch#2239
ReubenBond merged 2 commits intomainfrom
rebond/fix-non-http-uris-in-ASPNETCORE_URLS

Conversation

@ReubenBond
Copy link
Copy Markdown
Member

@ReubenBond ReubenBond commented Feb 15, 2024

Currently, all endpoint annotations are contributing to ASPNETCORE_URLS. I believe we should not be adding "tcp://" endpoints there. This currently blows up Kestrel when trying to get Aspire to allocate ports for an Orleans silo, for example.

There is precedent for the filtering added by this PR here: https://github.com/dotnet/aspire/blob/5f19c77227ccb5637960b07d8a7e4b7257a6a013/src/Aspire.Hosting/Dcp/ApplicationExecutor.cs#L579

Microsoft Reviewers: Open in CodeFlow

@ghost ghost added the area-engineering-systems infrastructure helix infra engineering repo stuff label Feb 15, 2024
@JamesNK
Copy link
Copy Markdown
Member

JamesNK commented Feb 15, 2024

What's the difference between endpoints and services? I thought endpoints were always http/https and services contained other connection types.

@ReubenBond ReubenBond force-pushed the rebond/fix-non-http-uris-in-ASPNETCORE_URLS branch from d7cd7a0 to 543b5d7 Compare February 15, 2024 02:17
@ReubenBond
Copy link
Copy Markdown
Member Author

I don't see a service annotation in the app model, but there's one (well, one consumer, one producer) in the DCP model.

I updated the PR to skip the endpoint if either:

  • The UriScheme is not "http" or "https"
  • The EnvironmentVariable property is set

@mitchdenny
Copy link
Copy Markdown
Member

What's the difference between endpoints and services? I thought endpoints were always http/https and services contained other connection types.

Endpoints cover all kinds of network endpoints, not just HTTP/HTTPS.

@ReubenBond ReubenBond enabled auto-merge (squash) February 15, 2024 03:13
@ReubenBond ReubenBond merged commit f63f1e9 into main Feb 15, 2024
@ReubenBond ReubenBond deleted the rebond/fix-non-http-uris-in-ASPNETCORE_URLS branch February 15, 2024 03:23
@github-actions github-actions bot locked and limited conversation to collaborators Apr 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-engineering-systems infrastructure helix infra engineering repo stuff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants