Closed anoyo-lin closed 4 years ago
I believe you are setting the incorrect timeout value. I ran into the same issue today and solved by setting the read timeout. The required changes are attached and allow you to set the read and connection timeout in your pipeline.
I believe you are setting the incorrect timeout value. I ran into the same issue today and solved by setting the read timeout. The required changes are attached and allow you to set the read and connection timeout in your pipeline.
thx, tvanhill your solution is more canonical approach to update a jenkins plugins, i will test it next week, thank you very much.
I would also like to add a condition on Integer parsing, what if the variable can't be parsed (the env var is set to a letter and not a digit, what if it's negative, etc). The simple check here does not seem sufficient. I would also like to hear back about the read timeout instead of the connect timeout. And finally, I think we should not be using env variables at all, but have a UI/config parameter letting users to select the number of seconds for the timeout and put the validations there instead of the model logic.
The code provided in the previously attached fortifyjenkins.zip file added the read and connect timeouts as UI/config parameters. I did not attempt to perform validation on these inputs as I did not find (albeit in a very limited search) where this validation should be performed based on the existing code.
@tvanhill Can you do an official pull request with your code? Or perhaps provide your source code so someone else can submit a PR?
Thanks.
Hi @anoyo-lin, thank you for your pull request! The issue has been fixed in a new Fortify Jenkins plugin release v20.2.34. Please, check it out. Closing the pull request at this time.
due to the jave socket timeout issue 13:17:36 com.fortify.ssc.restclient.ApiException: java.net.SocketTimeoutException: timeout 13:17:36 at com.fortify.ssc.restclient.ApiClient.execute(ApiClient.java:846) 13:17:36 at com.fortify.ssc.restclient.api.ArtifactOfProjectVersionControllerApi.uploadArtifactOfProjectVersionWithHttpInfo(ArtifactOfProjectVersionControllerApi.java:314) 13:17:36 at com.fortify.ssc.restclient.api.ArtifactOfProjectVersionControllerApi.uploadArtifactOfProjectVersion(ArtifactOfProjectVersionControllerApi.java:298) 13:17:36 at com.fortify.plugin.jenkins.fortifyclient.ApiClientWrapper.uploadFpr(ApiClientWrapper.java:498) 13:17:36 at com.fortify.plugin.jenkins.fortifyclient.FortifyClient.uploadFPR(FortifyClient.java:155)