From 121c94d5f322195cdea043c5c65bc72c675f37b1 Mon Sep 17 00:00:00 2001 From: Bearchitek Date: Wed, 16 Jul 2025 10:52:38 +0200 Subject: [PATCH 1/2] add check for empty list of schema --- infrahub_sdk/ctl/utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/infrahub_sdk/ctl/utils.py b/infrahub_sdk/ctl/utils.py index 63d7dfb8..66f86865 100644 --- a/infrahub_sdk/ctl/utils.py +++ b/infrahub_sdk/ctl/utils.py @@ -187,6 +187,9 @@ def load_yamlfile_from_disk_and_exit( has_error = False try: data_files = file_type.load_from_disk(paths=paths) + if not data_files: + console.print("[red]No valid files found to load.") + raise typer.Exit(1) except FileNotValidError as exc: console.print(f"[red]{exc.message}") raise typer.Exit(1) from exc From 8c71f457c762d68d00429dd4dce15de746fd00e8 Mon Sep 17 00:00:00 2001 From: Bearchitek Date: Wed, 16 Jul 2025 11:00:37 +0200 Subject: [PATCH 2/2] add changelog --- changelog/461.fixed.md | 2 +- changelog/469.fixed.md | 2 +- changelog/fixed.md | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/changelog/461.fixed.md b/changelog/461.fixed.md index 45b0d41a..98c5444c 100644 --- a/changelog/461.fixed.md +++ b/changelog/461.fixed.md @@ -1 +1 @@ -Fixes processing of relationshhip during nodes retrieval using the Sync Client, when prefecthing related_nodes \ No newline at end of file +Fixes processing of relationshhip during nodes retrieval using the Sync Client, when prefecthing related_nodes. \ No newline at end of file diff --git a/changelog/469.fixed.md b/changelog/469.fixed.md index b3ce9e53..471456f9 100644 --- a/changelog/469.fixed.md +++ b/changelog/469.fixed.md @@ -1 +1 @@ -Fixes ignored node variable in filters() \ No newline at end of file +Fixes ignored node variable in filters(). \ No newline at end of file diff --git a/changelog/fixed.md b/changelog/fixed.md index ec53c282..a25f3fa6 100644 --- a/changelog/fixed.md +++ b/changelog/fixed.md @@ -1 +1,2 @@ -Fixes using of parallel with filters for Infrahub Client Sync +Fixes using of parallel with filters for Infrahub Client Sync. +Avoid sending empty list of schemas to infrahub if no valids schemas are found. \ No newline at end of file