Closed Bug 1174892 Opened 9 years ago Closed 9 years ago

Gaiatest needs to be updated for treeherder client changes


(Firefox OS Graveyard :: Gaia::UI Tests, defect)

Gonk (Firefox OS)
Not set


(Not tracked)



(Reporter: wlach, Assigned: martijn.martijn)



(3 files)

This code needs to be updated for changes in treeherder client:

TreeherderRequest no longer exists. You create a TreeherderClient object, then call post_collection on it.

The syntax is pretty similar, you just want to do something like this:

client = TreeherderClient(protocol='https', host='')
client.post_collection('mozilla-central', 'oauth_key', 'oauth_secret', tac)

For more details see:

For the future, it's probably best to peg the version of treeherder-client used to insulate gaiatest from future changes. I try not to break the API, but in certain cases it might be necessary (in the case the changes were part of a refactoring to allow treeherder-client to also be used to pull data down from a running treeherder instance)

I don't know who should be working on this, NEEDINFO'ing davehunt
Flags: needinfo?(dave.hunt)
gaiatest is currently pinned to treeherder-client 0.1 as seen here:

I don't think we're currently using gaiatest to report to Treeherder, so this might not be needed. Deferring to mwargers and geo as they're working on gaiatest these days.
Flags: needinfo?(martijn.martijn)
Flags: needinfo?(gmealer)
Flags: needinfo?(dave.hunt)
If the code's in there, we should probably keep it correct, though the urgency is lower for it not being used right now. 

There's also an outstanding task for having a sanity suite that runs post-package but reports to Treeherder, so it's possible this comes back into play soon.
Flags: needinfo?(martijn.martijn)
Flags: needinfo?(gmealer)
Assignee: nobody → jdorlus
So like this?
Attachment #8629420 - Flags: review?(wlachance)
Comment on attachment 8629420 [details] [review]

Yup, that should work. It's identical to the type of code we use in production, anyway, e.g.:
Attachment #8629420 - Flags: review?(wlachance) → review+
I had to replace the TreeherderRequest import for TreeherderClient to get the Gaia UI tests running on Treeherder try, correctly.
Comment on attachment 8629420 [details] [review]

Johan, do you think it's ok to change the treeherder-client requirements to 1.5 like that. I've had some bad experience with the requirements.txt file and I don't really know well how this is supposed to work, so I'm a bit wary of just merging the pull request in (although I think it should be ok).
Attachment #8629420 - Flags: feedback?(jlorenzo)
Hey, Martijn. I think you should assign the bug to yourself since you wrote the patch.
Assignee: jdorlus → martijn.martijn
Comment on attachment 8629420 [details] [review]

I don't have a treeherder key to test the whole changeset. However, the installation of treeherder-client 1.5 went fine on my computer. I'd recommend to keep the == here. if used >=, we could face some API breakages, like the one we have here.
Attachment #8629420 - Flags: feedback?(jlorenzo) → feedback+
Closed: 9 years ago
Resolution: --- → FIXED
Comment on attachment 8634196 [details] [review]
[gaia] mwargers:1174892_v2.2 > mozilla-b2g:v2.2

Someone also needed this for v2.1, so doing that now. I might as well do v2.2 then.
Attachment #8634196 - Flags: review?(wlachance)
Attachment #8634199 - Flags: review?(wlachance)
Attachment #8634196 - Flags: review?(wlachance) → review+
Attachment #8634199 - Flags: review?(wlachance) → review+
You need to log in before you can comment on or make changes to this bug.