From 6aff07d9cc0e83ca5b2bc678d981ae7f14dfb68d Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Tue, 26 Aug 2025 16:50:10 +0200 Subject: [PATCH 1/4] Make sure that builds for different repos don't get deduplicated by the last_build option --- eessi_bot_event_handler.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/eessi_bot_event_handler.py b/eessi_bot_event_handler.py index 66cb6977..70a362e6 100644 --- a/eessi_bot_event_handler.py +++ b/eessi_bot_event_handler.py @@ -591,6 +591,7 @@ def handle_bot_command_status(self, event_info, bot_command): repo_name = event_info['raw_request_body']['repository']['full_name'] pr_number = event_info['raw_request_body']['issue']['number'] status_table = request_bot_build_issue_comments(repo_name, pr_number) + self.log(f"Retrieved status table from issue comments: {status_table}") if 'last_build' in bot_command.general_args: # If the bot command is something like 'bot:status =last_build', then only retain the last build for each @@ -625,7 +626,17 @@ def handle_bot_command_status(self, event_info, bot_command): 'on arch': [], 'for arch': [], 'for repo': [], 'date': [], 'status': [], 'url': [], 'result': [] } for x in range(0, len(sorted_table['date'])): - if sorted_table['for arch'][x] not in status_table_last['for arch']: + # Check if the current 'for arch' AND repo are already in the status_table_last. If not, add it + already_present=False + for y in range(0, len(status_table_last['for arch']): + if ( + sorted_table['for arch'][x] == status_table_last['for arch'][y] + and sorted_table['for repo'][x] == status_table_last['for repo'][y] + ): + already_present=True + # One match is enough, we don't append in this case, no need to look further + break + if not already_present: self.log(f"arch: {sorted_table['for arch'][x]} not yet in status_table_last") for key in status_table_last: self.log(f"Adding to '{key}' and the value {sorted_table[key][x]}") From 0ba867db097da060b1079063d7972852576d5d43 Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Tue, 26 Aug 2025 16:54:10 +0200 Subject: [PATCH 2/4] Fix hound issues --- eessi_bot_event_handler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eessi_bot_event_handler.py b/eessi_bot_event_handler.py index 70a362e6..4eea78c3 100644 --- a/eessi_bot_event_handler.py +++ b/eessi_bot_event_handler.py @@ -627,13 +627,13 @@ def handle_bot_command_status(self, event_info, bot_command): } for x in range(0, len(sorted_table['date'])): # Check if the current 'for arch' AND repo are already in the status_table_last. If not, add it - already_present=False + already_present = False for y in range(0, len(status_table_last['for arch']): if ( sorted_table['for arch'][x] == status_table_last['for arch'][y] and sorted_table['for repo'][x] == status_table_last['for repo'][y] ): - already_present=True + already_present = True # One match is enough, we don't append in this case, no need to look further break if not already_present: From b3e293cc741443448b3d953abfb601dd4d450bc8 Mon Sep 17 00:00:00 2001 From: Caspar van Leeuwen Date: Tue, 26 Aug 2025 16:56:17 +0200 Subject: [PATCH 3/4] Add missing bracket --- eessi_bot_event_handler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eessi_bot_event_handler.py b/eessi_bot_event_handler.py index 4eea78c3..6490f404 100644 --- a/eessi_bot_event_handler.py +++ b/eessi_bot_event_handler.py @@ -628,7 +628,7 @@ def handle_bot_command_status(self, event_info, bot_command): for x in range(0, len(sorted_table['date'])): # Check if the current 'for arch' AND repo are already in the status_table_last. If not, add it already_present = False - for y in range(0, len(status_table_last['for arch']): + for y in range(0, len(status_table_last['for arch'])): if ( sorted_table['for arch'][x] == status_table_last['for arch'][y] and sorted_table['for repo'][x] == status_table_last['for repo'][y] From 275fab03f7ec3440281311232234b863825bf165 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bob=20Dr=C3=B6ge?= Date: Thu, 28 Aug 2025 16:45:23 +0200 Subject: [PATCH 4/4] Update eessi_bot_event_handler.py --- eessi_bot_event_handler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eessi_bot_event_handler.py b/eessi_bot_event_handler.py index 6490f404..32f846ca 100644 --- a/eessi_bot_event_handler.py +++ b/eessi_bot_event_handler.py @@ -626,7 +626,7 @@ def handle_bot_command_status(self, event_info, bot_command): 'on arch': [], 'for arch': [], 'for repo': [], 'date': [], 'status': [], 'url': [], 'result': [] } for x in range(0, len(sorted_table['date'])): - # Check if the current 'for arch' AND repo are already in the status_table_last. If not, add it + # Check if the current 'for arch' AND 'for repo' are already in the status_table_last. If not, add it already_present = False for y in range(0, len(status_table_last['for arch'])): if (