ValueError in report json

Bug #1204899 reported by Curtis Hovey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
charmworld
Fix Released
High
Abel Deuring

Bug Description

Staging is unhappy with a recent change landed to fix report data date handling

2013-07-25 11:50:23 [19027] [ERROR] http://staging.jujucharms.com/reports/charm-contributors.json
Traceback (most recent call last):
  ...
  File "/home/webops_deploy/charmworld/charmworld/views/reports.py", line 31, in json_contributor_growth
    return report_catalog.series_charm_authors(request.db).records()
  File "/home/webops_deploy/charmworld/charmworld/reports.py", line 223, in series_charm_authors
    categorize_contributor(change['committer']))
  File "/home/webops_deploy/charmworld/charmworld/reports.py", line 136, in increment
    self._increment_subsequent(date, category)
  File "/home/webops_deploy/charmworld/charmworld/reports.py", line 141, in _increment_subsequent
    raise ValueError(date)
ValueError: 978307343.151

Tags: oops

Related branches

Revision history for this message
Curtis Hovey (sinzui) wrote :

That failed date is 2001-01-01 which is dubious

It predates Juju, Ensamble, and Bazaar. This date might be a fail over value. The dates come from charm.changes[-1] which is fundamentally flawed because the changes list only contains the last 10 changes. charm.date_created is the most accurate guess of when a charm was created.

Revision history for this message
Curtis Hovey (sinzui) wrote :

This is a user data issue in a branch. The code cannot assume that the bzr revision changes are sane: this oops is caused by revision 29 of http://staging.jujucharms.com/~mark-mims/precise/apache2 . We can see that r29 happens between r30 and r28, both of which happened on 2012/12/12.

$ bzr log -r 29
------------------------------------------------------------
revno: 29
committer: Sidnei da Silva <XXX>
branch nick: apache2
timestamp: Sun 2000-12-31 22:02:23 -0200
message:
  - Oops, should have been sitenames.

The proper fix might be to make series_charm_authors() catch the ValueError and ignore the item.

Abel Deuring (adeuring)
Changed in charmworld:
status: Triaged → Fix Committed
assignee: nobody → Abel Deuring (adeuring)
Curtis Hovey (sinzui)
Changed in charmworld:
status: Fix Committed → 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.