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

Bugzilla bugs downloader #104

Merged
merged 6 commits into from
Feb 16, 2018
Merged

Bugzilla bugs downloader #104

merged 6 commits into from
Feb 16, 2018

Conversation

ibrahimsharaf
Copy link
Collaborator

To be merged after (#103)

Part of issue (#39)

@marco-c
Copy link
Owner

marco-c commented Feb 15, 2018

Could you rebase on top of master?

@codecov-io
Copy link

codecov-io commented Feb 15, 2018

Codecov Report

Merging #104 into master will increase coverage by 0.58%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #104      +/-   ##
==========================================
+ Coverage   87.86%   88.44%   +0.58%     
==========================================
  Files          17       17              
  Lines         783      805      +22     
  Branches       92       94       +2     
==========================================
+ Hits          688      712      +24     
+ Misses         85       84       -1     
+ Partials       10        9       -1
Impacted Files Coverage Δ
tests/test_downloader.py 93.4% <100%> (+0.81%) ⬆️
crashsimilarity/downloader.py 86.23% <100%> (+3.76%) ⬆️

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 66686ec...8e74086. Read the comment docs.

def _clean_signatures(signatures):
clean_signatures = set()
for sig in signatures.split('\r\n'):
pos = sig.find('[@')
Copy link
Owner

Choose a reason for hiding this comment

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

You could do a single substring if you do something like:

start_pos = ...
end_pos = ...
if start_pos != -1 and end_pos != -1:
    ...

Copy link
Owner

Choose a reason for hiding this comment

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

Forget it, the pre-existing code was already doing this, so it's fine. We can change it later.

'o2': 'isnotempty',
'product': ['Firefox', 'Core']}

key = ('bugzilla_bugs', json.dumps(params), utils.utc_today())
Copy link
Owner

Choose a reason for hiding this comment

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

Let's remove the cache as it's premature optimization. We can add it in the future if needed.
I expect the code that is going to use this module is going to store the downloaded bugs on disk to avoid requesting the same information from Bugzilla all the time, so probably the cache won't be needed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I agree, should I only fetch bugs with multiple signatures? as bugs with single signature won't help us in testing the model?

Copy link
Owner

Choose a reason for hiding this comment

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

Let's fetch them all. In the future we might have additional ideas on how to test the model that don't require multiple signatures, so it's good to have all the data handy (hopefully it won't be a HUGE amount of data, so it should be feasible).

@marco-c marco-c merged commit 2e4e4a0 into master Feb 16, 2018
@propr
Copy link

propr bot commented Feb 16, 2018

Please provide your feedback on this pull request here.

Privacy statement: We don't store any personal information such as your email address or name. We ask for GitHub authentication as an anonymous identifier to account for duplicate feedback entries and to see people specific preferences.

@ibrahimsharaf ibrahimsharaf deleted the bugs-downloader branch February 16, 2018 00:05
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.

3 participants