The default bug view has changed. See this FAQ.

balrog throws ISE 500 instead of 400 when data_version is wrong

RESOLVED FIXED

Status

Release Engineering
Balrog: Backend
RESOLVED FIXED
2 years ago
a year ago

People

(Reporter: bhearsum, Assigned: Ashish Sareen, Mentored)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

2 years ago
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")
(Reporter)

Updated

a year ago
Mentor: bhearsum@mozilla.com
(Reporter)

Comment 1

a year ago
This is being worked on by a contributor, not sure if they have a Bugzilla account though. Assigning to myself to avoid confusion.
Assignee: nobody → bhearsum
(Reporter)

Updated

a year ago
Assignee: bhearsum → ashish.sareen95

Comment 2

a year ago
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
(Reporter)

Comment 3

a year ago
This landed in production today. Thanks for the patch!
Status: NEW → RESOLVED
Last Resolved: a year ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.