-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support finding EWS runs from GitHub PRs in update-test-expectations #18037
Support finding EWS runs from GitHub PRs in update-test-expectations #18037
Conversation
EWS run on previous version of this PR (hash 9d5e0f5) |
Tools/Scripts/libraries/webkitscmpy/webkitscmpy/pull_request.py
Outdated
Show resolved
Hide resolved
If we care about being able to update results from post-commit, we probably want to be getting status checks from a commit, rather than from a PR. And given that's how both GitHub and Bitbucket Server have these in their APIs, that's probably where it should live for us too. |
9d5e0f5
to
b268d30
Compare
EWS run on previous version of this PR (hash b268d30) |
b268d30
to
05116fd
Compare
EWS run on previous version of this PR (hash 05116fd) |
Okay, trying to apply this to #20412:
|
05116fd
to
25f8538
Compare
EWS run on previous version of this PR (hash 25f8538) |
25f8538
to
14bc721
Compare
EWS run on previous version of this PR (hash 14bc721) |
14bc721
to
454825b
Compare
source_remote = repository.default_remote | ||
remote_repo = repository.remote(name=source_remote) | ||
if not remote_repo.pull_requests: | ||
msg = "Remote repo doesn't support pull requests" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just raise ValueError
directly?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see https://docs.astral.sh/ruff/rules/raw-string-in-exception/; essentially it avoids the string being duplicated in the traceback, which makes it somewhat harder to read
|
||
if existing_pr is None: | ||
msg = "No PR found for current branch" | ||
raise ValueError(msg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto on raising ValueError(<str>)
directly.
https://bugs.webkit.org/show_bug.cgi?id=257158 Reviewed by Jonathan Bedard. This adds support for fetching layout test results based on GitHub PR statuses. To do this, we refactor test_expectation_updater to be able to support multiple sources of layout tests results, and add various subcommands to it. With the subcommands added, we rename the script to update-test-expectations, and add a legacy update-test-expectations-from-bugzilla which calls the bugzilla subcommand. * Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/remote/git_hub.py: (GitHub._commit_response): * Tools/Scripts/update-test-expectations: Copied from Tools/Scripts/update-test-expectations-from-bugzilla. * Tools/Scripts/update-test-expectations-from-bugzilla: * Tools/Scripts/webkitpy/common/net/bugzilla/results_fetcher.py: (lookup_ews_results_from_pr): (lookup_ews_results_from_repo_via_pr): * Tools/Scripts/webkitpy/common/net/bugzilla/results_fetcher_unittest.py: (ResultsFetcherTest.test_is_relevant_results): (ResultsFetcherTest.test_lookup_ews_results_from_bugzilla): (ResultsFetcherGitHubTest): (ResultsFetcherGitHubTest.webserver): * Tools/Scripts/webkitpy/common/net/bugzilla/test_expectation_updater.py: (configure_logging.LogHandler): (argument_parser): (TestExpectationUpdater.__init__): (TestExpectationUpdater.fetch_from_bugzilla): (TestExpectationUpdater): (TestExpectationUpdater.fetch_from_github_pr): (TestExpectationUpdater.do_update): (main): * Tools/Scripts/webkitpy/common/net/bugzilla/test_expectation_updater_unittest.py: (TestExpectationUpdaterTest.test_update_test_expectations): Canonical link: https://commits.webkit.org/272152@main
454825b
to
1a61da0
Compare
Committed 272152@main (1a61da0): https://commits.webkit.org/272152@main Reviewed commits have been landed. Closing PR #18037 and removing active labels. |
EWS run on current version of this PR (hash 454825b) |
1a61da0
454825b
π§ͺ styleπ iosπ macπ wpeπ wincairoπ§ͺ bindingsπ ios-simπ mac-AS-debugπ§ͺ wpe-wk2π§ͺ webkitperlπ§ͺ ios-wk2π§ͺ api-macπ§ͺ api-wpeπ§ͺ webkitpyπ§ͺ ios-wk2-wptπ§ͺ mac-wk1π gtkπ§ͺ api-iosπ§ͺ mac-wk2π§ͺ gtk-wk2π tvπ§ͺ mac-AS-debug-wk2π§ͺ api-gtkπ§ͺ servicesπ tv-simπ§ͺ mac-wk2-stressπ watchπ watch-sim