Closed Bug 1169652 Opened 9 years ago Closed 9 years ago

Don't fail if oauth.txt doesn't exist

Categories

(Release Engineering :: Applications: MozharnessCore, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: dustin, Assigned: dustin)

References

Details

Even if the upload-files action (bug 1168612) is disabled, mozharness still tries to open this file and issues a WARNING if it can't be found. Mozharness then spots the WARNING and, despite completing the build, exits with status 1. I think.
Blocks: 1118394
From https://s3-us-west-2.amazonaws.com/taskcluster-public-artifacts/lpw5-FFUTtOQBvt8pv2-vA/0/public/logs/live_backing.log, referenced in bug 1168612 comment 36: 17:37:42 WARNING - Unable to start influxdb recording: Traceback (most recent call last): 17:37:42 WARNING - File "/home/worker/mozharness/mozharness/base/python.py", line 580, in influxdb_recording_init 17:37:42 WARNING - execfile(auth, credentials) 17:37:42 WARNING - IOError: [Errno 2] No such file or directory: '/home/worker/oauth.txt' but the mach error is 17:58:29 INFO - mkdir -p '/home/worker/workspace/build/src/obj-firefox/addon-sdk/source/test/addons/' 17:58:29 INFO - mkdir: cannot create directory '/home/worker/workspace/build/src/obj-firefox/addon-sdk/source/test/addons/': No such file or directory 17:58:29 INFO - make[5]: *** [/home/worker/workspace/build/src/obj-firefox/addon-sdk/source/test/addons/.mkdir.done] Error 1 17:58:29 INFO - make[5]: Leaving directory `/home/worker/workspace/build/src/obj-firefox/addon-sdk' 17:58:29 INFO - make[4]: *** [addon-sdk/misc] Error 2 It's hard to see how those are linked, but I've been wrong before.. Morgan, do you see the link?
Flags: needinfo?(winter2718)
I ran a build with more verbose output from mozharness, here's where the error comes from: 16:52:33 INFO - 20150601162253 16:52:33 DEBUG - rmtree: tmpfile_stderr 16:52:33 DEBUG - retry: Calling remove with args: ('tmpfile_stderr',), kwargs: {}, attempt #1 16:52:33 DEBUG - rmtree: tmpfile_stdout 16:52:33 DEBUG - retry: Calling remove with args: ('tmpfile_stdout',), kwargs: {}, attempt #1 16:52:33 DEBUG - Return code: 0 16:52:33 INFO - buildid from application.ini: "20150601162253". buildid from buildbot properties: "20150601162253" 16:52:33 INFO - buildids match. 16:52:33 INFO - Running post-action listener: influxdb_recording_post_action 16:52:33 INFO - Running post-action listener: record_mach_stats 16:52:33 FATAL - Uncaught exception: Traceback (most recent call last): 16:52:33 FATAL - File "/home/worker/mozharness/mozharness/base/script.py", line 1288, in run 16:52:33 FATAL - self.run_action(action) 16:52:33 FATAL - File "/home/worker/mozharness/mozharness/base/script.py", line 1231, in run_action 16:52:33 FATAL - self._possibly_run_method("postflight_%s" % method_name) 16:52:33 FATAL - File "/home/worker/mozharness/mozharness/base/script.py", line 1171, in _possibly_run_method 16:52:33 FATAL - return getattr(self, method_name)() 16:52:33 FATAL - File "/home/worker/mozharness/mozharness/mozilla/building/buildbase.py", line 1635, in postflight_build 16:52:33 FATAL - self.upload_files() 16:52:33 FATAL - File "/home/worker/mozharness/mozharness/mozilla/building/buildbase.py", line 1350, in upload_files 16:52:33 FATAL - execfile(auth, credentials) 16:52:33 FATAL - IOError: [Errno 2] No such file or directory: '/home/worker/oauth.txt' 16:52:33 FATAL - Running post_fatal callback... ADDING A FAILURE FROM def _post_fatal 16:52:33 ERROR - setting return code to 2 because fatal was called 16:52:33 FATAL - Exiting -1 16:52:33 INFO - Running post-run listener: _summarize ('ADDING ERROR worst_level changing return code to %s', 'FAILURE') Traceback (most recent call last): File "/home/worker/mozharness/mozharness/base/script.py", line 1288, in run self.run_action(action) File "/home/worker/mozharness/mozharness/base/script.py", line 1231, in run_action self._possibly_run_method("postflight_%s" % method_name) File "/home/worker/mozharness/mozharness/base/script.py", line 1171, in _possibly_run_method return getattr(self, method_name)() File "/home/worker/mozharness/mozharness/mozilla/building/buildbase.py", line 1635, in postflight_build self.upload_files() File "/home/worker/mozharness/mozharness/mozilla/building/buildbase.py", line 1350, in upload_files execfile(auth, credentials) IOError: [Errno 2] No such file or directory: '/home/worker/oauth.txt'
Flags: needinfo?(winter2718)
OK, thanks! That will actually work just fine -- the TC build job has --no-upload-files, so upload_files won't be run. Still, that code could probably do a bit better job with the error handling
What am I saying -- that error is pretty accurate!
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.