Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a5a2fc6134cdf98953b605e6a01942bb3f4cc547
https://github.com/WebKit/WebKit/commit/a5a2fc6134cdf98953b605e6a01942bb3f4cc547
Author: Issac Roy <[email protected]>
Date: 2026-08-20 (Thu, 20 Aug 2026)
Changed paths:
M
Tools/Scripts/libraries/resultsdbpy/resultsdbpy/controller/ews_controller.py
M
Tools/Scripts/libraries/resultsdbpy/resultsdbpy/controller/ews_controller_unittest.py
M
Tools/Scripts/libraries/resultsdbpy/resultsdbpy/model/configuration_context.py
M
Tools/Scripts/libraries/resultsdbpy/resultsdbpy/model/configuration_context_unittest.py
M Tools/Scripts/libraries/resultsdbpy/resultsdbpy/model/ews_context.py
M
Tools/Scripts/libraries/resultsdbpy/resultsdbpy/model/ews_context_unittest.py
Log Message:
-----------
[resultsdbpy] Allow results-ews to fetch multiple tests in one batch
rdar://185337989
https://bugs.webkit.org/show_bug.cgi?id=322114
Reviewed by Aakash Jain.
`results-ews` answers for one test, but a step filtering failures asks about
all of them. Sixty failures cost sixty round trips per table, each re-expanding
the same configuration server-side, twice per build once the re-run repeats it.
`find` now takes several tests. Repeated query parameters already arrive as a
tuple, so it reads all of them rather than the first, and each response entry
names the test it answers for. The limit stays per test, since a shared one
would be spent on whichever test came first. Cassandra still reads once per
test because `test` is part of the partition key: round trips collapse, not
reads.
Expanding a partial configuration depends on the configurations and the branch,
not the test, so it moves out of the per-test loop.
`select_from_table_with_configurations` splits into
`complete_configurations_for` and
`select_from_table_with_complete_configurations`, holding one session across
both so a caller outside a context manager still opens one connection rather
than two. EWS never sends a version or architecture, so that expansion always
runs; a batch now pays its redis scan once.
`select_from_table_with_complete_configurations` validates its configurations,
being reachable without the expansion that used to. `find` dedupes and drops
blank names before validating, so a repeated blank neither rejects a batch
naming a real test nor reaches Cassandra as an empty name, and a batch over
`MAX_TESTS_PER_QUERY` is rejected.
Both parameters are plural now that they take several values: `find` takes
`tests`, `list_tests` takes `prefixes`, which is what its repeated values
always were. Each renames a parameter on a landed endpoint whose only consumer
is the unlanded EWS client. The empty-configurations fallback also stops
appending into the caller's list.
* Tools/Scripts/libraries/resultsdbpy/resultsdbpy/controller/ews_controller.py:
(EWSController):
(EWSController.find):
(EWSController.list_tests):
*
Tools/Scripts/libraries/resultsdbpy/resultsdbpy/controller/ews_controller_unittest.py:
(EWSControllerTest.find_ews_results):
(EWSControllerTest.test_upload_and_find):
(EWSControllerTest.test_flaky_upload_and_find):
(EWSControllerTest):
(EWSControllerTest.test_find_a_batch_names_the_test_each_entry_answers_for):
(EWSControllerTest.test_find_rejects_a_commit_range):
(EWSControllerTest.test_find_without_test):
(EWSControllerTest.test_find_a_test_whose_name_needs_escaping):
(EWSControllerTest.test_find_ignores_blank_and_repeated_names):
(EWSControllerTest.test_find_rejects_an_oversized_batch):
(EWSControllerTest.test_list_tests_prefix):
(EWSControllerTest.test_list_tests_honours_the_limit_across_prefixes):
(EWSControllerTest.test_list_tests_percent_encoded_name):
*
Tools/Scripts/libraries/resultsdbpy/resultsdbpy/model/configuration_context.py:
(ConfigurationContext.complete_configurations_for):
(ConfigurationContext.select_from_table_with_complete_configurations):
(ConfigurationContext):
(ConfigurationContext.select_from_table_with_configurations):
*
Tools/Scripts/libraries/resultsdbpy/resultsdbpy/model/configuration_context_unittest.py:
(ConfigurationContextTest):
(ConfigurationContextTest.test_complete_configurations_for_expands_a_partial_configuration):
(ConfigurationContextTest.test_complete_configurations_for_passes_a_complete_configuration_through):
(ConfigurationContextTest.test_complete_configurations_for_rejects_an_invalid_configuration):
(ConfigurationContextTest.test_selecting_with_configurations_opens_one_connection):
(ConfigurationContextTest.test_selecting_with_configurations_opens_one_connection.ExampleModel):
(ConfigurationContextTest.test_selecting_with_configurations_opens_one_connection.counting_enter):
* Tools/Scripts/libraries/resultsdbpy/resultsdbpy/model/ews_context.py:
(EWSContext.find_for_tests):
(EWSContext.find_for_test): Deleted.
(EWSContext.find_for_test.get_time): Deleted.
* Tools/Scripts/libraries/resultsdbpy/resultsdbpy/model/ews_context_unittest.py:
(EWSContextTest._find):
(EWSContextTest):
(EWSContextTest.test_several_tests_are_answered_in_one_call):
(EWSContextTest.test_the_limit_is_spent_per_test_rather_than_shared):
(EWSContextTest.test_the_limit_is_spent_per_test_rather_than_shared.rows_per_configuration):
(EWSContextTest.test_the_configurations_are_expanded_once_for_the_batch):
(EWSContextTest.test_the_configurations_are_expanded_once_for_the_batch.record):
(EWSContextTest.test_time_window_query.start_times_within):
Canonical link: https://commits.webkit.org/319538@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications