Closed Bug 1385872 Opened 7 years ago Closed 7 years ago

Improper task definition can lead to generic-worker uploading twice the live.log file

Categories

(Taskcluster :: Workers, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: gerard-majax, Assigned: pmoore)

References

Details

Attachments

(1 file, 1 obsolete file)

Attached file generic-worker output (obsolete) (deleted) —
STR: 1. Push https://github.com/mozilla/tensorflow/pull/24/commits/0664ca6bc23dc95259502842c676b222ef5c6ebf Expected: Tasks completes successfully Actual: Everything gets built and uploaded as visible on https://tools.taskcluster.net/groups/O7lcPjUMR5-79WYsGZHsXA/tasks/Y7MDgCwIQo6UdGQpvOqeog/runs/1/logs/public%2Flogs%2Flive_backing.log except live.log Attached: generic-worker output
The problem looks to be: WORKER EXCEPTION due to response code 409 from Queue when uploading artifact &main.S3Artifact{BaseArtifact:(*main.BaseArtifact)(0xc4201d4600), MimeType:"text/plain; charset=utf-8", ContentEncoding:"gzip"} with CreateArtifact payload {"contentType":"text/plain; charset=utf-8","expires":"2018-07-31T12:39:42.976Z","storageType":"s3"} I'll need to see more of the log than is in the attachment, can you attach the log starting from when it first claims the task?
Flags: needinfo?(lissyx+mozillians)
Attached file more complete generic-worker log (deleted) —
Attachment #8892005 - Attachment is obsolete: true
Flags: needinfo?(lissyx+mozillians) → needinfo?(pmoore)
Thanks. The longer log contained the key information: CALL SUMMARY ============ Request Headers: http.Header{"Content-Type":[]string{"application/json"}, "Authorization":[]string{"Hawk id=\"project/taskcluster/tc-queue/production-2\", mac=\"xrDb41fgB7b07ZQKSf3hb2UOcR9h2A9L791MhfIg2Gg=\", ts=\"1501439073\", nonce=\"aS3J4F7j\", ext=\"eyJjZXJ0aWZpY2F0ZSI6eyJ2ZXJzaW9uIjoxLCJzY29wZXMiOlsicXVldWU6cmVjbGFpbS10YXNrOmJFWnYwOWl1U1ctVlJlY0VLVVc0eGcvNSIsInF1ZXVlOnJlc29sdmUtdGFzazpiRVp2MDlpdVNXLVZSZWNFS1VXNHhnLzUiLCJxdWV1ZTpjcmVhdGUtYXJ0aWZhY3Q6YkVadjA5aXVTVy1WUmVjRUtVVzR4Zy81Il0sInN0YXJ0IjoxNTAxNDM3OTE1ODQwLCJleHBpcnkiOjE1MDE0NDA5MTU2NzMsInNlZWQiOiJER1NJbWM3d1RfdU1WRDdlNjRhRExBdTZ0dkRHOE9US3VGSk1IWm1OaEhfdyIsInNpZ25hdHVyZSI6IkxubHFNa0lFOVBDenpVTTNBdnlxamVJTXFKRzFEaTJKUnhJTlI3d0gyZkE9In19\""}} Request Body: {"contentType":"text/plain; charset=utf-8","expires":"2018-07-31T12:39:42.976Z","storageType":"s3"} Response Headers: http.Header{"Strict-Transport-Security":[]string{"max-age=7776000"}, "Access-Control-Allow-Origin":[]string{"*"}, "Access-Control-Allow-Methods":[]string{"OPTIONS,GET,HEAD,POST,PUT,DELETE,TRACE,CONNECT"}, "Access-Control-Allow-Headers":[]string{"X-Requested-With,Content-Type,Authorization,Accept,Origin"}, "Content-Type":[]string{"application/json; charset=utf-8"}, "Date":[]string{"Sun, 30 Jul 2017 18:24:33 GMT"}, "X-Powered-By":[]string{"Express"}, "Connection":[]string{"keep-alive"}, "Access-Control-Request-Method":[]string{"*"}, "Content-Length":[]string{"791"}, "Via":[]string{"1.1 vegur"}, "Server":[]string{"Cowboy"}} Response Body: { "code": "RequestConflict", "message": "Artifact already exists, with different type or later expiration\n\nExisting artifact information: {\n \"storageType\": \"s3\",\n \"contentType\": \"text/plain\",\n \"expires\": \"2017-08-06T12:39:42.976Z\"\n}\n----\nmethod: createArtifact\nerrorCode: RequestConflict\nstatusCode: 409\ntime: 2017-07-30T18:24:33.906Z", "requestInfo": { "method": "createArtifact", "params": { "0": "public/logs/live_backing.log", "taskId": "bEZv09iuSW-VRecEKUW4xg", "runId": "5", "name": "public/logs/live_backing.log" }, "payload": { "contentType": "text/plain; charset=utf-8", "expires": "2018-07-31T12:39:42.976Z", "storageType": "s3" }, "time": "2017-07-30T18:24:33.906Z" } } Attempts: 1 We can see here that public/logs/live_backing.log got uploaded twice. This is because g-w uploads it once, and there was a top level "public/" artifact in the task definition. We'll need to fix this, but in the meantime there are two alternative (trivial) workarounds: 1) Write files to a different directory than "public" but you can still upload the artifacts with the same names, e.g. if you use the directory name "somethingelse" instead of public, your artifact would look like: "name": "public", "path": "somethingelse", "type": "directory" 2) Alternative to suggestion above - instead explicitly list files directly in public directory, plus subdirectories under public. This will avoid that "public/logs" gets picked up twice. This way you'll list several artifacts, rather than just one "catch all" directory artifact. So long as "public/logs" is not listed as a directory artifact, all will be ok.
Flags: needinfo?(pmoore)
Summary: uploadLog() failure → Improper task definition can lead to generic-worker uploading twice the live.log file
Depends on: 1385900
Assignee: nobody → pmoore
This was fixed in generic-worker 10.1.7.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Component: Generic-Worker → Workers
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: