Closed
Bug 612581
Opened 15 years ago
Closed 15 years ago
Mid-air collision with valid timestamps
Categories
(Webtools Graveyard :: BzAPI, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: jskarpet, Assigned: gerv)
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10
Build Identifier: 0.7
I am attempting to update a bug in Bugzilla using PUT request against the bzapi, which returns:
object(stdClass)[16]
public 'error' => int 1
public 'actual_last_change_time' => string '2009-02-09 12:17:24' (length=19)
public 'submitted_last_change_time' => string '2010-11-11 17:00:51' (length=19)
public 'code' => int 32000
public 'message' => string 'Mid-air collision' (length=17)
Documentation states that only newer actual_last_change_time than submitted_last_change_time should produce this error.
Reproducible: Always
Steps to Reproduce:
1. Send JSON object using PUT
2.
3.
Actual Results:
object(stdClass)[16]
public 'error' => int 1
public 'actual_last_change_time' => string '2009-02-09 12:17:24' (length=19)
public 'submitted_last_change_time' => string '2010-11-11 17:00:51' (length=19)
public 'code' => int 32000
public 'message' => string 'Mid-air collision' (length=17)
Expected Results:
object(stdClass)[16]
public 'ok' => int 1
If the problems lay elsewhere I expect the error message to indicate as such
| Assignee | ||
Comment 1•15 years ago
|
||
Please can you give the details of the exact request you sent? Was this on the bugzilla.mozilla.org BzAPI installation? If so, please give the exact URL used. If not, please give the version of BzAPI you are using.
Thanks,
Gerv
Local installation using version 0.7 against Bugzilla 3.6.2
object(stdClass)[7]
public 'id' => string '12345' (length=5)
public 'cf_custom1' => string 'ccccccccc' (length=10)
public 'title' => string 'my string' (length=40)
public 'cf_custom2' => string 'my strint 2' (length=136)
public 'last_change_time' => string '2010-11-11 16:00:51' (length=19)
public 'resolution' => string '' (length=0)
public 'product' => string 'Prod' (length=6)
public 'component' => string 'sys' (length=6)
public 'version' => string 'VE1.0' (length=5)
public 'op_sys' => string '' (length=0)
public 'platform' => string 'P12' (length=3)
public 'priority' => string '0' (length=1)
public 'severity' => string 'normal' (length=6)
public 'status' => string 'NEW' (length=3)
public 'reporter' =>
object(stdClass)[8]
public 'name' => string 'name' (length=8)
public 'assigned_to' =>
object(stdClass)[9]
public 'name' => string '' (length=0)
public 'target_milestone' => string '0' (length=1)
| Assignee | ||
Comment 3•15 years ago
|
||
OK. This is a bit tricky to debug remotely, but here are some questions:
- Please check your bugzilla_api.conf and make sure the bugzilla_version in that file is correctly set to 3.6. Please also tell me the value of bugzilla_timezone.
- Please visit bug "12345" (or whatever the real number is) and tell me exactly what the web interface says for Last Changed Time (including timezone information).
- If that value is not the equivalent of 2010-11-11 16:00:51 UTC, please tell me how you came to select that value as the correct value to submit for last_change_time in your request.
Gerv
bugzilla_api.conf:
bugzilla_version 3.6
bugzilla_timezone Europe/Oslo
web interface output:
Modified: 2009-02-09 12:17 CET
I might add that I attempted to change last modified date to correspond to the excact same UTC time. This does not produce the error. If it's off by even 1s, the error appear. (regardless if it's 1s before, or after)
| Assignee | ||
Comment 5•15 years ago
|
||
As you may have worked out, the error you are getting, the mid-air, comes from Bugzilla rather than the BzAPI itself.
It seems that Bugzilla must be comparing last_change_time with an = instead of a >=. This is not unreasonable - it expects to get back the last_change_time it sent out when it sent you the bug data. Think of it as a "version number" for the bug information - and you are sending in a version number it's never heard of, so it complains.
Anyway, I can't change this behaviour by changing BzAPI unless I request the bug data for a bug before any change submission, which would be very bad for performance.
If you want to update the bug unconditionally, without regard to whether you are overwriting someone else's changes, then just leave last_change_time off entirely, and that will happen. See the docs:
https://wiki.mozilla.org/Bugzilla:REST_API:Methods#Update_bug_.28.2Fbug.2F.3Cid.3E_PUT.29
(bullet 2)
Gerv
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → WONTFIX
Updated•14 years ago
|
Summary: Mid-air collition with valid timestamps → Mid-air collision with valid timestamps
Updated•7 years ago
|
Product: Webtools → Webtools Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•