Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to Buildhub2 (#6) #7

Merged
merged 3 commits into from
Jul 4, 2019
Merged

Switch to Buildhub2 (#6) #7

merged 3 commits into from
Jul 4, 2019

Conversation

willkg
Copy link
Member

@willkg willkg commented Jul 2, 2019

This switches build data acquisition to use Buildhub2.

I was able to run the tests, but I wasn't able to run the app. It needs a database and I don't have that set up locally. But based on other migrations I've done, I think this will work.

Fixes #6.

willkg added 2 commits July 2, 2019 10:53
This switches build data acquisition to use Buildhub2.
@willkg
Copy link
Member Author

willkg commented Jul 2, 2019

How curious--the tests seem to pass locally. I'll look into the buildhub ones. I think at least one of them is because release candidate builds have the same version as the final release, so if you request by version string, then you get multiple build ids.

======================================================================
ERROR: test_get_two_last (test_buildhub.BuildhubTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/mozilla/crash-clouseau/tests/test_buildhub.py", line 40, in test_get_two_last
    self.assertEqual(res[0], {'buildid': '20180131100700',
TypeError: 'NoneType' object is not subscriptable

======================================================================
ERROR: test (test_java.JavaTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/mozilla/crash-clouseau/tests/test_java.py", line 35, in test
    java_files = java.get_all_java_files(sleep=0.5, retry=10)
  File "/home/travis/build/mozilla/crash-clouseau/crashclouseau/java.py", line 139, in get_all_java_files
    sha = get_sha('mobile', 'android')
  File "/home/travis/build/mozilla/crash-clouseau/crashclouseau/java.py", line 118, in get_sha
    raise Exception('Too many attempts in java.get_sha (retry={})'.format(retry))
Exception: Too many attempts in java.get_sha (retry=10)
======================================================================
FAIL: test_get (test_buildhub.BuildhubTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/mozilla/crash-clouseau/tests/test_buildhub.py", line 13, in test_get
    self.assertEqual(set(res.keys()), {'FennecAndroid', 'Firefox', 'Thunderbird'})
AssertionError: Items in the second set but not the first:
'Thunderbird'
'FennecAndroid'
'Firefox'
======================================================================
FAIL: test_get_enclosing_builds (test_buildhub.BuildhubTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/mozilla/crash-clouseau/tests/test_buildhub.py", line 54, in test_get_enclosing_builds
    'version': '60.0a1'}])
AssertionError: Lists differ: [None, None] != [{'buildid': '20180205220102', 'revision':[113 chars]a1'}]
First differing element 0:
None
{'buildid': '20180205220102', 'revision': '0d806b3230fe', 'version': '60.0a1'}
- [None, None]
+ [{'buildid': '20180205220102', 'revision': '0d806b3230fe', 'version': '60.0a1'},
+  {'buildid': '20180206100151', 'revision': 'f1a4b64f19b0', 'version': '60.0a1'}]

Some things were escaped for Python strings, but since I made the strings
raw strings, we don't need the Python string escapes anymore.
@willkg
Copy link
Member Author

willkg commented Jul 4, 2019

^^^ That fixes all the tests. I had run them, everything passed, then hit linting errors, fixed the linting errors by making the strings raw strings but forgot to look at the escapes and remove the Python string escapes. Bah.

@codecov-io
Copy link

Codecov Report

❗ No coverage uploaded for pull request base (master@34da085). Click here to learn what that means.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master       #7   +/-   ##
=========================================
  Coverage          ?   21.79%           
=========================================
  Files             ?       24           
  Lines             ?     2202           
  Branches          ?      396           
=========================================
  Hits              ?      480           
  Misses            ?     1702           
  Partials          ?       20
Impacted Files Coverage Δ
crashclouseau/report_bug.py 0% <0%> (ø)
crashclouseau/buildhub.py 81.08% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 34da085...f00afbd. Read the comment docs.

@calixteman
Copy link
Collaborator

@willkg thx, I'll have look asap

@calixteman calixteman merged commit e683d49 into mozilla:master Jul 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

migrate to buildhub2
3 participants