Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions bugbug/models/testselect.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,35 @@ def select_configs(
# Create constraints to ensure at least one task from each set of equivalent
# groups is selected.

# Generate equivalence sets for groups that don't exist in the precomputed sets
if group not in equivalence_sets:
logger.warning(
f"Group {group} not found in equivalence sets, generating on-the-fly"
)
key = test_scheduling.failing_together_key(group)
try:
failing_together_stats = pickle.loads(failing_together[key])
except KeyError:
failing_together_stats = {}

def load_failing_together(
config: str,
) -> dict[str, tuple[float, float]]:
try:
return failing_together_stats[config]
except KeyError:
return {}

configs = (
all_configs_by_group[group]
if group in all_configs_by_group
else all_configs
)

equivalence_sets[group] = _generate_equivalence_sets(
configs, min_redundancy_confidence, load_failing_together, True
)

mutually_exclusive = True
seen = set()
for equivalence_set in equivalence_sets[group]:
Expand Down
3 changes: 2 additions & 1 deletion http_service/bugbug_http/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,8 @@ def get_config_specific_groups(config: str) -> str:
[
{"name": group}
for group in past_failures_data.all_runnables
if any(
if group in equivalence_sets
and any(
equivalence_set == {config}
for equivalence_set in equivalence_sets[group]
)
Expand Down