Skip to content

Commit dc97009

Browse files
committed
(trigger.py) Fix: if head_commit is False/None, ignore this tree
Some trees violate pydantic scheme if they return False/None, and break trigger service. Ignore such trees. Signed-off-by: Denys Fedoryshchenko <[email protected]>
1 parent 941d7af commit dc97009

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/trigger.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,11 @@ def _run_trigger(self, build_config, force, timeout, trees):
5454
current_config._branch = latest['branch']
5555

5656
head_commit = kernelci.build.get_branch_head(current_config)
57+
if not head_commit:
58+
self.log.error(f"Failed to get branch head for {current_config.name:32s}, ignoring")
59+
return
5760
except Exception as ex:
58-
self.log.error(f"Failed to get branch head for {current_config.name:32s}")
61+
self.log.error(f"Failed to get branch head for {current_config.name:32s}, ignoring")
5962
self.traceback(ex)
6063
return
6164
search_terms = {

0 commit comments

Comments
 (0)