8 comments

Hi Yuvam,

 

please make sure that the revision you are using should return anything. I've been testing the request and it seems to be working just fine on my end. If there are many builds, they don't fit the default filter, or you are going for older revisions, you might need to add some parameters such as lookupLimit or defaultFilter:false. More info to that here: https://www.jetbrains.com/help/teamcity/rest-api.html#RESTAPI-BuildLocator

 

-1
Avatar
Permanently deleted user

Hi,

I encounter the same issue with TeamCity Enterprise 2019.1.5 (build 66605). 

For a given revision which has a list of builds in the Changes tab of the UI, the API returns nothing. I can't find a pattern of which revisions have no empty results, some request behave as expected, other don't. I tried several query parameters, such as lookupLimit and defaultFilter.

I plan to upgrade to 2019.2, I hope this will help.

EDIT: 2019.2 did not solve the issue, some recent revisions are not shown in the API...

0

Hi Mael,

 

it's not fixed because we have not found this to be an issue. What values are you using for lookup limit and default filter? Also could you post here a response of a request that should return values but does not?

0
Avatar
Permanently deleted user

Hi Denis,

Here is a working request and response for a given (Svn) revision :


http://teamcity/httpAuth/app/rest/builds?locator=revision(version:267663),lookupLimit:150000

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<builds count="4" href="/httpAuth/app/rest/builds?locator=revision%28version:267663%29,lookupLimit:150000">
<build id="437584" buildTypeId="Dev_Qa" number="30546" status="FAILURE" state="finished" href="/httpAuth/app/rest/builds/id:437584" webUrl="http://teamcity/viewLog.html?buildId=437584&amp;buildTypeId=Dev_Qa"/>
<build id="437573" buildTypeId="Dev_Qa" number="30545" status="FAILURE" state="finished" href="/httpAuth/app/rest/builds/id:437573" webUrl="http://teamcity/viewLog.html?buildId=437573&amp;buildTypeId=Dev_Qa"/>
<build id="437567" buildTypeId="Dev_DotNet" number="30545" status="SUCCESS" state="finished" href="/httpAuth/app/rest/builds/id:437567" webUrl="http://teamcity/viewLog.html?buildId=437567&amp;buildTypeId=Dev_DotNet"/>
<build id="437571" buildTypeId="Dev_Package" number="30545" status="SUCCESS" state="finished" composite="true" href="/httpAuth/app/rest/builds/id:437571" webUrl="http://teamcity/viewLog.html?buildId=437571&amp;buildTypeId=Dev_Package"/>
</builds>

 

and a non working one, whatever the lookupLimit is

http://teamcity/httpAuth/app/rest/builds?locator=revision(version:267676),lookupLimit:150000

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<builds count="0" href="/httpAuth/app/rest/builds?locator=revision%28version:267676%29,lookupLimit:150000"/>

which has the following result in the UI : 

Both revisions are from today.

 

Thanks

0

Hi, and thanks for sharing the screenshot (it was duplicated, if you intended to post two different ones they were unfortunately shared). The screenshot shows a bunch of different builds with different sets of changes. Could you pick some of those and check their changes tab? Feel free to obscure the files changed but please make sure that the revision number is displayed. The revisions parameter has some restrictions in the builds that it returns, but as long as there are builds with that vcs root in it, they should appear. A screenshot of the changes tab for such a build displaying the revision would probably help us identify whether the request is misbehaving or some of the conditions are not being met.

0
Avatar
Permanently deleted user

Hi, please find the following screenshots. Note that we have a single VCS root.

Changes tab, for the revision 267676 author. 

 

Search by revision. Note that every build shown here has the revision in the changes drop-down

Here's what I found in the rest log for my API query:

2020-01-15 08:50:06,941]   INFO [nio-80-exec-140] - er.server.rest.data.FinderImpl - Server performance can be affected by REST request and finder BuildPromotionFinder with locator 'revision:(version:267676),lookupLimit:1500000,state:finished,personal:false,canceled:false,failedToStart:false,branch:(default:true)': 21061 items were processed and 0 items were returned, took 6s,531ms

I tried a few things :

  • Emptied some caches in admin> diag
  • Restarted the server

Still no result.

Thanks

 
0

Hi Mael,

 

thanks but I might have not explained myself properly. I'd like to ask you to access one of the builds shown in the results from the revision search in the UI (such as #30550), and access the changes tab of that specific build, and check that it's displayed there. Not in the dropdown, not in the general "changes" page, but specifically there.

0
Avatar
Permanently deleted user

Hi Denis, here is the changes of one of the builds, with the revision 267676 :

0

Please sign in to leave a comment.