History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: QB-3675
Type: Bug Bug
Status: Closed Closed
Resolution: Duplicate
Priority: Major Major
Assignee: Robin Shen
Reporter: Steve Mik
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
QuickBuild

REST API returns inconsistent results

Created: 02/Mar/21 04:47 PM   Updated: 04/Mar/21 11:14 PM
Component/s: None
Affects Version/s: 10.0.23
Fix Version/s: None

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown


 All   Comments   Work Log   Change History      Sort Order:
Robin Shen [04/Mar/21 11:14 PM]
Duplicates QB-3684

Steve Mik [04/Mar/21 05:49 PM]
Okay, I opened an improvement request (QB-3684), you can close this bug.

Btw, your jira crashes if I try to use unicode characters U+2022 and U+2192.

Robin Shen [03/Mar/21 11:18 PM]
Yes this is a limitation and expected. To get the master node address, find the node address of master step in returned build object. The masterNodeAddress will only be updated after build is finished.

Steve Mik [03/Mar/21 05:13 PM]
So are you saying the difference is expected? I expect the results from either query to be fully up-to-date.
There is no mention of such a limitation on https://wiki.pmease.com/display/QB10/Interact+with+Builds

Furthermore, how do I access the "masterNodeAddress" for a "RUNNING" build? /rest/builds/id does not return the node, and /rest/builds?query does not return the node for "RUNNING" builds.

Robin Shen [02/Mar/21 11:39 PM]
Builds queried by date range (or other criterias) are returned directly from database, while accessing build directly via id returns the actual build being processing in queue. Database records are synced before and after the build for performance reasons. Hence the difference.

Steve Mik [02/Mar/21 04:54 PM]
Well, I pressed enter when attempting to select the version, and it appears to have automatically submitted the issue without any details.
It seems I am not able to edit the issue.

Here is the problem:

make rest call to: /rest/builds/65881
results:
  { "id":65881,
    "configuration":145,
    "version":"2021.2.0VEC.223.0",
    "requester":41,
    "scheduled":false,
    "status":"RUNNING",
    "statusDate":"2021-03-02T10:22:44.798-05:00",
    "beginDate":"2021-03-02T10:22:44.798-05:00", ...

make rest call to: /rest/builds?from_date=2021-03-02&to_date=2021-03-03&count=6
results:
  
 [ ..., {"@class":"com.pmease.quickbuild.model.Build",
    "id":65881,
    "configuration":145,
    "version":"(generated from buildspec)",
    "requester":41,
    "scheduled":false,
    "status":"RUNNING",
    "statusDate":"2021-03-02T10:22:44.000-05:00",
    "beginDate":"2021-03-02T10:22:44.000-05:00", ...

The version is completely different!
Also, very minor, but the dates have different precision.
Why is this happening? Is there any workaround?