Skip to content

Use default host and port for lambdaconfig if routeconfig endpoint is not specified #1941

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

Merged
1 commit merged into from
Jan 28, 2025

Conversation

ghost
Copy link

@ghost ghost commented Jan 24, 2025

Issue #, if available: DOTNET-7934

Description of changes:

  • Use default host and port for lambdaconfig if routeconfig endpoint is not specified.
  • Add integration test to verify default host and port is picked up

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

{
// TODO: Handle routeConfig.Endpoint to null and use the settings versions of runtime.
var endpoint = routeConfig.Endpoint ?? $"http://{settings.Host}:{settings.Port}";
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am assuming to use http here, since settings.Host is only defined as localhost

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we rename Port to LambdaEmulatorPort to avoid future ambiguous confusions.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure. same thing with host then too? LambdaEmulatorHost?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, those names made sense when there was only a single web process.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i updated in latest version to update the variable names and similar

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like i need to rebase with your changes. so i will do that now

@ghost ghost added the Release Not Needed Add this label if a PR does not need to be released. label Jan 24, 2025
@ghost ghost marked this pull request as ready for review January 24, 2025 18:58
@ghost ghost requested review from philasmar and normj January 24, 2025 18:59
@ghost ghost force-pushed the gcbeatty/routeconfignull branch from 2938b9a to 0cea399 Compare January 27, 2025 18:54
@ghost ghost force-pushed the gcbeatty/routeconfignull branch from 0cea399 to 9fdd63e Compare January 27, 2025 21:55
@@ -97,7 +96,6 @@ public async Task TestLambdaToUpperRest()
finally
{
await cancellationTokenSource.CancelAsync();
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is already callled in DisposeAsync which is why i removed it here

@ghost
Copy link
Author

ghost commented Jan 27, 2025

latest update has rebased changes. but the existing tests (along with the new one) is still flaky. i will take a deeper look to see if i can figure out whats going on and possibly update in this PR

@ghost ghost merged commit 6b857ec into feature/lambdatesttool-v2 Jan 28, 2025
3 of 5 checks passed
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Release Not Needed Add this label if a PR does not need to be released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants