Add proxyless endpoint support - #2314
Conversation
|
Can you make a playground example with this feature? |
| { | ||
| ea.UriScheme = "http"; | ||
| ea.Port = 12345; | ||
| ea.IsProxied = false; |
There was a problem hiding this comment.
Is this the only way to use it? Can you set it using the other WithEndpoint overloads?
There was a problem hiding this comment.
The other WithEndpoint overloads are a mess, bunch of default parameters. To use it with an existing one you need to do:
ApiService.Resource.Annotations.OfType<EndpointAnnotation>().First().IsProxied = false;
There was a problem hiding this comment.
Can we add more the optional parameter to the base overload?
| builder.AddProject<Projects.ProxylessEndToEnd_ApiService>("api") | ||
| .WithEndpoint("http", ea => | ||
| { | ||
| ea.UriScheme = "http"; |
There was a problem hiding this comment.
Is this required?
There was a problem hiding this comment.
Yes. We do "magic" today in the other WithEndpoint overload where the name is also the scheme.
|
A couple of questions:
|
Since I'm not an expert here I can't say for sure, but referencing a proxyless endpoint from another project works so far.
Throws for missing port. Containers aren't proxied so the flag does nothing I think? Will have to verify behavior here.
Yes, that's needed for |
This is what matters. We just need to make sure that calling WithReference continues to work and that URLs show up in the dashboard.
Containers are proxied by default. We have 3 ports:
My assumption is that when you say IsProxied=false, for a container, should throw and force you to specify a host port.
Excellent. Can you add a container with a proxyless port in your playground sample. |
Karol Zadora-Przylecki (karolz-ms)
left a comment
There was a problem hiding this comment.
ApplicationExecutor changes look good
| } | ||
| } | ||
|
|
||
| [LocalOnlyFact("docker")] |
There was a problem hiding this comment.
Do you have any tests that use the new APIs?
There was a problem hiding this comment.
e880c47 to
219b72a
Compare
Closes #1637
Microsoft Reviewers: Open in CodeFlow