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

Bug #515747 reported by James Westby on 2010-02-01
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Launchpad itself
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

Related branches

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

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)
Deryck Hodge (deryck) wrote :

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

Changed in malone:
importance: High → Critical
Changed in malone:
status: Triaged → Fix Committed
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.

Brian, good idea! Feel like creating a brunch?

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) on 2010-02-23
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  Edit
Everyone can see this information.

Other bug subscribers