Closed Bug 1174892 Opened 6 years ago Closed 6 years ago

Gaiatest needs to be updated for treeherder client changes

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: wlach, Assigned: martijn.martijn)

Details

Attachments

(3 files)

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

https://github.com/mozilla-b2g/gaia/blob/master/tests/python/gaia-ui-tests/gaiatest/mixins/treeherder.py#L249

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='treeherder.mozilla.org')
client.post_collection('mozilla-central', 'oauth_key', 'oauth_secret', tac)

For more details see:

http://treeherder.readthedocs.org/en/latest/submitting_data.html

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: https://github.com/mozilla-b2g/gaia/blob/4cbd2316b5b08f384bfe806cfd5f67c128e82462/tests/python/gaia-ui-tests/requirements.txt#L7

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]
https://github.com/mozilla-b2g/gaia/pull/30822

Yup, that should work. It's identical to the type of code we use in production, anyway, e.g.:

https://github.com/mozilla/treeherder/blob/master/treeherder/log_parser/utils.py#L108
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]
https://github.com/mozilla-b2g/gaia/pull/30822

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]
https://github.com/mozilla-b2g/gaia/pull/30822

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+
Merged: https://github.com/mozilla-b2g/gaia/commit/71682a624b2d42edf9d9d27db023a86d36314d93
Status: NEW → RESOLVED
Closed: 6 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.