diff --git a/delete-adf-items/v2/deleteadfitems.ts b/delete-adf-items/v2/deleteadfitems.ts index b799c4e..58b6b08 100644 --- a/delete-adf-items/v2/deleteadfitems.ts +++ b/delete-adf-items/v2/deleteadfitems.ts @@ -150,14 +150,14 @@ function getObjects( debug(loc("DeleteAdfItems_GetObjects2", datafactoryType)); reject(loc("DeleteAdfItems_GetObjects2", datafactoryType)); } else { - let objects = JSON.parse(JSON.stringify(result)); - let items = objects.parsedBody.value; - let nextLink = objects.parsedBody.nextLink; + let objects = JSON.parse(JSON.stringify(result.parsedBody)); + let items = objects.value; + let nextLink = objects.nextLink; while (nextLink !== undefined) { const result = await processNextLink(datafactoryOption, nextLink); - objects = JSON.parse(JSON.stringify(result)); - items = items.concat(objects.parsedBody.value); - nextLink = objects.parsedBody.nextLink; + objects = JSON.parse(JSON.stringify(result.parsedBody)); + items = items.concat(objects.value); + nextLink = objects.nextLink; } if (filter) { items = items.filter((item: ADFJson) => { @@ -264,8 +264,8 @@ function deleteItem( .sendRequest(options) .then((result: HttpOperationResponse) => { if (result && (result.status === 400 || result.status === 429)) { - const objects = JSON.parse(JSON.stringify(result)); - const cloudError = objects.parsedBody.error; + const objects = JSON.parse(JSON.stringify(result.parsedBody)); + const cloudError = objects.error; if (taskOptions.continue) { warning(loc("DeleteAdfItems_DeleteItem2", item.name, item.type, cloudError.message)); resolve(false); diff --git a/delete-adf-items/v2/package-lock.json b/delete-adf-items/v2/package-lock.json index 94e2628..61739ed 100644 --- a/delete-adf-items/v2/package-lock.json +++ b/delete-adf-items/v2/package-lock.json @@ -1,12 +1,12 @@ { "name": "delete-adf-items", - "version": "2.4.0", + "version": "2.4.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "delete-adf-items", - "version": "2.4.0", + "version": "2.4.1", "license": "MIT", "dependencies": { "@azure/arm-authorization": "^8.3.3", diff --git a/delete-adf-items/v2/package.json b/delete-adf-items/v2/package.json index bd3415a..761a089 100644 --- a/delete-adf-items/v2/package.json +++ b/delete-adf-items/v2/package.json @@ -1,6 +1,6 @@ { "name": "delete-adf-items", - "version": "2.4.0", + "version": "2.4.1", "description": "Deletes ADFv2 items", "main": "tasks.js", "scripts": { diff --git a/delete-adf-items/v2/task.json b/delete-adf-items/v2/task.json index b7a1b21..4ddef20 100644 --- a/delete-adf-items/v2/task.json +++ b/delete-adf-items/v2/task.json @@ -13,7 +13,7 @@ "version": { "Major": "2", "Minor": "4", - "Patch": "0" + "Patch": "1" }, "minimumAgentVersion": "1.100.0", "groups": [ diff --git a/deploy-adf-json/v2/deployadfjson.ts b/deploy-adf-json/v2/deployadfjson.ts index afdd2ea..9cba1bf 100644 --- a/deploy-adf-json/v2/deployadfjson.ts +++ b/deploy-adf-json/v2/deployadfjson.ts @@ -215,8 +215,8 @@ function deployItem( .sendRequest(options) .then(async (result: HttpOperationResponse) => { if (result && result.status !== 200) { - const objects = JSON.parse(JSON.stringify(result)); - const cloudError = objects.parsedBody.error; + const objects = JSON.parse(JSON.stringify(result.parsedBody)); + const cloudError = objects.error; if (taskOptions.continue) { warning(loc("DeployAdfJson_DeployItems2", item.name, item.type, cloudError.message)); resolve(false); diff --git a/deploy-adf-json/v2/package-lock.json b/deploy-adf-json/v2/package-lock.json index f68abd1..ce2a86a 100644 --- a/deploy-adf-json/v2/package-lock.json +++ b/deploy-adf-json/v2/package-lock.json @@ -1,6 +1,6 @@ { "name": "deploy-adf-json", - "version": "2.4.0", + "version": "2.4.1", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/deploy-adf-json/v2/package.json b/deploy-adf-json/v2/package.json index d535c3e..14c3790 100644 --- a/deploy-adf-json/v2/package.json +++ b/deploy-adf-json/v2/package.json @@ -1,6 +1,6 @@ { "name": "deploy-adf-json", - "version": "2.4.0", + "version": "2.4.1", "description": "Deploy ADFv2 items", "main": "tasks.js", "scripts": { diff --git a/deploy-adf-json/v2/task.json b/deploy-adf-json/v2/task.json index 38b645d..1eee983 100644 --- a/deploy-adf-json/v2/task.json +++ b/deploy-adf-json/v2/task.json @@ -13,7 +13,7 @@ "version": { "Major": "2", "Minor": "4", - "Patch": "0" + "Patch": "1" }, "minimumAgentVersion": "1.100.0", "groups": [ diff --git a/package-lock.json b/package-lock.json index 64ed88d..c952880 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,11 +1,11 @@ { "name": "vsts-publish-adf", - "version": "2.4.0", + "version": "2.4.1", "lockfileVersion": 2, "requires": true, "packages": { "": { - "version": "2.4.0", + "version": "2.4.1", "license": "MIT", "devDependencies": { "@types/mocha": "^8.0.3", diff --git a/package.json b/package.json index ea02a78..6fe445a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vsts-publish-adf", - "version": "2.4.0", + "version": "2.4.1", "author": "Jan Pieter Posthuma", "license": "MIT", "repository": {}, diff --git a/query-adf-run/task.json b/query-adf-run/task.json index e655cd0..d6039bd 100644 --- a/query-adf-run/task.json +++ b/query-adf-run/task.json @@ -15,7 +15,7 @@ "version": { "Major": "2", "Minor": "4", - "Patch": "0" + "Patch": "1" }, "instanceNameFormat": "Query Azure Data Factory runs", "groups": [ diff --git a/toggle-adf-trigger/v2/package-lock.json b/toggle-adf-trigger/v2/package-lock.json index d6b1d97..3777bea 100644 --- a/toggle-adf-trigger/v2/package-lock.json +++ b/toggle-adf-trigger/v2/package-lock.json @@ -1,12 +1,12 @@ { "name": "toggle-adf-trigger", - "version": "2.4.0", + "version": "2.4.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "toggle-adf-trigger", - "version": "2.4.0", + "version": "2.4.1", "license": "MIT", "dependencies": { "@azure/arm-authorization": "^8.3.3", diff --git a/toggle-adf-trigger/v2/package.json b/toggle-adf-trigger/v2/package.json index 6460693..317beeb 100644 --- a/toggle-adf-trigger/v2/package.json +++ b/toggle-adf-trigger/v2/package.json @@ -1,6 +1,6 @@ { "name": "toggle-adf-trigger", - "version": "2.4.0", + "version": "2.4.1", "description": "Toggle ADFv2 trigger", "main": "tasks.js", "scripts": { diff --git a/toggle-adf-trigger/v2/task.json b/toggle-adf-trigger/v2/task.json index 45d653f..cb7963e 100644 --- a/toggle-adf-trigger/v2/task.json +++ b/toggle-adf-trigger/v2/task.json @@ -13,7 +13,7 @@ "version": { "Major": "2", "Minor": "4", - "Patch": "0" + "Patch": "1" }, "minimumAgentVersion": "1.100.0", "groups": [ diff --git a/toggle-adf-trigger/v2/toggleadftrigger.ts b/toggle-adf-trigger/v2/toggleadftrigger.ts index db48918..b4c3b39 100644 --- a/toggle-adf-trigger/v2/toggleadftrigger.ts +++ b/toggle-adf-trigger/v2/toggleadftrigger.ts @@ -129,14 +129,14 @@ function getTriggers( debug(loc("ToggleAdfTrigger_GetTriggers2")); reject(loc("ToggleAdfTrigger_GetTriggers2")); } else { - let objects = JSON.parse(JSON.stringify(result)); - let items = objects.parsedBody.value; - let nextLink = objects.parsedBody.nextLink; + let objects = JSON.parse(JSON.stringify(result.parsedBody)); + let items = objects.value; + let nextLink = objects.nextLink; while (nextLink !== undefined) { const result = await processNextLink(datafactoryOption, nextLink); - objects = JSON.parse(JSON.stringify(result)); - items = items.concat(objects.parsedBody.value); - nextLink = objects.parsedBody.nextLink; + objects = JSON.parse(JSON.stringify(result.parsedBody)); + items = items.concat(objects.value); + nextLink = objects.nextLink; } items = items.filter((item: triggerJson) => { return wildcardFilter(item.name, triggerFilter); diff --git a/trigger-adf-pipeline/v2/package-lock.json b/trigger-adf-pipeline/v2/package-lock.json index 96a5929..fa7820d 100644 --- a/trigger-adf-pipeline/v2/package-lock.json +++ b/trigger-adf-pipeline/v2/package-lock.json @@ -1,12 +1,12 @@ { "name": "trigger-adf-piepline", - "version": "2.4.0", + "version": "2.4.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "trigger-adf-piepline", - "version": "2.4.0", + "version": "2.4.1", "license": "MIT", "dependencies": { "@azure/arm-authorization": "^8.3.3", diff --git a/trigger-adf-pipeline/v2/package.json b/trigger-adf-pipeline/v2/package.json index f7e6fbb..96622b7 100644 --- a/trigger-adf-pipeline/v2/package.json +++ b/trigger-adf-pipeline/v2/package.json @@ -1,6 +1,6 @@ { "name": "trigger-adf-piepline", - "version": "2.4.0", + "version": "2.4.1", "description": "Trigger ADFv2 items", "main": "tasks.js", "scripts": { diff --git a/trigger-adf-pipeline/v2/task.json b/trigger-adf-pipeline/v2/task.json index 7eb59fc..c6e1941 100644 --- a/trigger-adf-pipeline/v2/task.json +++ b/trigger-adf-pipeline/v2/task.json @@ -13,7 +13,7 @@ "version": { "Major": "2", "Minor": "4", - "Patch": "0" + "Patch": "1" }, "minimumAgentVersion": "1.100.0", "groups": [ diff --git a/trigger-adf-pipeline/v2/triggeradfpipeline.ts b/trigger-adf-pipeline/v2/triggeradfpipeline.ts index 2352d4d..27cce56 100644 --- a/trigger-adf-pipeline/v2/triggeradfpipeline.ts +++ b/trigger-adf-pipeline/v2/triggeradfpipeline.ts @@ -145,13 +145,13 @@ function getPipelines( reject(loc("TriggerAdfPipelines_GetPipelines2")); } else { let objects = JSON.parse(JSON.stringify(result.parsedBody)); - let items = objects.parsedBody.value; - let nextLink = objects.parsedBody.nextLink; + let items = objects.value; + let nextLink = objects.nextLink; while (nextLink !== undefined) { const result = await processNextLink(datafactoryOption, nextLink); objects = JSON.parse(JSON.stringify(result.parsedBody)); - items = items.concat(objects.parsedBody.value); - nextLink = objects.parsedBody.nextLink; + items = items.concat(objects.value); + nextLink = objects.nextLink; } items = items.filter((item: pipelineTriggerJson) => { return wildcardFilter(item.name, filter); @@ -210,19 +210,21 @@ function triggerPipeline( azureClient .sendRequest(options) .then((result: HttpOperationResponse) => { + const objects = JSON.parse(JSON.stringify(result.parsedBody)); if (result && result.status !== 200 && result.status !== 204) { + const cloudError = objects.error; if (deployOptions.continue) { - warning(loc("TriggerAdfPipelines_TriggerPipeline", pipelineName, JSON.stringify(result))); + warning(loc("TriggerAdfPipelines_TriggerPipeline", pipelineName, cloudError.message)); resolve(undefined); } else { - error(loc("TriggerAdfPipelines_TriggerPipeline", pipelineName, JSON.stringify(result))); - reject(loc("TriggerAdfPipelines_TriggerPipeline", pipelineName, JSON.stringify(result))); + error(loc("TriggerAdfPipelines_TriggerPipeline", pipelineName, cloudError.message)); + reject(loc("TriggerAdfPipelines_TriggerPipeline", pipelineName, cloudError.message)); } } else if (result && result.status === 204) { warning(`'${pipelineName}' not found.`); resolve(undefined); } else { - const runId = result.parsedBody.runId; + const runId = objects.runId; console.log(`Pipeline '${pipelineName}' triggered with run id: '${runId}'.`); resolve({ pipeline: pipelineName, diff --git a/vss-extension-preview.json b/vss-extension-preview.json index 243df13..b230c9f 100644 --- a/vss-extension-preview.json +++ b/vss-extension-preview.json @@ -1,7 +1,7 @@ { "manifestVersion": 1, "id": "vsts-publish-adf-preview", - "version": "2.4.0", + "version": "2.4.1", "name": "Azure Data Factory (Preview)", "publisher": "liprec", "public": false, diff --git a/vss-extension.json b/vss-extension.json index 43087a5..656db7e 100644 --- a/vss-extension.json +++ b/vss-extension.json @@ -1,7 +1,7 @@ { "manifestVersion": 1, "id": "vsts-publish-adf", - "version": "2.4.0", + "version": "2.4.1", "name": "Azure Data Factory", "publisher": "liprec", "public": true,