Cancelled builds and the rest api

Hi guys,

Im using /httpAuth/app/rest/buildTypes/id:bt999/builds to retrieve a list of builds, but I noticed cancelled builds do not show up. Is there any way to have cancelled builds show up in the xml?

On a related note, do builds that timeout show up in the xml and if so which status will be listed?

Many thanks, Bas

5 comments

Bas,

Try appending "?includeCanceled=true" to the URL ( http://<server>/app/rest/application.wadl can help in listing supported parameters).
Builds with Execution timeout are usual failures so far (BTW, it's likely to be changed in the TeamCity 6.0).

Can you please describe why do you need canceled builds? We are in the process of implementing the feature and are rethinking canceled builds definition, your input might help us understand how canceled builds are being used.

0

Hi Yegor,

to avoid flooding the teamcity buildqueue my application keeps track of how many builds have been requested but not completed. Not getting reports on cancelled builds would mean that one request slot is filled up until I timeout the request.

Bas

0

Bas,

Thank you for description. It seems you are solving some kind of issue with too many builds... If you can describe what is the root of the issue that might be interesting to know about.

0

Im building an app that needs builds at certain revisions. When the app decides it wants a specific revision (and does not already have it cached) it asks teamcity to build it through the rest api. However my app is not the only one using teamcity, so I dont want to have too many requests in the build queue at any one time. So I keep track of how many requests I have made and that are not completed yet (I poll teamcity using the rest api to find out which requests have been completed). In my mind this is not something teamcity should want to solve, an app making requests should not flood the queue. But it might be nice to have some rest calls to find out about the current build queue and maybe even modify it.

Bas

0

Yes, API around the build queue seems to be the feature that can help in your task. As we are going to extend the REST API, we will certainly consider adding build queue part into it.
Thank you for the details.

0

Please sign in to leave a comment.