Closed Bug 1126927 Opened 11 years ago Closed 8 years ago

Broken error message raises a TypeError, preventing a later traceback with more useful debugging info

Categories

(Release Engineering :: Applications: MozharnessCore, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mrrrgn, Unassigned)

Details

Attachments

(1 file)

After setting up a new test slave, these errors started raising on every job: 09:56:04 INFO - Running post-action listener: _resource_record_post_action 09:56:04 FATAL - Uncaught exception: Traceback (most recent call last): 09:56:04 FATAL - File "/builds/slave/test/scripts/mozharness/base/script.py", line 1277, in run 09:56:04 FATAL - self.run_action(action) 09:56:04 FATAL - File "/builds/slave/test/scripts/mozharness/base/script.py", line 1220, in run_action 09:56:04 FATAL - self._possibly_run_method("postflight_%s" % method_name) 09:56:04 FATAL - File "/builds/slave/test/scripts/mozharness/base/script.py", line 1160, in _possibly_run_method 09:56:04 FATAL - return getattr(self, method_name)() 09:56:04 FATAL - File "/builds/slave/test/scripts/mozharness/mozilla/testing/testbase.py", line 307, in postflight_read_buildbot_config 09:56:04 FATAL - self.fatal("%s!" % (message % ('+'.join(missing)))) 09:56:04 FATAL - TypeError: not all arguments converted during string formatting 09:56:04 FATAL - Running post_fatal callback... 09:56:04 FATAL - Exiting -1 This type error in the error message prevents the more useful debugging info that comes from removing the statement: 10:01:44 INFO - Running post-action listener: _resource_record_post_action 10:01:44 INFO - ##### 10:01:44 INFO - ##### Running download-and-extract step. 10:01:44 INFO - ##### 10:01:44 INFO - Running pre-action listener: _resource_record_pre_action 10:01:44 INFO - Running main action method: download_and_extract 10:01:44 FATAL - installer_url isn't set! 10:01:44 FATAL - 10:01:44 FATAL - You can set this by: 10:01:44 FATAL - 10:01:44 FATAL - 1. specifying --installer-url URL, or 10:01:44 FATAL - 2. running via buildbot and running the read-buildbot-config action 10:01:44 FATAL - 10:01:44 FATAL - test_url isn't set! 10:01:44 FATAL - 10:01:44 FATAL - You can set this by: 10:01:44 FATAL - 10:01:44 FATAL - 1. specifying --test-url URL, or 10:01:44 FATAL - 2. running via buildbot and running the read-buildbot-config action 10:01:44 FATAL - 10:01:44 FATAL - Can't run download-and-extract... exiting 10:01:44 FATAL - Running post_fatal callback... 10:01:44 FATAL - Exiting -1 10:01:44 INFO - Running post-action listener: _resource_record_post_action 10:01:44 INFO - Running post-run listener: _resource_record_post_run 10:01:44 INFO - Running post-run listener: _upload_blobber_files 10:01:44 INFO - Blob upload gear active. 10:01:44 WARNING - Blob upload directory does not exist! The TypeError should be fixed in case it hangs up any future devs who have, for instance, borrowed a slave from releng.
I think I have an idea of what's happening. We removed a self.fatal() within the catch here: http://hg.mozilla.org/build/mozharness/rev/68dc075549a2 So you must have hit the exception, and thus formatted message, and then mh tried to format message again after it hit 'if missing:' anyway, I don't really see the point in what we had as it feels like we were trying to determine twice if we needed the installer_url and test_url. this patch removes duplicate efforts that were not independent from one another.
Attachment #8557407 - Flags: review?(catlee)
Comment on attachment 8557407 [details] [diff] [review] 150130_post_read_buildbot_config_format_exception-mh.patch Review of attachment 8557407 [details] [diff] [review]: ----------------------------------------------------------------- <stamp>
Attachment #8557407 - Flags: review?(catlee) → review+
Comment on attachment 8557407 [details] [diff] [review] 150130_post_read_buildbot_config_format_exception-mh.patch ty, on default: https://hg.mozilla.org/build/mozharness/rev/487aaf3b0ea6
Attachment #8557407 - Flags: checked-in+
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: