MicrosoftPremier / VstsExtensions

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

Fails from zero warnings ##[error]Unhandled: undefined #66

Closed madurh closed 4 years ago

madurh commented 4 years ago

We have a "Check build quality" task set up to treat warnings as errors and fail the pipeline on errors. But there are no warnings in the log from the previous build task and "Check build quality" is failing with the error message "##[error]Unhandled: undefined"

I noticed that the previous build was run from the exact same Git commit on the same day, but that the "Check build quality" task was upgrade from 6.1.2 (passed) to 6.2.0 (failed)

What in our pipeline could be causing this? Is there a workaround or a fix for this?

Thanks.

The Task:

steps:
- task: mspremier.BuildQualityChecks.QualityChecks-task.BuildQualityChecks@6
  displayName: 'Check build quality'
  inputs:
    checkWarnings: true
    warningFailOption: fixed
    warningTaskFilters: '/^(((android|xcode|gradlew)\s+)?build|ant|maven|cmake|gulp)/i'

The Error Log:

2020-01-13T21:23:39.4600084Z ##[section]Starting: Check build quality
2020-01-13T21:23:39.4606767Z ==============================================================================
2020-01-13T21:23:39.4606835Z Task         : Build Quality Checks
2020-01-13T21:23:39.4606870Z Description  : Breaks a build based on quality metrics like number of warnings or code coverage.
2020-01-13T21:23:39.4606946Z Version      : 6.2.0
2020-01-13T21:23:39.4606981Z Author       : Microsoft Premier Services
2020-01-13T21:23:39.4607015Z Help         : [[Docs]](https://github.com/MicrosoftPremier/VstsExtensions/blob/master/BuildQualityChecks/en-US/overview.md)
2020-01-13T21:23:39.4607067Z ==============================================================================
2020-01-13T21:23:40.0860461Z SystemVssConnection exists true
2020-01-13T21:23:40.4750924Z Using IdentifierJobResolver
2020-01-13T21:23:40.6379262Z Validating build warnings policy...
2020-01-13T21:23:40.7897154Z Counting warnings from tasks:
2020-01-13T21:23:40.7897483Z - Build Project
2020-01-13T21:23:56.7582763Z ##[error]Unhandled: undefined
2020-01-13T21:23:58.0885717Z -   Total warnings: 0, Filtered warnings: 0
2020-01-13T21:23:58.0886065Z Total warnings: 0
2020-01-13T21:23:58.0886884Z Filtered warnings: 0
2020-01-13T21:23:58.0953257Z [SUCCESS] Warnings policy passed with 0 warning(s).
2020-01-13T21:23:58.2440353Z ##[section]Finishing: Check build quality

The Successful Log from earlier, no errors:

2020-01-13T13:32:17.9489894Z ##[section]Starting: Check build quality
2020-01-13T13:32:17.9496512Z ==============================================================================
2020-01-13T13:32:17.9496585Z Task         : Build Quality Checks
2020-01-13T13:32:17.9496813Z Description  : Breaks a build based on quality metrics like number of warnings or code coverage.
2020-01-13T13:32:17.9496866Z Version      : 6.1.2
2020-01-13T13:32:17.9496900Z Author       : Microsoft Premier Services
2020-01-13T13:32:17.9496934Z Help         : [[Docs]](https://github.com/MicrosoftPremier/VstsExtensions/blob/master/BuildQualityChecks/en-US/overview.md)
2020-01-13T13:32:17.9496968Z ==============================================================================
2020-01-13T13:32:18.5217441Z SystemVssConnection exists true
2020-01-13T13:32:18.9314686Z Validating build warnings policy...
2020-01-13T13:32:19.0167920Z Counting warnings from tasks:
2020-01-13T13:32:19.0168324Z - Build Project
2020-01-13T13:32:19.0176134Z -   Total warnings: 0, Filtered warnings: 0
2020-01-13T13:32:19.0177614Z Total warnings: 0
2020-01-13T13:32:19.0179223Z Filtered warnings: 0
2020-01-13T13:32:19.0316765Z ##[section]Finishing: Check build quality
ReneSchumacher commented 4 years ago

Hi @madurh,

I'm not totally sure what might be causing this. The issue could already be resolved with the latest task version v6.2.4. Could you please check?

If the problem persists, please run your build again with the System.Debug set to true and send us the log file via email to PSGerExtSupport@microsoft.com.

René

madurh commented 4 years ago

Hi @ReneSchumacher, I did get the same error with v6.2.4 at least once, which I pasted below. But now I notice the "Check build quality" task has upgraded itself to v6.3. I will watch to see if it happens again in v6.3, then I'll turn on the diagnostics and send you the log. Thanks @ReneSchumacher

2020-01-14T20:59:16.7588860Z ##[section]Starting: Check build quality
2020-01-14T20:59:16.7596966Z ==============================================================================
2020-01-14T20:59:16.7597023Z Task         : Build Quality Checks
2020-01-14T20:59:16.7597247Z Description  : Breaks a build based on quality metrics like number of warnings or code coverage.
2020-01-14T20:59:16.7597279Z Version      : 6.2.4
2020-01-14T20:59:16.7597308Z Author       : Microsoft Premier Services
2020-01-14T20:59:16.7597571Z Help         : [[Docs]](https://github.com/MicrosoftPremier/VstsExtensions/blob/master/BuildQualityChecks/en-US/overview.md)
2020-01-14T20:59:16.7597600Z ==============================================================================
2020-01-14T20:59:17.3012226Z SystemVssConnection exists true
2020-01-14T20:59:17.7067776Z Using IdentifierJobResolver
2020-01-14T20:59:17.8035362Z Validating build warnings policy...
2020-01-14T20:59:17.8961761Z Counting warnings from tasks:
2020-01-14T20:59:17.8962047Z - Build Project
2020-01-14T20:59:33.3421234Z ##[error]Unhandled: undefined
2020-01-14T20:59:34.9801747Z -   Total warnings: 0, Filtered warnings: 0
2020-01-14T20:59:34.9802375Z Total warnings: 0
2020-01-14T20:59:34.9804367Z Filtered warnings: 0
2020-01-14T20:59:34.9855468Z [SUCCESS] Warnings policy passed with 0 warning(s).
2020-01-14T20:59:35.0999272Z ##[section]Finishing: Check build quality
ReneSchumacher commented 4 years ago

Hi @madurh,

as there haven't been any updates to this I assume everything is running smoothly now. Thus, I'm going to close the issue for now. Please feel free to post additional comments or open a new one if you see a problem again.

Happy building, René