From 3afffde7fc3d6580f11bc81ff61decdd06346244 Mon Sep 17 00:00:00 2001 From: Denys Fedoryshchenko Date: Mon, 27 Apr 2026 14:47:00 +0300 Subject: [PATCH] config: Print which fragment have missing path Signed-off-by: Denys Fedoryshchenko --- kernelci/config/build.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/kernelci/config/build.py b/kernelci/config/build.py index 35af23a8bd..113878c16b 100644 --- a/kernelci/config/build.py +++ b/kernelci/config/build.py @@ -524,10 +524,18 @@ def from_yaml(data, _): for name, config in data.get("trees", {}).items() } - fragments = { - name: Fragment.load_from_yaml(config, name=name) - for name, config in data.get("fragments", {}).items() - } + fragments = {} + for name, config in data.get("fragments", {}).items(): + if not config or not config.get("path"): + raise ValueError( + f"Fragment '{name}' is missing required 'path' field" + ) + try: + fragments[name] = Fragment.load_from_yaml(config, name=name) + except TypeError as exc: + raise ValueError( + f"Failed to load fragment '{name}': {exc}" + ) from exc build_environments = { name: BuildEnvironment.load_from_yaml(config, name=name)