MicrosoftPremier / VstsExtensions

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

[BQC] Unable to hide removed warnings #170

Closed leshy84 closed 2 years ago

leshy84 commented 2 years ago

Hello,

we want to display only new warnings in the statistics (Extensions tab in pipeline run) because we use incremental builds and some warnings become "removed" if files were not recompiled.

We set BQC.Statistics.MaxRemovedWarnings to 0:

Overall total warnings: 6543 Overall filtered warnings: 6543

[debug]CompareToBaselineWarningsRule.preparePostRules

[debug]forceFewerWarnings=false

[debug]NotAboveBaselineWarningsRule.isFulfilledImpl

[SUCCESS] Warnings policy passed with 95 warning(s).

[debug]BQC.Statistics.MaxAddedWarnings=undefined

[debug]BQC.Statistics.MaxRemovedWarnings=0

But the extensions tab still displays a lot of "removed" warnings.

Is there a way to hide the removed warnings?

ReneSchumacher commented 2 years ago

Hi @leshy84,

sorry for the late response. We never actually thought about removing removed or new warnings from the statistics output. Thus, zero currently is an invalid value for the MaxRemovedWarnings variable and its value is set to the default of 50 if you set the variable to zero. I do understand the use case, though, and will quickly fix that and push out a new version to the marketplace. It should become available later today.

leshy84 commented 2 years ago

Our use case: We have two build pipelines for the same projects - with clean and without (incremental build). The incremental pipeline builds not all projects, but changed ones only, so it generates much less build warnings, because unchanged projects are not recompiled. In case of compare with clean build all warnings of unchanged projects are marked as removed. Such "removed" warnings just pollute the statistics.

ReneSchumacher commented 2 years ago

I do understand the context and I was wondering myself why we didn't allow zero for the variables. 😕 It's fixed now, though, with version 8.1.4. Sorry that it took longer than I anticipated, but my colleagues apparently didn't see the PR in time.

leshy84 commented 2 years ago

I tried the version 8.1.4, but it does not seem that anything changed... Here is part of log:

2022-02-04T07:42:22.1535217Z Version : 8.1.4 ... 2022-02-04T07:42:38.2197382Z [SUCCESS] Warnings policy passed with 1437 warning(s). 2022-02-04T07:42:38.2198638Z ##[debug]BQC.Statistics.MaxAddedWarnings=undefined 2022-02-04T07:42:38.2199216Z ##[debug]BQC.Statistics.MaxRemovedWarnings=0 ... 2022-02-04T07:42:38.4558420Z [WARNING] The list of removed warnings was truncated after the first 50 entries. You may include additional warnings by increasing the value of the variable BQC.Statistics.MaxRemovedWarnings.

And the statistics window still displays a lot of removed warnings.

Did I do anything wrong?

ReneSchumacher commented 2 years ago

Ouch, I'm very sorry! I've missed one spot the resets the value to our default again. That's what you get for doing code changes while delivering workshops 🤦‍♂️ The fix is already in the pipeline and should be available soon.