mozilla/release-services

staticanalysis/bot: Taskcluster Task remains "pending" forever, even when its job is done

Closed this issue · 2 comments

These days when we run ReviewBot on staging, our Taskcluster Tasks' logs eventually finish with something like:

[taskcluster 2018-12-17 14:43:18.523Z] Successful task run with exit code: 0 completed in 934.841 seconds

However, the Task stays in "pending" state, until eventually it times out and switches to "exception" (even though the task technically finished successfully and in a timely fashion).

Examples:

The problem is caused by the way we upload our blob artifacts:

def create_blob_artifact(queue_service, task_id, run_id, path, content, content_type, ttl):

Here, we should also call completeArtifact once the artifact was uploaded successfully.

From IRC:

15:57:44 dustin> well I guess it must mean calling queue.createArtifact etc. from the task
15:58:01 bastien> dustin: yes, that's what we do.
15:58:05 dustin> in which case, if you're using the blob api, yeah, you have to finish any uploads you start
15:59:32 dustin> so you'll need to also call completeArtifact when the artifact is uploaded
16:00:58 bastien> dustin: ok, i didn't see the "NOTE: This endpoint must be called for all artifacts of storageType 'blob'" on completeArtifact

La0 commented

@jankeromnes i've assigned myself.