Per team/project charts are broken

Bug #911433 reported by Guilherme Salgado
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro patch metrics
Fix Released
High
Guilherme Salgado
Changed in linaro-patchmetrics:
assignee: nobody → Guilherme Salgado (salgado)
importance: Undecided → High
status: New → Triaged
Changed in linaro-patchmetrics:
milestone: none → 12.01
Revision history for this message
Guilherme Salgado (salgado) wrote :

We already have a failing test for this. If only we had something configured to run all tests on a daily basis, we'd have found this a bit earlier. :)

======================================================================
FAIL: test_get_patches_per_month_up_to (patchmetrics.tests.models.TestChartHelpers)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/salgado/devel/patchwork/apps/patchmetrics/tests/models.py", line 142, in test_get_patches_per_month_up_to
    self.assertEqual([(last_month.month, 1), (now.month, 2)], submitted)
AssertionError: Lists differ: [(12, 1), (1, 2)] != []

First list contains 2 additional elements.
First extra element 0:
(12, 1)

- [(12, 1), (1, 2)]
+ []

Revision history for this message
Guilherme Salgado (salgado) wrote :
Changed in linaro-patchmetrics:
status: Triaged → In Progress
Revision history for this message
Guilherme Salgado (salgado) wrote :
Revision history for this message
Данило Шеган (danilo) wrote :

Looks good. We really need to set up pre-commit hooks running tests automatically (or at least periodically).

Revision history for this message
Данило Шеган (danilo) wrote :

Actually, wasn't the previous code checking including the entire current month (i.e. <= (year, month)), and this one doesn't (except for the first of the month)? Am I misreading it, though?

Revision history for this message
Guilherme Salgado (salgado) wrote : Re: [Bug 911433] Re: Per team/project charts are broken

On Wed, 2012-01-04 at 16:41 +0000, Данило Шеган wrote:
> Actually, wasn't the previous code checking including the entire current
> month (i.e. <= (year, month)), and this one doesn't (except for the
> first of the month)? Am I misreading it, though?

I think what you were missing is the fact that start_date will always be
the first second of the first day of a given month (because we want the
metrics for patches submitted between the first and last seconds of the
month). Either that or I misunderstood your question.

Changed in linaro-patchmetrics:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.