wpt.fyi icon indicating copy to clipboard operation
wpt.fyi copied to clipboard

[Code Health] Store mapping of sha -> CheckSuites/TestRuns in wpt.fyi

Open stephenmcgruer opened this issue 5 years ago • 2 comments

See https://github.com/web-platform-tests/wpt.fyi/pull/2052#issuecomment-656291106

Currently our code for updating GitHub check suites with wpt.fyi results queries GitHub for all TestRuns for the SHA we are interested in (see https://github.com/web-platform-tests/wpt.fyi/blob/15ff3ee/api/checks/runs.go#L82), and then iterates them to see if we have an existing test run that meets the criteria.

Instead, we could just store the sha -> TestRun mapping as we ingest test runs, and then we wouldn't need to query GitHub APIs here. (Removing overhead, and a point of failure).

stephenmcgruer avatar Jul 13 '20 21:07 stephenmcgruer

@Hexcles lmk if this is what you meant by that comment or if I've misunderstood; feel free to edit the issue description above if you want.

stephenmcgruer avatar Jul 13 '20 21:07 stephenmcgruer

Thanks, Stephen! This is accurate.

Hexcles avatar Jul 13 '20 21:07 Hexcles