Closed Bug 1145593 Opened 9 years ago Closed 9 years ago

Upload mozharness logs to s3

Categories

(Release Engineering :: Applications: MozharnessCore, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mshal, Assigned: mshal)

References

Details

Attachments

(1 file)

We should upload mozharness build logs to s3 when it is uploading the build artifacts. Although this won't be the full buildbot logs, it at least gets us something useful attached to the task.
Attached patch upload-mh-logsSplinter Review
Turns out we do need the setLevel call on the file handlers, otherwise things like log_critical.log end up with all levels in them. The console handler was the one I needed to remove the setLevel call in bug 1135250.
Attachment #8580684 - Flags: review?(jlund)
Comment on attachment 8580684 [details] [diff] [review]
upload-mh-logs

Review of attachment 8580684 [details] [diff] [review]:
-----------------------------------------------------------------

::: mozharness/mozilla/building/buildbase.py
@@ +1330,5 @@
>          if not files:
> +            self.warning('No files from the build system to upload to S3: uploadFiles property is missing or empty.')
> +
> +        # Also upload our mozharness log files
> +        files.extend([os.path.join(self.log_obj.abs_log_dir, x) for x in self.log_obj.log_files.values()])

so this will have one side effect in that we will also be uploading localconfig.json. this is a dump of whatever self.config ends up being for the live script run. So this could be a good or unwanted thing for you. I think it's safe since your create_artifact mime_types supports json: http://mxr.mozilla.org/build/source/mozharness/mozharness/base/script.py#1282
Attachment #8580684 - Flags: review?(jlund) → review+
(In reply to Jordan Lund (:jlund) from comment #2)
> so this will have one side effect in that we will also be uploading
> localconfig.json. this is a dump of whatever self.config ends up being for
> the live script run. So this could be a good or unwanted thing for you. I
> think it's safe since your create_artifact mime_types supports json:
> http://mxr.mozilla.org/build/source/mozharness/mozharness/base/script.py#1282

We chatted in IRC, but it seems localconfig.json doesn't get added to the list of loggers, so it isn't uploaded as a separate file. We also discussed that it may be better to just upload log_info.log rather than each separate log file, so that's something we'll have to investigate.
Is there a reason why we want to do this if we're doing bug 1100624? I always found it strange that we had the mozharness logs _plus_ the buildbot logs on FTP. I've never seen anyone use the Mozharness logs.

Maybe we need this when we move to TC if it doesn't do higher level log management like Buildbot?
We were looking to have some logs associated with the buildbot tasks, so that the package files and log files are in the same place. TC has its own logs that get attached to the task, but for this buildbot bridge we don't have taskcluster logs. Attaching the actual buildbot logs is a bit more of a pain, since we'd have to copy the TC uploading code to buildbotcustom or the build master somewhere. You're probably right that the mozharness logs aren't as useful as the buildbot ones, but it's hopefully a temporary thing until TC runs the show. Then we can stop uploading mozharness logs if they're not useful and just use the TC logs.
Status: NEW → RESOLVED
Closed: 9 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: