Skip to content

Commit

Permalink
Add logs to investigate redo task (#4162)
Browse files Browse the repository at this point in the history
Added logs to investigate redo task failures for cases where the build
revision `last_tested_revision` or `known_crash_revision` is old (master
based) and is no longer available
This will be removed once the fix is identified

Couple of related logs also updated to use f-strings
  • Loading branch information
svasudevprasad authored Aug 14, 2024
1 parent ff2652e commit 295208c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/clusterfuzz/_internal/bot/tasks/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,26 +327,27 @@ def process_command_impl(task_name,
if (task_name != 'variant' and testcase_platform_id and
not utils.fields_match(testcase_platform_id, current_platform_id)):

logs.info(f'Testcase {testcase_id} platform {testcase_platform_id}\
does not match with ours {current_platform_id}, checking ...')
logs.info(
f'Testcase {testcase_id} platform {testcase_platform_id} '
f'does not match with ours {current_platform_id}, checking.')

# Check if the device or branch is deprecated.
# If it is deprecated, try to execute on an updated platform.
if not (environment.is_testcase_deprecated(testcase_platform_id) and
environment.can_testcase_run_on_platform(
testcase_platform_id, current_platform_id)):
logs.info('Testcase %d platform (%s) does not match with ours\
(%s), exiting' % (testcase.key.id(), testcase_platform_id,
current_platform_id))
logs.info(f'Testcase {testcase.key.id()} platform '
f'({testcase_platform_id}) does not match with ours '
f'({current_platform_id}), exiting.')
tasks.add_task(
task_name,
task_argument,
job_name,
wait_time=utils.random_number(1, TASK_RETRY_WAIT_LIMIT))
return None

logs.info(f'Testcase {testcase_id} platform {testcase_platform_id}\
can run on current platform {current_platform_id}')
logs.info(f'Testcase {testcase_id} platform {testcase_platform_id} '
f'can run on current platform {current_platform_id}.')

# Some fuzzers contain additional environment variables that should be
# set for them. Append these for tests generated by these fuzzers and for
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,10 @@ def find_fixed_range(uworker_input):
if not max_revision:
max_revision = revisions.get_last_revision_in_list(revision_list)

logs.info(
f'min_revision is {min_revision} and max_revision is {max_revision}.')
logs.info(f'revision_list is {revision_list}.')

min_index = revisions.find_min_revision_index(revision_list, min_revision)
if min_index is None:
error_message = f'Build {min_revision} no longer exists.'
Expand Down
3 changes: 3 additions & 0 deletions src/clusterfuzz/_internal/build_management/build_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -1025,6 +1025,9 @@ def get_revisions_list(bucket_path, bad_revisions, testcase=None):
if not revision_urls:
return None

logs.info(f'revision_urls is {revision_urls} and revision_pattern '
f'is {revision_pattern}.')

# Parse the revisions out of the build urls.
revision_list = []
for url in revision_urls:
Expand Down

0 comments on commit 295208c

Please sign in to comment.