Skip to content

Build errors should flow through Azure Pipelines to GitHub Checks annotations #2036

@rainersigwald

Description

@rainersigwald

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions