interop icon indicating copy to clipboard operation
interop copied to clipboard

Avoid unintended scope changes to active focus areas

Open zcorpan opened this issue 1 year ago • 5 comments

Maybe we should have a CI check (in wpt) to avoid test changes for tests in interop-* (for active focus areas). Require a commit message to link to an issue in the interop repo?

c.f. https://github.com/web-platform-tests/interop/issues/345 , https://github.com/web-platform-tests/interop/issues/338

zcorpan avatar May 25 '23 08:05 zcorpan

@zcorpan any thoughts on how to implement this? The labels are in https://github.com/web-platform-tests/wpt-metadata and can be accessed via a wpt.fyi API. Either would be an external dependency which would increase the risk of CI failures if those dependencies are not reliable.

foolip avatar May 25 '23 12:05 foolip

I had in mind doing a git clone of the wpt-metadata repo. I'm not so familiar with the wpt.fyi API. No opinion on which approach to use. If there are network issues we could have a retry (or several retries with increased timeout).

zcorpan avatar May 26 '23 10:05 zcorpan

Looks like the API is undocumented (https://github.com/web-platform-tests/wpt.fyi/issues/3337) but one can get all of the labels in a single API call at https://wpt.fyi/api/metadata?product=chrome&includeTestLevel.

Whether using that API or a clone of the wpt-metadata repo, we'd get a list of test names. I'm a bit unsure how to implement the rest of the check, but it is possible of course.

foolip avatar May 26 '23 14:05 foolip

I think there's code to determine "affected tests" for a PR for running stability checks, which maybe we could reuse? cc @jgraham

zcorpan avatar May 29 '23 14:05 zcorpan

We discussed this in https://github.com/web-platform-tests/interop/issues/660. Concrete next steps here could be a GitHub Actions workflow that does:

  • Get list of labels for active focus areas from https://wpt.fyi/static/interop-data.json
  • Get the list of labeled tests from https://wpt.fyi/api/metadata?includeTestLevel=true&product=chrome
  • Get affected tests with ./wpt tests-affected (this also includes tests affected indirectly through included scripts)
  • Check if there's an intersection between the labeled tests and the affected tests
  • Add a "affects-interop-2024" label to the pull request

foolip avatar May 16 '24 16:05 foolip