mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
ci(buildv2): skip patching the fake_pass build child pipeline
idf-ci emits a skip pipeline containing only a fake_pass job, with no include of test_child_pipeline.yml, when the modified files match no buildable apps. patch_buildv2_child_pipeline.py redefined generate_pytest_child_pipeline unconditionally, assuming the included template supplied its tags, image and assign_test stage via keyword merge. With the template absent, the injected job was bare: no tags, default test stage. It was scheduled on the wrong runner and failed, turning the allow_failure build_child_pipeline_buildv2 bridge red on every buildv2 MR whose changes produce an empty app matrix. Return early when a fake_pass job is present so the child pipeline is left untouched and skips, matching the default build path. Add a unit test for the patch script and a host_test job to run it.
This commit is contained in:
@@ -33,6 +33,13 @@ def patch(path: str) -> None:
|
||||
with open(path) as f:
|
||||
d = yaml.safe_load(f)
|
||||
|
||||
if 'fake_pass' in d:
|
||||
# idf-ci emitted a skip pipeline (no apps matched the modified files): there
|
||||
# are no build jobs to activate and no included generate_pytest_child_pipeline
|
||||
# to redefine. Leave it untouched so Build system v2 skips like the default path.
|
||||
print('Skip pipeline (fake_pass) detected, leaving it untouched')
|
||||
return
|
||||
|
||||
injected = []
|
||||
for k, v in d.items():
|
||||
if isinstance(v, dict) and 'extends' in v:
|
||||
|
||||
Reference in New Issue
Block a user