Skip to content

Add check for empty list of schema #472

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion changelog/461.fixed.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Fixes processing of relationshhip during nodes retrieval using the Sync Client, when prefecthing related_nodes
Fixes processing of relationshhip during nodes retrieval using the Sync Client, when prefecthing related_nodes.
2 changes: 1 addition & 1 deletion changelog/469.fixed.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Fixes ignored node variable in filters()
Fixes ignored node variable in filters().
3 changes: 2 additions & 1 deletion changelog/fixed.md
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this file looks wrong to me, it shouldn't exist in the first place

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if there is no bug/issue in Github, which ID should be used?

Original file line number Diff line number Diff line change
@@ -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.
3 changes: 3 additions & 0 deletions infrahub_sdk/ctl/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down