It's all about the answers!

Ask a question

ITeamBuildRequestClient.requestBuild() returns unexpected build result UUID


Wendy Raschke (30111) | asked Dec 16 '15, 12:15 p.m.
Hi, I wonder if I've made a programming blunder here. While I can't recreate this problem, a couple of my teammates have run into this problematic behavior: they use a program I've created to submit build requests and the returned IBuildResultHandle's UUID is for a build request that they didn't make--it's for someone else's build. For example, John tries to request a build but gets back the UUID for Derek's build, which is already running. John never sees a new build request for him.

Here is the underlying code, simplified for this form, that I implemented to submit build requests:

            teamRepo = TeamPlatform.getTeamRepositoryService().getTeamRepository(paRepo.getRepositoryUri());
            ITeamBuildRequestClient buildReqClient = (ITeamBuildRequestClient) teamRepo.getClientLibrary(ITeamBuildRequestClient.class);

            IBuildRequest buildRequest = buildReqClient.requestBuild(buildDef, modifiedProps, null, false, true, monitor);
            IBuildResultHandle resultHandle = buildRequest.getBuildResult();
            String buildResultUUID = resultHandle.getItemId().getUuidValue();

Notice the fourth parameter in ITeamBuildRequestClient.requestBuild(): it is false and represents allowDuplicateRequests. Is this where I am going wrong?

One answer



permanent link
Krishna Kishore (50112) | answered Dec 16 '15, 8:25 p.m.
JAZZ DEVELOPER
 Yes, that is the problem. If allowDuplicateRequests is false the requestBuild returns the existing request. 

Thanks,
Kishore

Comments
Wendy Raschke commented Dec 17 '15, 9:32 a.m.

Okay, I changed it from false to true. I submitted two requests consecutively; each returned result has a different UUID, but now they both have the same build label. Is this intended? That isn't exactly what I wanted.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.