question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Build errors should flow through Azure Pipelines to GitHub Checks annotations

See original GitHub issue

GitHub Checks have the ability to annotate errors as related to specific lines of code. Arcade-based builds should take advantage of this.

There are several layers of logic required here:

Arcade

The build process must emit messages in such a way that Azure Pipelines can understand them.

The MSBuild and VSBuild pipelines tasks accomplish this by using a custom logger, Microsoft.TeamFoundation.DistributedTask.MSBuild.Logger.

Arcade launches builds using a script rather than those tasks, and it doesn’t seem that there’s an easy way to get access to the logger DLL from inside an arbitrary script.

Arcade could reimplement the logger–it’s a pretty straightforward mapping from the MSBuild BuildErrorEventArgs fields to the metadata required in the console message.

Pipelines

Pipelines then needs to transfer the error-message metadata into a Checks annotation. At the moment, this doesn’t appear to be fully functional.

For example, I introduced a compile error into a repo that uses the MSBuild task (and thus the custom logger). Pipelines correctly flags the error (https://dev.azure.com/dnceng/public/_build/results?buildId=94488), but the corresponding Check run says only that the overall build failed.

image

For this part, we’ll need to engage the Azure DevOps folks.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:24 (24 by maintainers)

github_iconTop GitHub Comments

3reactions
jaredparcommented, Mar 28, 2019

@chcosta if that’s the case then my vote is move code here. Reason being it’s just saner to manage. I’d rather add functionality to arcade, especially when it’s this straight forward, than yet another NuPkg (that will invetiably just cause me to swear a lot later).

2reactions
chcostacommented, Mar 27, 2019

Azure DevOps says they’re ok if we want to move the code for the MSBuild Logger to an open source repo or publish / consume a NuGet package of it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using GitHub Checks Annotations from Azure Pipelines
I would like to add Checks Annotations to GitHub Pull Requests using Azure DevOps CI. Specifically, I want to pipe build failures from...
Read more >
Build GitHub repositories - Azure Pipelines
Azure Pipelines can automatically build and validate every pull request and commit to your GitHub repository. This article describes how to ...
Read more >
Pull request validation based on GitHub labels using Azure ...
The implemented solution uses GitHub pull request labels to identify whether or not the integration tests should be executed. The implementation ...
Read more >
GitHub integration with Azure Pipelines
In this lab, you'll see how easy it is to set up Azure Pipelines with your GitHub projects and how you can achieve...
Read more >
Build Quality Checks
Extension for Azure DevOps - Breaks a build based on quality metrics like number of warnings or code coverage.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found