Skip to content
This repository was archived by the owner on Nov 11, 2019. It is now read-only.

Conversation

@marco-c
Copy link
Collaborator

@marco-c marco-c commented Nov 30, 2018

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.

@marco-c marco-c requested review from La0 and garbas as code owners November 30, 2018 14:57
@marco-c marco-c force-pushed the upload_to_phabricator_2 branch 3 times, most recently from e7f702f to 0cc36c2 Compare December 4, 2018 19:35
Copy link
Contributor

@La0 La0 left a 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
Copy link
Contributor

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', [])
Copy link
Contributor

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 ?

Copy link
Collaborator Author

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'}}]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@marco-c marco-c force-pushed the upload_to_phabricator_2 branch from 0cc36c2 to c5fbc1c Compare December 11, 2018 11:16
@marco-c marco-c merged commit c20c755 into mozilla:master Dec 11, 2018
@marco-c marco-c deleted the upload_to_phabricator_2 branch December 11, 2018 12:11
marco-c added a commit that referenced this pull request Dec 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants