Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

ITeamBuildRequestClient.requestBuild() returns unexpected build result UUID

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?

0 votes



One answer

Permanent link
 Yes, that is the problem. If allowDuplicateRequests is false the requestBuild returns the existing request. 

Thanks,
Kishore

0 votes

Comments

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 log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Dec 16 '15, 12:15 p.m.

Question was seen: 2,547 times

Last updated: Dec 17 '15, 9:32 a.m.

Confirmation Cancel Confirm