mozilla / mozmill-ci

[OBSOLETE] Mozmill CI system driven by Mozilla Pulse and Jenkins
https://wiki.mozilla.org/QA/Automation/Projects/Mozmill_Automation/Mozmill_CI
20 stars 18 forks source link

Remove any calls of add_revision_hash() #839

Closed whimboo closed 7 years ago

whimboo commented 7 years ago

As I read on bug 1257602 we should remove all calls to add_revision_hash(). The only place where we are submitting results are here:

https://github.com/mozilla/mozmill-ci/blob/6a4372c0e78ab491a466d2c5284b67b6f1a59e90/jenkins-master/jobs/scripts/workspace/submission.py#L120

What does it mean to get_resultsets()? Can we get rid of this too in all those places and query the revision directly?

https://github.com/mozilla/mozmill-ci/search?l=Python&q=get_resultsets&utf8=%E2%9C%93

@edmorley I would appreciate some feedback so that I can make the necessary changes.

wlach commented 7 years ago

If you're running tests against a repository which is already having revisions stored in treeherder, you should be able to just add the full 40 character revision as a piece of job metadata. Here's an example from servo-perf:

https://github.com/shinglyu/servo-perf/blob/master/submit_to_perfherder.py#L115

I would also guess you can just kill the calls to get_resultsets as well.

whimboo commented 7 years ago

We are still running tests for esr45. I assume that this is the only repository which cannot handle the 40 char revision yet?

wlach commented 7 years ago

Any repository can handle the 40 character revision.

whimboo commented 7 years ago

A great. So lets see that we can get this fixed!

whimboo commented 7 years ago

@wlach what is the alternative in using get_resultsets() nowaday? I cannot really find something in the treeherder client 3.0.0.

wlach commented 7 years ago

get_resultsets() is still there. However, you shouldn't need it anymore (I don't think). Just submit the textual revision with your job data and you should be good to go.

whimboo commented 7 years ago

The cases I'm referring to here are more about retrieving data from Treeherder: https://github.com/mozilla/mozmill-ci/search?l=Python&q=get_resultsets&utf8=%E2%9C%93

Like a list of build jobs for a branch up to a specific revision.

wlach commented 7 years ago

Ok, that seems reasonable. get_resultsets should still work for that, let me know if it doesn't.

whimboo commented 7 years ago

It works fine, and means I have a PR to upload now. Thanks for your assistance!

whimboo commented 7 years ago

PR #842 landed on master. I will push it to staging soon once the fix for issue #843 has been landed too.

whimboo commented 7 years ago

I have to reopen because I missed to update a line for the actual submission code which results in:

File "submission.py", line 166, in submit
  urljoin('{0}://{1}'.format(self.client.protocol, self.client.host),
AttributeError: 'TreeherderClient' object has no attribute 'protocol'

I will have a bustage fix available in a minute.

whimboo commented 7 years ago

PR #845 got merged. I will land on staging in a moment.