You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2021/04/19 15:00:54 UTC

[GitHub] [maven-integration-testing] mthmulders opened a new pull request #107: Use the loopback address for connecting to an in-process web server

mthmulders opened a new pull request #107:
URL: https://github.com/apache/maven-integration-testing/pull/107


   This may resolve the connection issues we sometimes see in GitHub
   Actions, where the Maven process that is being tested cannot connect
   to the Jetty server that was just started.


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-integration-testing] michael-o commented on pull request #107: [GitHub CI] Use the loopback address for connecting to an in-process web server

Posted by GitBox <gi...@apache.org>.
michael-o commented on pull request #107:
URL: https://github.com/apache/maven-integration-testing/pull/107#issuecomment-822708090


   > 
   > 
   > > Please note that some ITs explicitly require a non-localhost hostname to perform property. Did you verify that?
   > 
   > I didn't know that, so thanks for asking. I checked all three cases, and can't find any evidence in the code or in the JIRA tickets that it's crucially important to connect to a **remote** host. So in all honesty, I don't know...
   
   When the name says `MavenITmng4991NonProxyHostsTest.java` one should be vigilant.


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-integration-testing] mthmulders commented on pull request #107: [GitHub CI] Use the loopback address for connecting to an in-process web server

Posted by GitBox <gi...@apache.org>.
mthmulders commented on pull request #107:
URL: https://github.com/apache/maven-integration-testing/pull/107#issuecomment-822748742


   > If you can wait a few days, I will have a look at the test.
   
   I'd appreciate it. Those actions aren't our final quality gate, and they're already red for some time I believe. Those extra days won't hurt - modifying a test and unknowingly making it test the opposite would definitely hurt.


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-integration-testing] michael-o commented on pull request #107: [GitHub CI] Use the loopback address for connecting to an in-process web server

Posted by GitBox <gi...@apache.org>.
michael-o commented on pull request #107:
URL: https://github.com/apache/maven-integration-testing/pull/107#issuecomment-826140003






-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-integration-testing] michael-o commented on pull request #107: [GitHub CI] Use the loopback address for connecting to an in-process web server

Posted by GitBox <gi...@apache.org>.
michael-o commented on pull request #107:
URL: https://github.com/apache/maven-integration-testing/pull/107#issuecomment-826140003


   Looking into this today...


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-integration-testing] michael-o commented on pull request #107: [GitHub CI] Use the loopback address for connecting to an in-process web server

Posted by GitBox <gi...@apache.org>.
michael-o commented on pull request #107:
URL: https://github.com/apache/maven-integration-testing/pull/107#issuecomment-822565296


   > 
   > 
   > > Isn't `getLoopbackAddress()` suficient?
   > 
   > That returns an `InetAddress`, but `setProperty` expects a `String` as the second argument...
   
   Ah, thanks!


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-integration-testing] michael-o commented on pull request #107: [GitHub CI] Use the loopback address for connecting to an in-process web server

Posted by GitBox <gi...@apache.org>.
michael-o commented on pull request #107:
URL: https://github.com/apache/maven-integration-testing/pull/107#issuecomment-826146277


   Tested, I think this change is fine.


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-integration-testing] mthmulders commented on pull request #107: [GitHub CI] Use the loopback address for connecting to an in-process web server

Posted by GitBox <gi...@apache.org>.
mthmulders commented on pull request #107:
URL: https://github.com/apache/maven-integration-testing/pull/107#issuecomment-822739744


   > When the name says `MavenITmng4991NonProxyHostsTest.java` one should be vigilant.
   
   I appreciate your vigilance. This is the relevant part of the settings-template.xml for MNG-4991:
   
   ```xml
   <mirrors>
     <mirror>
       <id>central</id>
       <!-- NOTE: We need to try and use the proper host name/ip as Java generally ignores proxies for "localhost" -->
       <url>http://@localhost@:@port@/</url>
       <mirrorOf>central</mirrorOf>
     </mirror>
   </mirrors>
   <proxies>
     <proxy>
       <active>true</active>
       <protocol>http</protocol>
       <host>localhost</host>
       <port>@proxyPort@</port>
       <nonProxyHosts>@localhost@</nonProxyHosts>
     </proxy>
   </proxies>
   ```
   
   Quoting from [MNG-4991](https://issues.apache.org/jira/browse/MNG-4991):
   
   > each repository will be configured with a proxy, even if the related host is excluded via the `<nonProxyHosts />` tag in the settings.xml.
   
   This suggests that the test wants to prove that Maven will **not** use the proxy. Next, looking at the Java code, I see:
   - the test spins up a proxy (that will in fact not proxy anything, as the `DefaultHandler` always returns 404)
   - the test spins up another Jetty instance, that will return an artifact
   - the test builds a small Maven project and verifies the artifact is indeed resolved. If it is resolved, that would be because the proxy is bypassed, QED. If Maven would've used the proxy, it would've seen HTTP 404 and the artifact would not have been resolved.
   
   But with all this, I still don't know if it matters where the server and the repository live. That tiny line of comment suggests
   
   > Java generally ignores proxies for "localhost"
   
   That's something I've never heard of before. It may be true, I don't know. But the "generally" is not quite convincing me here. The [Java Networking and Proxies](https://docs.oracle.com/javase/8/docs/technotes/guides/net/proxies.html) doesn't support that statement - in fact, it even gives an example with `-Dhttp.nonProxyHosts="localhost|host.example.com"`. Why would they do that if Java indeed ignores proxies for localhost?
   
   So, with all that vigilance, I still don't know whether it matters or not...


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-integration-testing] michael-o commented on pull request #107: [GitHub CI] Use the loopback address for connecting to an in-process web server

Posted by GitBox <gi...@apache.org>.
michael-o commented on pull request #107:
URL: https://github.com/apache/maven-integration-testing/pull/107#issuecomment-822742965


   If you can wait a few days, I will have a look at the test.


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-integration-testing] mthmulders commented on pull request #107: [GitHub CI] Use the loopback address for connecting to an in-process web server

Posted by GitBox <gi...@apache.org>.
mthmulders commented on pull request #107:
URL: https://github.com/apache/maven-integration-testing/pull/107#issuecomment-822553458


   > Isn't `getLoopbackAddress()` suficient?
   
   That returns an `InetAddress`, but `setProperty` expects a `String` as the second argument...


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-integration-testing] mthmulders commented on pull request #107: [GitHub CI] Use the loopback address for connecting to an in-process web server

Posted by GitBox <gi...@apache.org>.
mthmulders commented on pull request #107:
URL: https://github.com/apache/maven-integration-testing/pull/107#issuecomment-826294054


   Thank you for your efforts, @michael-o.


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-integration-testing] mthmulders commented on pull request #107: [GitHub CI] Use the loopback address for connecting to an in-process web server

Posted by GitBox <gi...@apache.org>.
mthmulders commented on pull request #107:
URL: https://github.com/apache/maven-integration-testing/pull/107#issuecomment-826294054


   Thank you for your efforts, @michael-o.


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-integration-testing] asfgit closed pull request #107: [GitHub CI] Use the loopback address for connecting to an in-process web server

Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #107:
URL: https://github.com/apache/maven-integration-testing/pull/107


   


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-integration-testing] asfgit closed pull request #107: [GitHub CI] Use the loopback address for connecting to an in-process web server

Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #107:
URL: https://github.com/apache/maven-integration-testing/pull/107


   


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven-integration-testing] mthmulders commented on pull request #107: [GitHub CI] Use the loopback address for connecting to an in-process web server

Posted by GitBox <gi...@apache.org>.
mthmulders commented on pull request #107:
URL: https://github.com/apache/maven-integration-testing/pull/107#issuecomment-822675806


   > Please note that some ITs explicitly require a non-localhost hostname to perform property. Did you verify that?
   
   I didn't know that, so thanks for asking. I checked all three cases, and can't find any evidence in the code or in the JIRA tickets that it's crucially important to connect to a **remote** host. So in all honesty, I don't know...


-- 
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org