Copilot commented on code in PR #30013:
URL: https://github.com/apache/flink/pull/30013#discussion_r4693364141


##########
flink-python/src/main/java/org/apache/beam/sdk/fn/server/ServerFactory.java:
##########
@@ -158,7 +158,7 @@ public Server create(
         private static Server createServer(List<BindableService> services, 
InetSocketAddress socket)
                 throws IOException {
             NettyServerBuilder builder =
-                    NettyServerBuilder.forPort(socket.getPort())
+                    NettyServerBuilder.forAddress(socket)

Review Comment:
   The existing real-server tests in `PythonJobBundleFactoryTest` connect 
through the advertised URL, which also succeeds with wildcard binding, so they 
do not detect a regression in this hardening. Add regression tests that inspect 
the actual listening address for both default allocation and `create` with an 
explicit loopback address, asserting that the requested address is honored 
rather than a wildcard. These tests should fail with `forPort` and pass with 
`forAddress`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to