lowRISC / lowRISC/opentitan

[WIP] Proposal: Tool for summarizing CI results

Open
#16,811 1 comment 0 reactions 1 assignee Claimed by @dmcardle View on GitHub
Component:CI Component:Tooling Earlgrey-PROD Triaged
Dominant language
SystemVerilog
Stars
3.6k
Forks
1.1k
Avg merge
2d 22h
Merged PRs (30d)
141

Description

We have added a few "experimental" CI jobs lately, e.g. [`execute_rom_fpga_jtag_tests_cw310`](https://cs.opensource.google/opentitan/opentitan/+/master:azure-pipelines.yml;l=548;drc=f3a21fc7339ae5ca9883a93392435d187811f332). To my knowledge, the [Azure UI](https://dev.azure.com/lowrisc/opentitan) doesn't make it easy to evaluate the last N runs of a particular job.

I propose making a tool that uses the [Azure Pipelines API](https://learn.microsoft.com/en-us/rest/api/azure/devops/) to list recent CI runs and break down results by job. The output should be a table where each row is a CI run and columns are individual jobs. Each cell in the table should indicate the results of the run.

[**Edit**] I played with the API, but I couldn't figure out how to list the jobs inside of a [`Run`](https://learn.microsoft.com/en-us/rest/api/azure/devops/pipelines/runs/get?view=azure-devops-rest-7.1#run). I can list `Project`s, `Pipeline`s, and `Run`s, but that critical step of enumerating jobs within a `Run` eludes me. Perhaps my mental model is wrong.

## Output format

To start, it would be simplest to print a table to the command line. Later, I bet an HTML table with clickable links would be easier to use.

## Open design question: Which programming language?

This is a very low-stakes project, so I'd like to just take the path of least resistance.

I thought I'd avoid Python because `http.client` does not support HTTP/2. I started prototyping in Rust and realized there's no built-in HTTP client, so I'd have to choose and add a third-party library which is a bit of a headache. I've had great success with Go's `net/http` client before, which supports HTTP/2. However, it looks like the OpenTitan repo doesn't have any Go code — it's probably nice to get some wider approval before adding code in a new language.

[**Edit**] Coming back to this, I think the path of least resistance is to pull in third-party [client library](https://learn.microsoft.com/en-us/rest/api/azure/devops/?view=azure-devops-rest-7.1#client-libraries).

## Open question: Does this belong in the OpenTitan repo?

I suppose there's no reason this needs to be coupled to OpenTitan.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.