web-platform-tests / wpt.fyi

web-platform-tests dashboard
https://wpt.fyi/
Other
182 stars 88 forks source link

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

Open stephenmcgruer opened 4 years ago

stephenmcgruer commented 4 years ago

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 commented 4 years ago

@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.

Hexcles commented 4 years ago

Thanks, Stephen! This is accurate.