mirror of
https://github.com/esphome/esphome.git
synced 2026-05-26 03:07:04 +08:00
[ci] Apply conflict split before CI batch distribution
Previously split_conflicting_groups ran only inside test_build_components. The CI-side batcher (split_components_for_ci.py / determine-jobs.py) still saw the pre-split group, so its weight budgeting assumed one build where runtime produces two. Apply the split where the groups are formed so batch distribution reflects actual build counts.
This commit is contained in:
@@ -28,7 +28,7 @@ from script.analyze_component_buses import (
|
||||
create_grouping_signature,
|
||||
merge_compatible_bus_groups,
|
||||
)
|
||||
from script.helpers import get_component_test_files
|
||||
from script.helpers import get_component_test_files, split_conflicting_groups
|
||||
|
||||
# Weighting for batch creation
|
||||
# Isolated components can't be grouped/merged, so they count as 10x
|
||||
@@ -145,6 +145,11 @@ def create_intelligent_batches(
|
||||
# improving the efficiency of test_build_components.py grouping
|
||||
signature_groups = merge_compatible_bus_groups(signature_groups)
|
||||
|
||||
# Split groups containing mutually-incompatible components (CONFLICTS_WITH).
|
||||
# Without this, batch weighting assumes the group is one build when it will
|
||||
# actually be split into two at build time -- throwing off CI distribution.
|
||||
signature_groups = split_conflicting_groups(signature_groups)
|
||||
|
||||
# Create batches by keeping signature groups together
|
||||
# Components with the same signature stay in the same batches
|
||||
batches = []
|
||||
|
||||
Reference in New Issue
Block a user