Skip to content

Commit 0a8a666

Browse files
Copilotdevstress
andcommitted
Simplify JobGateway port configuration by setting default to 8080
Changed JobGateway's default port to 8080 in launchSettings.json instead of using ASPNETCORE_URLS environment variable. This is cleaner and works for both LocalTesting and LearningCourse modes without conditional configuration. Removed conditional ASPNETCORE_URLS logic from AppHost - no longer needed. Co-authored-by: devstress <[email protected]>
1 parent ede0856 commit 0a8a666

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

FlinkDotNet/FlinkDotNet.JobGateway/Properties/launchSettings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"environmentVariables": {
77
"ASPNETCORE_ENVIRONMENT": "Development"
88
},
9-
"applicationUrl": "http://localhost:61388"
9+
"applicationUrl": "http://localhost:8080"
1010
}
1111
}
1212
}

LocalTesting/LocalTesting.FlinkSqlAppHost/Program.cs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -355,18 +355,10 @@
355355
// Flink.JobGateway - Add Flink Job Gateway as .NET project
356356
// CRITICAL: Using .AddProject() for proper Aspire service discovery and endpoint management
357357
// JobGateway runs as a host process (not containerized) for reliable endpoint discovery
358+
// Note: JobGateway has default port 8080 in launchSettings.json, no need to set ASPNETCORE_URLS
358359
#pragma warning disable S1481 // Gateway resource is created but not directly referenced - used via Aspire orchestration
359360
var gateway = builder.AddProject<Projects.FlinkDotNet_JobGateway>("flink-job-gateway")
360-
.WithHttpEndpoint(port: 8080, name: "gateway-http");
361-
362-
// ASPNETCORE_URLS should only be set in LocalTesting mode (not LearningCourse)
363-
// In LearningCourse mode, Aspire's service discovery mechanism manages the port binding
364-
if (!isLearningCourse)
365-
{
366-
gateway = gateway.WithEnvironment("ASPNETCORE_URLS", "http://localhost:8080");
367-
}
368-
369-
gateway = gateway
361+
.WithHttpEndpoint(port: 8080, name: "gateway-http")
370362
.WithEnvironment("FLINK_CONNECTOR_PATH", connectorsDir)
371363
.WithEnvironment("FLINK_RUNNER_JAR_PATH", gatewayJarPath)
372364
.WithEnvironment("LOG_FILE_PATH", testLogsDir)

0 commit comments

Comments
 (0)