From 7ad9b5076cf3c1fb719121bafc617d6696990e65 Mon Sep 17 00:00:00 2001 From: Jeny Sadadia Date: Wed, 7 Jan 2026 18:19:00 +0530 Subject: [PATCH] Fix flag in the validation report MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rename `count_comparison_flag` to `summary_flag`. The flag will have `❌` if any missing builds/boots or any status mismatched found. Otherwise it will have `✅` value to denote everything is good with the results for specific commit. Signed-off-by: Jeny Sadadia --- kcidev/subcommands/maestro/validate/helper.py | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/kcidev/subcommands/maestro/validate/helper.py b/kcidev/subcommands/maestro/validate/helper.py index f87901d..44f8fa8 100644 --- a/kcidev/subcommands/maestro/validate/helper.py +++ b/kcidev/subcommands/maestro/validate/helper.py @@ -119,22 +119,22 @@ def get_build_stats(ctx, giturl, branch, commit, tree_name, verbose, arch): if dashboard_builds is None: return [] missing_build_ids = [] - if len(dashboard_builds) == len(maestro_builds): - count_comparison_flag = "✅" - else: - count_comparison_flag = "❌" + summary_flag = "✅" + if len(dashboard_builds) != len(maestro_builds): missing_build_ids = find_missing_items( maestro_builds, dashboard_builds, "build", verbose ) builds_with_status_mismatch = validate_build_status( maestro_builds, dashboard_builds ) + if missing_build_ids or builds_with_status_mismatch: + summary_flag = "❌" stats = [ f"{tree_name}/{branch}", commit, len(maestro_builds), len(dashboard_builds), - count_comparison_flag, + summary_flag, missing_build_ids, builds_with_status_mismatch, ] @@ -314,20 +314,20 @@ def get_boot_stats(ctx, giturl, branch, commit, tree_name, verbose, arch): if dashboard_boots is None: return [] missing_boot_ids = [] - if len(dashboard_boots) == len(maestro_boots): - count_comparison_flag = "✅" - else: - count_comparison_flag = "❌" + summary_flag = "✅" + if len(dashboard_boots) != len(maestro_boots): missing_boot_ids = find_missing_items( maestro_boots, dashboard_boots, "boot", verbose ) boots_with_status_mismatch = validate_boot_status(maestro_boots, dashboard_boots) + if missing_boot_ids or boots_with_status_mismatch: + summary_flag = "❌" stats = [ f"{tree_name}/{branch}", commit, len(maestro_boots), len(dashboard_boots), - count_comparison_flag, + summary_flag, missing_boot_ids, boots_with_status_mismatch, ]