Revisionless bundle requests raise ValueError

Bug #1229179 reported by Curtis Hovey
4
This bug affects 1 person
Affects Status Importance Assigned to Milestone
charmworld
Triaged
High
Unassigned

Bug Description

I saw this error on staging. I think it should raise a NotFound error.

2013-09-23 12:57:27 [9772] [ERROR] http://staging.jujucharms.com/%7Ebac/bundle/wiki/wiki/json
Traceback (most recent call last):
  File "/home/webops_deploy/charmworld/local/lib/python2.7/site-packages/pyramid_exclog/__init__.py", line 44, in exclog_tween
    return handler(request)
  File "/home/webops_deploy/charmworld/local/lib/python2.7/site-packages/pyramid/router.py", line 161, in handle_request
    response = view_callable(context, request)
  File "/home/webops_deploy/charmworld/local/lib/python2.7/site-packages/pyramid/config/views.py", line 345, in rendered_view
    result = view(context, request)
  File "/home/webops_deploy/charmworld/local/lib/python2.7/site-packages/pyramid/config/views.py", line 491, in _requestonly_view
    response = view(request)
  File "/home/webops_deploy/charmworld/charmworld/views/bundles.py", line 122, in personal_bundle
    bundle = find_bundle(request)
  File "/home/webops_deploy/charmworld/charmworld/views/helpers.py", line 170, in find_bundle
    spec['basket_revision'] = int(rev)
ValueError: invalid literal for int() with base 10: 'wiki'

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

Another manifestation of the same error.

2013-10-11 19:14:44 [13601] [ERROR] http://staging.jujucharms.com/api/3/charm/precise/juju-gui
...
  File "/home/webops_deploy/charmworld/charmworld/views/api.py", line 497, in charm
    charm_id, trailing, charm_data = self._find_charm(path)
  File "/home/webops_deploy/charmworld/charmworld/views/api.py", line 433, in _find_charm
    query['store_data.revision'] = int(revision)
ValueError: invalid literal for int() with base 10: 'gui'

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

If we want to support versionless bundles, the failing block of code needs to get the latest version of the bundle in the basket.

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

I am now see a lot of these:
  File "/home/webops_deploy/charmworld/charmworld/views/bundles.py", line 145, in personal_bundle
    bundle = find_bundle(request)
  File "/home/webops_deploy/charmworld/charmworld/views/helpers.py", line 156, in find_bundle
    spec['basket_revision'] = int(rev)
ValueError: invalid literal for int() with base 10: 'wiki'

tags: added: bundles
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.