MicrosoftPremier / VstsExtensions

Documentation and issue tracking for Microsoft Premier Services Visual Studio Team Services Extensions
MIT License
57 stars 14 forks source link

Warnings policy results in error indicating previous build steps did not finish within the wait time #29

Closed josephgilland closed 5 years ago

josephgilland commented 5 years ago

A Visual Studio Build task followed by a Build Quality Checks task (v5.2.1 in Azure DevOps) with only the warning policy enabled (fixed threshold, 10 warnings, show warning statistics is on, and all other default values) results in the following output:

2019-02-14T16:04:26.4071471Z - Build solution MySolution.sln
2019-02-14T16:04:26.4090667Z Waiting for previous tasks to upload information...
2019-02-14T16:04:31.4681719Z - Build solution MySolution.sln
2019-02-14T16:04:31.4682091Z Waiting for previous tasks to upload information...
2019-02-14T16:04:36.5324058Z - Build solution MySolution.sln
2019-02-14T16:04:36.5324726Z Waiting for previous tasks to upload information...
2019-02-14T16:04:41.6238997Z - Build solution MySolution.sln
2019-02-14T16:04:41.6239202Z Waiting for previous tasks to upload information...
2019-02-14T16:04:46.7146319Z - Build solution MySolution.sln
2019-02-14T16:04:46.7147491Z Waiting for previous tasks to upload information...
2019-02-14T16:04:51.7830337Z - Build solution MySolution.sln
2019-02-14T16:04:51.7830769Z Waiting for previous tasks to upload information...
2019-02-14T16:04:56.8928572Z - Build solution MySolution.sln
2019-02-14T16:04:56.8930168Z Waiting for previous tasks to upload information...
2019-02-14T16:05:01.9515096Z - Build solution MySolution.sln
2019-02-14T16:05:01.9515582Z Waiting for previous tasks to upload information...
2019-02-14T16:05:07.0157887Z - Build solution MySolution.sln
2019-02-14T16:05:07.0158739Z Waiting for previous tasks to upload information...
2019-02-14T16:05:12.0790987Z - Build solution MySolution.sln
2019-02-14T16:05:12.0791720Z Waiting for previous tasks to upload information...
2019-02-14T16:05:17.1667377Z - Build solution MySolution.sln
2019-02-14T16:05:17.1745898Z Waiting for previous tasks to upload information...
2019-02-14T16:05:22.2277770Z - Build solution MySolution.sln
2019-02-14T16:05:22.2278185Z Waiting for previous tasks to upload information...
2019-02-14T16:05:27.3027387Z - Build solution MySolution.sln
2019-02-14T16:05:27.3027953Z Waiting for previous tasks to upload information...
2019-02-14T16:05:32.3746031Z - Build solution MySolution.sln
2019-02-14T16:05:32.3746504Z Waiting for previous tasks to upload information...
2019-02-14T16:05:37.4352850Z - Build solution MySolution.sln
2019-02-14T16:05:37.4353636Z Waiting for previous tasks to upload information...
2019-02-14T16:05:42.5025599Z - Build solution MySolution.sln
2019-02-14T16:05:42.5026068Z Waiting for previous tasks to upload information...
2019-02-14T16:05:47.5632739Z - Build solution MySolution.sln
2019-02-14T16:05:47.5633669Z Waiting for previous tasks to upload information...
2019-02-14T16:05:52.6396763Z - Build solution MySolution.sln
2019-02-14T16:05:52.6397001Z Waiting for previous tasks to upload information...
2019-02-14T16:05:57.7053453Z - Build solution MySolution.sln
2019-02-14T16:05:57.7054087Z Waiting for previous tasks to upload information...
2019-02-14T16:06:02.7665705Z - Build solution MySolution.sln
2019-02-14T16:06:02.7665894Z Waiting for previous tasks to upload information...
2019-02-14T16:06:07.8936935Z - Build solution MySolution.sln
2019-02-14T16:06:07.8937662Z Waiting for previous tasks to upload information...
2019-02-14T16:06:12.9622763Z - Build solution MySolution.sln
2019-02-14T16:06:12.9623324Z Waiting for previous tasks to upload information...
2019-02-14T16:06:18.0310591Z - Build solution MySolution.sln
2019-02-14T16:06:18.0311299Z Waiting for previous tasks to upload information...
2019-02-14T16:06:21.3399650Z Previous build steps did not finish within the maximum wait time.
2019-02-14T16:06:21.3457285Z ##[error]At least one build quality policy was violated. See Build Quality Checks section for more details.

The build task was successful. Am I missing an intermittent task that might be needed?

ReneSchumacher commented 5 years ago

Hi Joseph,

could you please turn off warning statistics and check if the timeout is gone? The root cause for this should be that it takes longer for your build to fully upload the log information to Azure DevOps. Our task needs the log infomration in order to calculate the warning statistics, but it only waits for two minutes before giving up. By turning off the statistics, we can check if there might be an additional issue.

If the task works with warning statistics disabled, please enable statistics again and set the variable PSGer.Build.MaxWaitTime to 300000 (= five minutes) and the variable PSGer.Build.PollInterval to 10000 (= ten seconds). This reduces the amount of polling from every five seconds (default) to every ten seconds and allows up to five minutes for the log data to be uploaded to and processed by Azure DevOps.

Let me know if that helps. If not, please run the build again with the variable System.Debug set to true and send the log file to our support email address PSGerExtSupport@microsoft.com.

René

josephgilland commented 5 years ago

Thanks for the response! Neither turning off warning statistics nor increasing the wait time and poll interval worked. There are a very large number of warnings in this build, but it seems odd it would take that long to get uploaded. I've emailed the requested log file to the support address indicated.

josephgilland commented 5 years ago

Received email support. It turns out that each warning is possibly sent individually to Azure DevOps backend. Tasks with a very large number of build warnings can take several minutes to finalize, requiring a larger PSGer.Build.MaxWaitTime variable to be set. After setting a larger value, the task was able to complete. We'll likely revisit this task once we are able to cleanup more warnings. Thanks for the support!