Exporting task_age breaks editing over the API unless you PATCH within a second of GET

Bug #515747 reported by James Westby
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Critical
James Westby

Bug Description

Bug 510985 exported task_age, but this means that it is part of the etag
calculation. This means that the etag changes every second. This means
that if you cross a second boundary between doing the GET on a bug task
and doing a PATCH on it you get a 412. This makes editing bugs with the
API all but impossible.

Thanks,

James

Tags: lp-bugs

Related branches

Revision history for this message
Eleanor Berger (intellectronica) wrote :

In hindsight, I think adding BugTask.age wasn't such a good idea after all. It's easy to calculate it locally anyway. Let's get rid of it to unblock editing bugs using the API.

Changed in malone:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Eleanor Berger (intellectronica) wrote :

This is a candidate for CRITICAL, since it's possible many users of the API are blocked.

Changed in malone:
assignee: nobody → James Westby (james-w)
Revision history for this message
Deryck Hodge (deryck) wrote :

Agreed with Tom, we should get a CP for this branch ASAP.

Changed in malone:
importance: High → Critical
Revision history for this message
Diogo Matsubara (matsubara) wrote : Bug fixed by a commit
Changed in malone:
status: Triaged → Fix Committed
Revision history for this message
Brian Murray (brian-murray) wrote :

It isn't necessary to fix this bug but there is still a task_age property in the bugtask model. It might be a good idea to remove this to prevent it from being exported again in the future.

Revision history for this message
Eleanor Berger (intellectronica) wrote :

Brian, good idea! Feel like creating a brunch?

Revision history for this message
Graham Binns (gmb) wrote : Re: [Bug 515747] Re: Exporting task_age breaks editing over the API unless you PATCH within a second of GET

On 2 February 2010 17:40, Brian Murray <email address hidden> wrote:
> It isn't necessary to fix this bug but there is still a task_age
> property in the bugtask model.  It might be a good idea to remove this
> to prevent it from being exported again in the future.

Could we maybe export a method to get the task age rather than
importing task_age itself? I know it's a bit of a kludge, but it
solves the use-case for retrieving task age without breaking things.

Deryck Hodge (deryck)
Changed in malone:
milestone: none → 10.02
Changed in malone:
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.