MicrosoftPremier / VstsExtensions

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

Sometimes the baseline build could not be found #171

Closed jmendezortega closed 2 years ago

jmendezortega commented 2 years ago

Problem and expected behavior We are using the BuildQualityChecks in the build that is launched when we make a Pull Request and sometimes it is not warning us that the coverage goes down and integrates the code in master. The problem is that you get a warning that the build is not found and can't do the comparison. Then the BuildQualityChecks remains green and there is no error warning. This is the warning: [WARNING] The baseline build could not be found. All policies based on the previous build will pass.

[warning]The baseline build could not be found. All policies based on the previous build will pass.

I want to compare the coverage of the current pipeline with the previous pipeline but only with the ones that have finished successfully. Right now there are cancelled or failed pipelines and I don't know if that affects and error in the BuilQualityChecks.

Task logs Right now I have no task log with System.Debug and BQC.LogRawData set to true.

When I have it I will email it to you.

Thanks

ReneSchumacher commented 2 years ago

Hi @jmendezortega,

can you share your configuration of task? Build Quality Checks has a special baseline behavior for pull requests (see here) which should make sure that it finds the most suitable build to compare to. However, this default behavior can only work correctly, if you are using the same pipeline for validating your PR and building the code on your main branch. This would usually be my recommendation, although some teams might have good reasons to have specific pipelines just for PR validation.

If you are not using the same pipeline, you need to configure the correct baseline build definition as described here. Otherwise, you might be running definition A on your main branch and definition B in your PR, and the task will try to find a run for definition B targeting your main branch, which it will never find. Thus, you will always run into the problem of not having a baseline.

ReneSchumacher commented 2 years ago

Hi @jmendezortega,

any feedback?

ReneSchumacher commented 2 years ago

I'm closing this issue due to lack of feedback. If the issue still persists, please feel free to open a new one.