Closed Bug 1218222 Opened 10 years ago Closed 10 years ago

Autophone - migrate to using per-user Hawk credentials for Treeherder

Categories

(Testing Graveyard :: Autophone, defect)

defect
Not set
normal

Tracking

(firefox44 affected)

RESOLVED FIXED
Tracking Status
firefox44 --- affected

People

(Reporter: bc, Assigned: emorley)

References

Details

Attachments

(3 files)

We need to transition from the old system of specifying credentials to the new per-user Hawk credentials.
To use the new credentials, you'll need treeherder-client>=1.8.0 When transitioning from treeherder-client 1.6.0 to 1.8.0, add_build_url() no longer exists, so the call here will need to be removed: https://github.com/mozilla/autophone/blob/3a896456a8128f755de1a73aaafd15f3c5598d6f/autophonetreeherder.py#L173
The TreeherderAuth class no longer exists, so references to that need to be removed: https://github.com/mozilla/autophone/blob/3a896456a8128f755de1a73aaafd15f3c5598d6f/autophonetreeherder.py#L84-L86 ...and instead the client_id and secret (which are the same for all repositories) passed to TreeherderClient like so: http://treeherder.readthedocs.org/submitting_data.html#authentication Hope that helps :-)
Before this merges, the credentials file will need to have top-level "client_id" and "secret" keys added. Once this is in production, the old per-repo credentials can then be removed from the credentials file.
Assignee: nobody → emorley
Status: NEW → ASSIGNED
Attachment #8681298 - Flags: review?(bob)
Ed: Thanks for this. There is additional work that will need to be done to change the autophone.py command line options, how the options are handled and how the credentials are handled. The treeherder credentials file will go away and the client_id and secret will be kept in the same credentials ini file as s3, phonedash and pulse. Do you want to carry this over the finish line or would you like me to complete it? This is a great start and I really appreciate it. I can make the necessary changes and test them out and deploy Monday if that fits with your schedule. Hawk credentials are supported on Treeherder staging and production right now? I don't believe autophone.qa.mtv2.mozilla.com/10.252.73.89 has access to server 10.22.75.4{0,1} so we will need to get the network acls opened up for the QA lab if we need to fix the time on the host. Currently the autophone host is running 10.8.5 and is accurately synced on time. In the near future it will be moving to Linux. I don't think we need worry about the time.
Flags: needinfo?(emorley)
You're welcome :-) Happy for you to take over to do the refactor. Hawk auth is supported on stage+prod at the moment. I've marked your prod and stage credentials as approved; though I've renamed both to `autophone` to match the others, since we don't need to namespace for stage/prod since they are entirely different credentials systems. Let me know if there's anything more I can do to help.
Flags: needinfo?(emorley)
Changed the staging client_id to autophone_bclary , since they are used for local development (and so per-user) rather than an official autophone staging instance (like taskcluster uses etc).
Comment on attachment 8681298 [details] [review] Submit results to Treeherder's API using Hawk credentials I made some changes in a follow up, but this looks good.
Attachment #8681298 - Flags: review?(bob) → review+
Comment on attachment 8682049 [details] [review] https://github.com/mozilla/autophone/pull/48 lots of cleanup on cli text! I am not 100% certain of the treeherder client usage, the logic and code looks pretty good.
Attachment #8682049 - Flags: review?(jmaher) → review+
Depends on: 1220762
Product: Testing → Testing Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: