Merge lp://qastaging/~adam-collard/tarmac/milestone-filter-by-series into lp://qastaging/tarmac

Proposed by Adam Collard
Status: Rejected
Rejected by: Adam Collard
Proposed branch: lp://qastaging/~adam-collard/tarmac/milestone-filter-by-series
Merge into: lp://qastaging/tarmac
Diff against target: 208 lines (+36/-33)
2 files modified
tarmac/plugins/bugresolver.py (+13/-12)
tarmac/plugins/tests/test_bugresolver.py (+23/-21)
To merge this branch: bzr merge lp://qastaging/~adam-collard/tarmac/milestone-filter-by-series
Reviewer Review Type Date Requested Status
dobey Needs Fixing
Chris Glass (community) Approve
Данило Шеган (community) Approve
Review via email: mp+278946@code.qastaging.launchpad.net

Description of the change

When setting the milestone, only look for milestones which match the series that the bug has been committed on.

To post a comment you must log in.
Revision history for this message
Данило Шеган (danilo) wrote :

LGTM (tests, lint all pass as well). FWIW, the default collections batch size LP seems to use is 75 items, so this is needed when you've got more milestones than that.

review: Approve
Revision history for this message
Chris Glass (tribaal) wrote :

+1 !

review: Approve
435. By Adam Collard

No need to walk next_collection links

Revision history for this message
dobey (dobey) wrote :
Download full text (10.2 KiB)

Running the tests with ./run-tests in the tree on my 14.04 system, There are 2 failures and 9 errors:

======================================================================
ERROR: test__find_milestone_no_dates (tarmac.plugins.tests.test_bugresolver.BugResolverTests)
tarmac.plugins.tests.test_bugresolver.BugResolverTests.test__find_milestone_no_dates
----------------------------------------------------------------------
_StringException: Empty attachments:
  log

Traceback (most recent call last):
  File "/home/dobey/Projects/canonical/tarmac/milestone-filter-by-series/tarmac/plugins/tests/test_bugresolver.py", line 233, in test__find_milestone_no_dates
    milestones = list(self.plugin._find_milestones(self.series[1]))
  File "/home/dobey/Projects/canonical/tarmac/milestone-filter-by-series/tarmac/plugins/bugresolver.py", line 116, in _find_milestones
    if milestone.name == default:
AttributeError: 'int' object has no attribute 'name'

======================================================================
ERROR: test__find_milestone_specific_negative (tarmac.plugins.tests.test_bugresolver.BugResolverTests)
tarmac.plugins.tests.test_bugresolver.BugResolverTests.test__find_milestone_specific_negative
----------------------------------------------------------------------
_StringException: Empty attachments:
  log

Traceback (most recent call last):
  File "/home/dobey/Projects/canonical/tarmac/milestone-filter-by-series/tarmac/plugins/tests/test_bugresolver.py", line 226, in test__find_milestone_specific_negative
    milestones = list(self.plugin._find_milestones(self.series[0]))
  File "/home/dobey/Projects/canonical/tarmac/milestone-filter-by-series/tarmac/plugins/bugresolver.py", line 116, in _find_milestones
    if milestone.name == default:
AttributeError: 'int' object has no attribute 'name'

======================================================================
ERROR: test__find_target_milestone_between (tarmac.plugins.tests.test_bugresolver.BugResolverTests)
tarmac.plugins.tests.test_bugresolver.BugResolverTests.test__find_target_milestone_between
----------------------------------------------------------------------
_StringException: Empty attachments:
  log

Traceback (most recent call last):
  File "/home/dobey/Projects/canonical/tarmac/milestone-filter-by-series/tarmac/plugins/tests/test_bugresolver.py", line 184, in test__find_target_milestone_between
    self.milestone_past.date_targeted + timedelta(weeks=1))
  File "/home/dobey/Projects/canonical/tarmac/milestone-filter-by-series/tarmac/plugins/bugresolver.py", line 142, in _find_target_milestone
    if milestone.date_targeted is None:
AttributeError: 'int' object has no attribute 'date_targeted'

======================================================================
ERROR: test__find_target_milestone_lexical_sort_past_dates (tarmac.plugins.tests.test_bugresolver.BugResolverTests)
tarmac.plugins.tests.test_bugresolver.BugResolverTests.test__find_target_milestone_lexical_sort_past_dates
----------------------------------------------------------------------
_StringException: Empty attachments:
  log

Traceback (most recent call last):
  File "/home/dobey/Projects/canonical/tar...

review: Needs Fixing

Unmerged revisions

435. By Adam Collard

No need to walk next_collection links

434. By Adam Collard

fix lint

433. By Adam Collard

Filter by series

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches