Last Comment Bug 1134190 - balrog throws ISE 500 instead of 400 when data_version is wrong
: balrog throws ISE 500 instead of 400 when data_version is wrong
Status: RESOLVED FIXED
:
Product: Release Engineering
Classification: Other
Component: Balrog: Backend (show other bugs)
: unspecified
: x86_64 Linux
-- normal (vote)
: ---
Assigned To: Ashish Sareen
: Ben Hearsum (:bhearsum)
:
Mentors: Ben Hearsum (:bhearsum)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-02-18 06:28 PST by Ben Hearsum (:bhearsum)
Modified: 2016-03-21 07:51 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments

Description User image Ben Hearsum (:bhearsum) 2015-02-18 06:28:21 PST
I noticed this a few days ago while showing off the Admin interface to FxOS QA. Easily reproducable by opening the UI in two tabs, making a change in one, and then trying to make a change to the same rule or release in the other. Sentry shows this as the error:


OutdatedDataError: Failed to update row, old_data_version doesn't match current data_version

Stacktrace (most recent call last):

  File "flask/app.py", line 1817, in wsgi_app
    response = self.full_dispatch_request()
  File "flask/app.py", line 1477, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "flask/app.py", line 1381, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "flask/app.py", line 1475, in full_dispatch_request
    rv = self.dispatch_request()
  File "flask/app.py", line 1461, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "flask/views.py", line 84, in view
    return self.dispatch_request(*args, **kwargs)
  File "flask/views.py", line 149, in dispatch_request
    return meth(*args, **kwargs)
  File "auslib/admin/views/base.py", line 57, in put
    return self._put(*args, transaction=trans, **kwargs)
  File "auslib/admin/views/base.py", line 57, in put
    return self._put(*args, transaction=trans, **kwargs)
  File "auslib/admin/views/base.py", line 18, in decorated
    return f(*args, changed_by=username, **kwargs)
  File "auslib/admin/views/rules.py", line 168, in _post
    old_data_version=form.data_version.data, transaction=transaction)
  File "auslib/db.py", line 777, in updateRule
    self.update(changed_by=changed_by, where=where, what=what, old_data_version=old_data_version, transaction=transaction)
  File "auslib/db.py", line 417, in update
    return self._prepareUpdate(transaction, where, what, changed_by, old_data_version)
  File "auslib/db.py", line 388, in _prepareUpdate
    raise OutdatedDataError("Failed to update row, old_data_version doesn't match current data_version")
Comment 1 User image Ben Hearsum (:bhearsum) 2016-03-17 07:25:22 PDT
This is being worked on by a contributor, not sure if they have a Bugzilla account though. Assigning to myself to avoid confusion.
Comment 2 User image [github robot] 2016-03-21 05:27:47 PDT
Commit pushed to master at https://github.com/mozilla/balrog

https://github.com/mozilla/balrog/commit/c1c97604bafe9e5dd36c17a928c33c783adac56c
Merge pull request #60 from aksareen/master

Bug 1134190 - balrog throws ISE 500 instead of 400 when data_version is wrong. r=bhearsum
Comment 3 User image Ben Hearsum (:bhearsum) 2016-03-21 07:51:46 PDT
This landed in production today. Thanks for the patch!

Note You need to log in before you can comment on or make changes to this bug.