You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2022/03/26 15:55:20 UTC
[GitHub] [netbeans] jgneff commented on pull request #3873: Save cause of download error for BuildException
jgneff commented on pull request #3873:
URL: https://github.com/apache/netbeans/pull/3873#issuecomment-1079721201
When the build fails to download an external binary because of an `IOException`, the root cause of the failure is always `null`. This pull request saves the exception so that it can be reported in the build error message.
### Before
Before this change, the error is reported with a `null` root cause as shown below:
```
[downloadbinaries] Could not download
EC27...6746-wordlist-en_GB-large-2017.08.24.zip to
/root/.hgexternalcache/EC27...6746-wordlist-en_GB-large-2017.08.24.zip:
/build/.../parts/netbeans/build/nbbuild/build.xml:276:
Could not download
EC27...6746-wordlist-en_GB-large-2017.08.24.zip from
https://netbeans.osuosl.org/binaries/: null
```
### After
After this change, the original `IOException` is printed as the root cause:
```
[downloadbinaries] Could not download
EC27...6746-wordlist-en_GB-large-2017.08.24.zip to
/root/.hgexternalcache/EC27...6746-wordlist-en_GB-large-2017.08.24.zip:
/build/.../parts/netbeans/build/nbbuild/build.xml:276:
Could not download
EC27...6746-wordlist-en_GB-large-2017.08.24.zip from
https://netbeans.osuosl.org/binaries/: java.io.IOException:
Skipping download from
https://netbeans.osuosl.org/binaries/EC27...6746-wordlist-en_GB-large-2017.08.24.zip
due to response code 503
```
Now I see that the HTTPS proxy server in my build environment is returning a response status code of [503 Service Unavailable][1] for this file:
> The 503 (Service Unavailable) status code indicates that the server is currently unable to handle the request due to a temporary overload or scheduled maintenance, which will likely be alleviated after some delay.
### Tests
I ran the unit tests for the NetBeans Ant task `downloadbinaries` as follows:
```console
$ ant -Dincludes=**/DownloadBinariesTest.class localtest
...
localtest:
[junit] Testsuite: org.netbeans.nbbuild.extlibs.DownloadBinariesTest
[junit] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.162 sec
[junit]
BUILD SUCCESSFUL
Total time: 1 second
```
[1]: https://datatracker.ietf.org/doc/html/rfc7231#section-6.6.4
--
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: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists