Closed Bug 1108029 Opened 10 years ago Closed 9 years ago

Add utility to python client for uploading files with PUT requests in utils.py

Categories

(Taskcluster :: General, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jhford, Unassigned)

References

Details

Attachments

(1 file)

We should support uploading files to a URI (likely a signed URL) from the taskcluster python client.  It should have an exponential backoff retry for failures.

The method signature should be:

def putFile(filename, uri, contentType):
Just to clarify it should be exposed as:

import taskcluster
taskcluster.utils.putFile("my-file.txt", putUrl, 'text/plain')

----
I've CC'ed mshal as he probably wants to use this utility method for uploading artifacts, once it's implemented. That way he'll have proper retry logic for free.
Blocks: 1100624
Attached file First pass at putFile
Attachment #8536840 - Flags: review?(jhford)
Blocks: 1112252
I've updated the pull request - can you guys take a look?
Comment on attachment 8536840 [details] [review]
First pass at putFile

Looks like the PR was merged.
Attachment #8536840 - Flags: review?(jhford) → review+
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Component: TaskCluster → General
Product: Testing → Taskcluster
Target Milestone: --- → mozilla41
Version: unspecified → Trunk
Resetting Version and Target Milestone that accidentally got changed...
Target Milestone: mozilla41 → ---
Version: Trunk → unspecified
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: