-
Notifications
You must be signed in to change notification settings - Fork 87
codecoverage/bot: Upload coverage data to Phabricator using arcanist autotarget #1723
Conversation
e7f702f to
0cc36c2
Compare
La0
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 😃
| ''' | ||
| Find details of a differential revision | ||
| ''' | ||
| assert rev_phid is not None or rev_id is not None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably be a XOR
| rev_data = phabricator.load_revision(rev_id=rev_id) | ||
| phabricator.upload_coverage_results(rev_data['fields']['diffPHID'], coverage) | ||
| # XXX: This is only necessary until https://bugzilla.mozilla.org/show_bug.cgi?id=1487843 is resolved. | ||
| phabricator.upload_lint_results(rev_data['fields']['diffPHID'], 'pass', []) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So you already had the implementation but were not using it ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, for a few months 😄
| params = json.loads(urllib.parse.parse_qs(call.request.body)['params'][0]) | ||
| assert params['buildTargetPHID'] == 'PHID-HMBT-test' | ||
| assert params['type'] == 'pass' | ||
| assert params['unit'] == [{'name': 'Aggregate coverage information', 'result': 'pass', 'coverage': {'file': 'NUCCCCU'}}] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
0cc36c2 to
c5fbc1c
Compare
This is a temporary implementation until https://bugzilla.mozilla.org/show_bug.cgi?id=1487843 is resolved. The implementation won't change much after that, so most of the code will still be useful.