0
votes

I’m developing a VSTS extension with a build task which should create up to 20,000 work items in a single build. Work items are created using WorkItemTrackingApi/createWorkItem function of vsts-node-api package. In current implementation, extension sends a request to create each work item, VSTS starts to throttle after creating about 100 work items.

Following are the errors logged in the build console.

• (2017-01-08T12:35:13.1385597Z Error: connect ETIMEDOUT 11.11.111:111:111)

• 2017-01-08T12:36:45.0090704Z Error: Failed Request: Internal Server Error(500) - TF246020: Microsoft SQL Server encountered an error while processing the results from one of the Team Foundation Server databases. The error may be caused by insufficient resources on the server. Wait a few minutes and try the operation again. If the problem persists, contact a SQL Server administrator. 2017-01-08T12:36:45.0090704Z ThrottlingMode = Unknown, MildResourceType = None, SignificantResourceType = None

Is there a way to create a bulk of work item with vsts-node-api?

Please advise how to resolve this.

2

2 Answers

1
votes

There are the VSTS REST APIs for creating batches of work items, but the vsts-node-api does not wrap them up yet as of January 2017.

You may want to leverage directly the work item batch REST APIs of VSTS with your preferred JavaScript based library.

0
votes

Please refer Create Large Amount of Work Items in TFS Using Javascript REST API

You can use below for authentication,

httpntlm.patch(options, function(err,res) {
            console.log("patch complete");
            console.log(res.body);
})