Skip to content

Commit 3720158

Browse files
authored
Fix bug in bots with subqueue due to platform checking (#3639)
1 parent 22da349 commit 3720158

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/clusterfuzz/_internal/bot/tasks/commands.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -276,15 +276,17 @@ def process_command_impl(task_name,
276276
logs.log_error(error_string)
277277
raise errors.BadStateError(error_string)
278278

279-
# A misconfiguration led to this point. Clean up the job if necessary.
280279
job_queue_suffix = tasks.queue_suffix_for_platform(job.platform)
281-
bot_queue_suffix = tasks.default_queue_suffix()
280+
bot_platform = environment.platform().lower()
281+
bot_base_queue_suffix = tasks.queue_suffix_for_platform(
282+
environment.base_platform(bot_platform))
282283

283-
if job_queue_suffix != bot_queue_suffix:
284+
# A misconfiguration led to this point. Clean up the job if necessary.
285+
if job_queue_suffix != bot_base_queue_suffix:
284286
# This happens rarely, store this as a hard exception.
285287
logs.log_error(
286288
'Wrong platform for job %s: job queue [%s], bot queue [%s].' %
287-
(job_name, job_queue_suffix, bot_queue_suffix))
289+
(job_name, job_queue_suffix, bot_base_queue_suffix))
288290

289291
# Try to recreate the job in the correct task queue.
290292
new_queue = (

0 commit comments

Comments
 (0)