chocolatey / package-validator

Windows service to validate packages conform to package standards
Apache License 2.0
31 stars 29 forks source link

Valid URL's are being flagged as invalid due to timeouts #221

Closed pauby closed 4 years ago

pauby commented 4 years ago

The package https://chocolatey.org/packages/alt-tab-terminator/4.1 was being flagged as having invalid URL's for the following fields:

As a consequence the Validator rejected the package.

A previous version of this package was submitted on 14 January and passed without issue. As this is an automatically updated package it hasn't changed.

Digging into the validator logs this is what was shown for failing the package.

2020-01-22 00:44:49,372 25 [INFO ] - ========== alt-tab-terminator v4.1 ==========
2020-01-22 00:44:49,372 25 [INFO ] - Alt-Tab Terminator (Install) v4.1 found for review.
2020-01-22 00:44:49,372 25 [INFO ] - Validating Package: alt-tab-terminator Version: 4.1
2020-01-22 00:44:49,560 25 [INFO ] - Running validation rules...
2020-01-22 00:45:04,747 25 [WARN ] - Error validating Url https://www.ntwind.com/blog - The operation has timed out
2020-01-22 00:45:19,950 25 [WARN ] - Error validating Url https://www.ntwind.com/tutorials.html - The operation has timed out
2020-01-22 00:45:44,200 25 [WARN ] - Error validating Url https://www.ntwind.com/software/alttabter.html - The operation has timed out
2020-01-22 00:45:44,247 25 [INFO ] - alt-tab-terminator v4.1 FAILED validation.
2020-01-22 00:45:44,262 25 [INFO ] - Updating website for alt-tab-terminator v4.1 with results (package failed requirements).
2020-01-22 00:46:14,434 25 [WARN ] - chocolatey-package-validator had an error on <MACHINE NAME> (with user <USER NAME>):
System.Net.WebException: The operation has timed out
   at System.Net.HttpWebRequest.GetResponse()
   at NuGet.RequestHelper.GetResponse()
   at chocolatey.package.validator.infrastructure.app.services.NuGetService.ensure_successful_response(HttpClient client, Nullable`1 expectedStatusCode) in c:\code\package-validator\src\chocolatey.package.validator\infrastructure.app\services\NuGetService.cs:line 86

There should be a mechanism to handle timeouts.

gep13 commented 4 years ago

Another package that is having this problem is this package:

https://chocolatey.org/packages/spacedesk-server/0.9.32

Whose bugTrackerUrl (https://forum.spacedesk.ph/community/) causes a Timeout error to occur when going through validation.

Currently the timeout for URL validation is 15 seconds. I am planning on increasing this to 30.