From 40d1b95261efdc8358f863fc7ee54bb88b2a331c Mon Sep 17 00:00:00 2001 From: Ajinkya Date: Mon, 1 Apr 2019 02:06:23 +0530 Subject: [PATCH] Add logging before and after calling toolrunner exec method. Replace chmod by chmodSync. (#9918) * Add logging before and after calling toolrunner exec method. Replace chmod by chmodSync. * Bumping up versions of Tasks which are dependent on kubectlutility.ts - HelmDeployV0, HelmInstallerV0, KubernetesManifestV0, KubernetesV1 * Bumping up other task versions as is imposed by build policy --- Tasks/AzureIoTEdgeV2/task.json | 2 +- Tasks/AzureIoTEdgeV2/task.loc.json | 2 +- Tasks/AzureMysqlDeploymentV1/task.json | 2 +- Tasks/AzureMysqlDeploymentV1/task.loc.json | 2 +- Tasks/AzureVmssDeploymentV0/task.json | 2 +- Tasks/AzureVmssDeploymentV0/task.loc.json | 2 +- Tasks/Common/utility-common/kubectlutility.ts | 2 +- Tasks/DockerV2/task.json | 2 +- Tasks/DockerV2/task.loc.json | 2 +- Tasks/DotNetCoreCLIV2/task.json | 2 +- Tasks/DotNetCoreCLIV2/task.loc.json | 2 +- Tasks/DownloadPackageV0/task.json | 2 +- Tasks/DownloadPackageV0/task.loc.json | 2 +- Tasks/DownloadPackageV1/task.json | 2 +- Tasks/DownloadPackageV1/task.loc.json | 2 +- Tasks/DuffleInstallerV0/task.json | 2 +- Tasks/DuffleInstallerV0/task.loc.json | 2 +- Tasks/GitHubReleaseV0/task.json | 2 +- Tasks/GitHubReleaseV0/task.loc.json | 2 +- Tasks/GradleV2/task.json | 2 +- Tasks/GradleV2/task.loc.json | 2 +- Tasks/HelmDeployV0/task.json | 2 +- Tasks/HelmDeployV0/task.loc.json | 2 +- Tasks/HelmInstallerV0/task.json | 4 ++-- Tasks/HelmInstallerV0/task.loc.json | 4 ++-- Tasks/KubernetesManifestV0/task.json | 2 +- Tasks/KubernetesManifestV0/task.loc.json | 2 +- .../resources.resjson/en-US/resources.resjson | 4 ++++ Tasks/KubernetesV0/src/clusterconnection.ts | 13 ++++++++++++- Tasks/KubernetesV0/src/utilities.ts | 2 +- Tasks/KubernetesV0/task.json | 6 +++++- Tasks/KubernetesV0/task.loc.json | 6 +++++- .../resources.resjson/en-US/resources.resjson | 4 ++++ Tasks/KubernetesV1/src/clusterconnection.ts | 13 ++++++++++++- Tasks/KubernetesV1/task.json | 6 +++++- Tasks/KubernetesV1/task.loc.json | 6 +++++- Tasks/NpmV1/task.json | 2 +- Tasks/NpmV1/task.loc.json | 2 +- Tasks/NuGetCommandV2/task.json | 2 +- Tasks/NuGetCommandV2/task.loc.json | 2 +- Tasks/NuGetV0/task.json | 2 +- Tasks/NuGetV0/task.loc.json | 2 +- Tasks/PipAuthenticateV0/task.json | 2 +- Tasks/PipAuthenticateV0/task.loc.json | 2 +- Tasks/TwineAuthenticateV0/task.json | 2 +- Tasks/TwineAuthenticateV0/task.loc.json | 2 +- Tasks/UniversalPackagesV0/task.json | 2 +- Tasks/UniversalPackagesV0/task.loc.json | 2 +- 48 files changed, 94 insertions(+), 48 deletions(-) diff --git a/Tasks/AzureIoTEdgeV2/task.json b/Tasks/AzureIoTEdgeV2/task.json index 7c8a5e7221db..ce09d2221f8e 100644 --- a/Tasks/AzureIoTEdgeV2/task.json +++ b/Tasks/AzureIoTEdgeV2/task.json @@ -14,7 +14,7 @@ "version": { "Major": 2, "Minor": 0, - "Patch": 2 + "Patch": 3 }, "preview": true, "instanceNameFormat": "Azure IoT Edge - $(action)", diff --git a/Tasks/AzureIoTEdgeV2/task.loc.json b/Tasks/AzureIoTEdgeV2/task.loc.json index 94b1ddbb136f..022e86057ea4 100644 --- a/Tasks/AzureIoTEdgeV2/task.loc.json +++ b/Tasks/AzureIoTEdgeV2/task.loc.json @@ -14,7 +14,7 @@ "version": { "Major": 2, "Minor": 0, - "Patch": 2 + "Patch": 3 }, "preview": true, "instanceNameFormat": "ms-resource:loc.instanceNameFormat", diff --git a/Tasks/AzureMysqlDeploymentV1/task.json b/Tasks/AzureMysqlDeploymentV1/task.json index 226bda488dfb..0253ebeb8033 100644 --- a/Tasks/AzureMysqlDeploymentV1/task.json +++ b/Tasks/AzureMysqlDeploymentV1/task.json @@ -17,7 +17,7 @@ "version": { "Major": 1, "Minor": 0, - "Patch": 15 + "Patch": 16 }, "demands": [], "minimumAgentVersion": "1.100.0", diff --git a/Tasks/AzureMysqlDeploymentV1/task.loc.json b/Tasks/AzureMysqlDeploymentV1/task.loc.json index 0b3773b0cfc9..49592a268d2d 100644 --- a/Tasks/AzureMysqlDeploymentV1/task.loc.json +++ b/Tasks/AzureMysqlDeploymentV1/task.loc.json @@ -17,7 +17,7 @@ "version": { "Major": 1, "Minor": 0, - "Patch": 15 + "Patch": 16 }, "demands": [], "minimumAgentVersion": "1.100.0", diff --git a/Tasks/AzureVmssDeploymentV0/task.json b/Tasks/AzureVmssDeploymentV0/task.json index c5909fa62f2b..e1752862338c 100644 --- a/Tasks/AzureVmssDeploymentV0/task.json +++ b/Tasks/AzureVmssDeploymentV0/task.json @@ -15,7 +15,7 @@ "version": { "Major": 0, "Minor": 0, - "Patch": 24 + "Patch": 25 }, "demands": [], "minimumAgentVersion": "2.0.0", diff --git a/Tasks/AzureVmssDeploymentV0/task.loc.json b/Tasks/AzureVmssDeploymentV0/task.loc.json index 6ec3ccd7f2d9..bdfae2feaf20 100644 --- a/Tasks/AzureVmssDeploymentV0/task.loc.json +++ b/Tasks/AzureVmssDeploymentV0/task.loc.json @@ -15,7 +15,7 @@ "version": { "Major": 0, "Minor": 0, - "Patch": 24 + "Patch": 25 }, "demands": [], "minimumAgentVersion": "2.0.0", diff --git a/Tasks/Common/utility-common/kubectlutility.ts b/Tasks/Common/utility-common/kubectlutility.ts index 411e22df844a..6dd4c6312ccd 100644 --- a/Tasks/Common/utility-common/kubectlutility.ts +++ b/Tasks/Common/utility-common/kubectlutility.ts @@ -46,7 +46,7 @@ export async function downloadKubectl(version: string) : Promise { } var kubectlPath = path.join(cachedToolpath, kubectlToolName + getExecutableExtention()); - fs.chmod(kubectlPath, "777"); + fs.chmodSync(kubectlPath, "777"); return kubectlPath; } diff --git a/Tasks/DockerV2/task.json b/Tasks/DockerV2/task.json index 9e3bec958afa..cd478aab820b 100644 --- a/Tasks/DockerV2/task.json +++ b/Tasks/DockerV2/task.json @@ -14,7 +14,7 @@ "version": { "Major": 2, "Minor": 150, - "Patch": 3 + "Patch": 4 }, "demands": [], "releaseNotes": "Simplified the task YAML by:
 - Removing the Container registry type input
 - Removing complex inputs as they can be passed as arguments to the command.", diff --git a/Tasks/DockerV2/task.loc.json b/Tasks/DockerV2/task.loc.json index 4905d9a4d6ce..0a2e51740f48 100644 --- a/Tasks/DockerV2/task.loc.json +++ b/Tasks/DockerV2/task.loc.json @@ -14,7 +14,7 @@ "version": { "Major": 2, "Minor": 150, - "Patch": 3 + "Patch": 4 }, "demands": [], "releaseNotes": "ms-resource:loc.releaseNotes", diff --git a/Tasks/DotNetCoreCLIV2/task.json b/Tasks/DotNetCoreCLIV2/task.json index 1c72a8d4ddd6..e762d5c8c9cd 100644 --- a/Tasks/DotNetCoreCLIV2/task.json +++ b/Tasks/DotNetCoreCLIV2/task.json @@ -18,7 +18,7 @@ "version": { "Major": 2, "Minor": 150, - "Patch": 1 + "Patch": 2 }, "minimumAgentVersion": "2.115.0", "instanceNameFormat": "dotnet $(command)", diff --git a/Tasks/DotNetCoreCLIV2/task.loc.json b/Tasks/DotNetCoreCLIV2/task.loc.json index 0c82404a3719..f6b203e281d2 100644 --- a/Tasks/DotNetCoreCLIV2/task.loc.json +++ b/Tasks/DotNetCoreCLIV2/task.loc.json @@ -18,7 +18,7 @@ "version": { "Major": 2, "Minor": 150, - "Patch": 1 + "Patch": 2 }, "minimumAgentVersion": "2.115.0", "instanceNameFormat": "ms-resource:loc.instanceNameFormat", diff --git a/Tasks/DownloadPackageV0/task.json b/Tasks/DownloadPackageV0/task.json index 8a1724bc9867..cabf3944c659 100644 --- a/Tasks/DownloadPackageV0/task.json +++ b/Tasks/DownloadPackageV0/task.json @@ -10,7 +10,7 @@ "version": { "Major": 0, "Minor": 150, - "Patch": 0 + "Patch": 1 }, "demands": [], "minimumAgentVersion": "1.99.0", diff --git a/Tasks/DownloadPackageV0/task.loc.json b/Tasks/DownloadPackageV0/task.loc.json index 25f231e21ae8..4843f0e565d6 100644 --- a/Tasks/DownloadPackageV0/task.loc.json +++ b/Tasks/DownloadPackageV0/task.loc.json @@ -10,7 +10,7 @@ "version": { "Major": 0, "Minor": 150, - "Patch": 0 + "Patch": 1 }, "demands": [], "minimumAgentVersion": "1.99.0", diff --git a/Tasks/DownloadPackageV1/task.json b/Tasks/DownloadPackageV1/task.json index b3e37b5348f0..fd5d3da263f2 100644 --- a/Tasks/DownloadPackageV1/task.json +++ b/Tasks/DownloadPackageV1/task.json @@ -10,7 +10,7 @@ "version": { "Major": 1, "Minor": 150, - "Patch": 0 + "Patch": 1 }, "demands": [], "minimumAgentVersion": "2.115.0", diff --git a/Tasks/DownloadPackageV1/task.loc.json b/Tasks/DownloadPackageV1/task.loc.json index 22ae13cd521d..caab0ee6fb73 100644 --- a/Tasks/DownloadPackageV1/task.loc.json +++ b/Tasks/DownloadPackageV1/task.loc.json @@ -10,7 +10,7 @@ "version": { "Major": 1, "Minor": 150, - "Patch": 0 + "Patch": 1 }, "demands": [], "minimumAgentVersion": "2.115.0", diff --git a/Tasks/DuffleInstallerV0/task.json b/Tasks/DuffleInstallerV0/task.json index f62c1f3b164e..6913ab73ec2d 100644 --- a/Tasks/DuffleInstallerV0/task.json +++ b/Tasks/DuffleInstallerV0/task.json @@ -14,7 +14,7 @@ "version": { "Major": 0, "Minor": 0, - "Patch": 1 + "Patch": 2 }, "demands": [], "groups": [], diff --git a/Tasks/DuffleInstallerV0/task.loc.json b/Tasks/DuffleInstallerV0/task.loc.json index 163720feb3f8..1479c1d375da 100644 --- a/Tasks/DuffleInstallerV0/task.loc.json +++ b/Tasks/DuffleInstallerV0/task.loc.json @@ -14,7 +14,7 @@ "version": { "Major": 0, "Minor": 0, - "Patch": 1 + "Patch": 2 }, "demands": [], "groups": [], diff --git a/Tasks/GitHubReleaseV0/task.json b/Tasks/GitHubReleaseV0/task.json index af7fb8c872eb..8c7f8ab7b45a 100644 --- a/Tasks/GitHubReleaseV0/task.json +++ b/Tasks/GitHubReleaseV0/task.json @@ -15,7 +15,7 @@ "version": { "Major": 0, "Minor": 150, - "Patch": 0 + "Patch": 1 }, "demands": [], "minimumAgentVersion": "2.0.0", diff --git a/Tasks/GitHubReleaseV0/task.loc.json b/Tasks/GitHubReleaseV0/task.loc.json index 9a2e08578fb6..d773c1756163 100644 --- a/Tasks/GitHubReleaseV0/task.loc.json +++ b/Tasks/GitHubReleaseV0/task.loc.json @@ -15,7 +15,7 @@ "version": { "Major": 0, "Minor": 150, - "Patch": 0 + "Patch": 1 }, "demands": [], "minimumAgentVersion": "2.0.0", diff --git a/Tasks/GradleV2/task.json b/Tasks/GradleV2/task.json index 28f16855e06f..733e400d1081 100644 --- a/Tasks/GradleV2/task.json +++ b/Tasks/GradleV2/task.json @@ -17,7 +17,7 @@ "version": { "Major": 2, "Minor": 149, - "Patch": 1 + "Patch": 2 }, "releaseNotes": "Configuration of the SonarQube analysis was moved to the [SonarQube](https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarqube) or [SonarCloud](https://marketplace.visualstudio.com/items?itemName=SonarSource.sonarcloud) extensions, in task `Prepare Analysis Configuration`", "demands": [ diff --git a/Tasks/GradleV2/task.loc.json b/Tasks/GradleV2/task.loc.json index 3ac504fe089d..3532bda205f0 100644 --- a/Tasks/GradleV2/task.loc.json +++ b/Tasks/GradleV2/task.loc.json @@ -17,7 +17,7 @@ "version": { "Major": 2, "Minor": 149, - "Patch": 1 + "Patch": 2 }, "releaseNotes": "ms-resource:loc.releaseNotes", "demands": [ diff --git a/Tasks/HelmDeployV0/task.json b/Tasks/HelmDeployV0/task.json index 197047d169e7..7249e46824ab 100644 --- a/Tasks/HelmDeployV0/task.json +++ b/Tasks/HelmDeployV0/task.json @@ -14,7 +14,7 @@ "version": { "Major": 0, "Minor": 150, - "Patch": 1 + "Patch": 2 }, "demands": [], "groups": [ diff --git a/Tasks/HelmDeployV0/task.loc.json b/Tasks/HelmDeployV0/task.loc.json index 539daacc06b1..d6b317b16b25 100644 --- a/Tasks/HelmDeployV0/task.loc.json +++ b/Tasks/HelmDeployV0/task.loc.json @@ -14,7 +14,7 @@ "version": { "Major": 0, "Minor": 150, - "Patch": 1 + "Patch": 2 }, "demands": [], "groups": [ diff --git a/Tasks/HelmInstallerV0/task.json b/Tasks/HelmInstallerV0/task.json index 2ac688374f66..2dd0afe8294e 100644 --- a/Tasks/HelmInstallerV0/task.json +++ b/Tasks/HelmInstallerV0/task.json @@ -13,8 +13,8 @@ "author": "Microsoft Corporation", "version": { "Major": 0, - "Minor": 1, - "Patch": 15 + "Minor": 150, + "Patch": 0 }, "demands": [], "satisfies": [ diff --git a/Tasks/HelmInstallerV0/task.loc.json b/Tasks/HelmInstallerV0/task.loc.json index ca451d37a838..8895cfd14c12 100644 --- a/Tasks/HelmInstallerV0/task.loc.json +++ b/Tasks/HelmInstallerV0/task.loc.json @@ -13,8 +13,8 @@ "author": "Microsoft Corporation", "version": { "Major": 0, - "Minor": 1, - "Patch": 15 + "Minor": 150, + "Patch": 0 }, "demands": [], "satisfies": [ diff --git a/Tasks/KubernetesManifestV0/task.json b/Tasks/KubernetesManifestV0/task.json index 454b8e1c72b5..75fbae977031 100644 --- a/Tasks/KubernetesManifestV0/task.json +++ b/Tasks/KubernetesManifestV0/task.json @@ -14,7 +14,7 @@ "author": "Microsoft Corporation", "version": { "Major": 0, - "Minor": 149, + "Minor": 150, "Patch": 0 }, "demands": [], diff --git a/Tasks/KubernetesManifestV0/task.loc.json b/Tasks/KubernetesManifestV0/task.loc.json index 2cc844300302..6353ec8ec9c3 100644 --- a/Tasks/KubernetesManifestV0/task.loc.json +++ b/Tasks/KubernetesManifestV0/task.loc.json @@ -14,7 +14,7 @@ "author": "Microsoft Corporation", "version": { "Major": 0, - "Minor": 149, + "Minor": 150, "Patch": 0 }, "demands": [], diff --git a/Tasks/KubernetesV0/Strings/resources.resjson/en-US/resources.resjson b/Tasks/KubernetesV0/Strings/resources.resjson/en-US/resources.resjson index 32a97d284cbd..ae765d4120d1 100644 --- a/Tasks/KubernetesV0/Strings/resources.resjson/en-US/resources.resjson +++ b/Tasks/KubernetesV0/Strings/resources.resjson/en-US/resources.resjson @@ -62,6 +62,7 @@ "loc.input.help.kubectlOutput": "Name of the variable in which output of the command should be saved.", "loc.messages.DownloadingClient": "Downloading kubernetes client.", "loc.messages.CreatingSecret": "Executing create %s secret.", + "loc.messages.CallToolRunnerExec": "Calling Toolrunner exec() method asynchronously to execute the kubectl command and store the returned promise object.", "loc.messages.DeleteSecret": "Executing delete %s secret", "loc.messages.CreatingConfigMap": "Executing create %s configmap.", "loc.messages.DeleteConfigMap": "Executing delete %s configmap", @@ -73,6 +74,9 @@ "loc.messages.DownloadPathForStableTxt": "Download path for stable.txt: %s", "loc.messages.DownloadKubeCtlFailed": "Can not download the kubectl client of version %s. Check if the version is correct https://github.com/kubernetes/kubernetes/releases", "loc.messages.DownloadStableVersionFailed": "Can not download kubernetes stable version file from %s. Falling back to %s", + "loc.messages.ReturningToolRunnerExecPromise": "Called Toolrunner exec() method asynchronously. Returning the promise.", + "loc.messages.ToolRunnerExecCallFailed": "Toolrunner exec() method returned error for the kubectl command. Error: %s.", + "loc.messages.ToolRunnerExecCallSucceeded": "Toolrunner exec() method returned successfully for the kubectl command.", "loc.messages.UsingLatestStableVersion": "Invalid version 1.7 specified in Version Spec input. Using latest stable version instead. Check for correct versions https://github.com/kubernetes/kubernetes/releases", "loc.messages.ConfigurationFileNotFound": "No configuration file matching %s was found.", "loc.messages.OutputVariableDataSizeExceeded": "Output variable not set as kubectl command output exceeded the maximum supported length. Output length: %s, Maximum supported length: %s", diff --git a/Tasks/KubernetesV0/src/clusterconnection.ts b/Tasks/KubernetesV0/src/clusterconnection.ts index ece5ebe166c5..66db76353f5b 100644 --- a/Tasks/KubernetesV0/src/clusterconnection.ts +++ b/Tasks/KubernetesV0/src/clusterconnection.ts @@ -68,10 +68,21 @@ export default class ClusterConnection { command.on("errline", line => { errlines.push(line); }); - return command.exec(options).fail(error => { + + tl.debug(tl.loc('CallToolRunnerExec')); + + let promise = command.exec(options) + .fail(error => { + tl.debug(tl.loc('ToolRunnerExecCallFailed', error)); errlines.forEach(line => tl.error(line)); throw error; + }) + .then(() => { + tl.debug(tl.loc('ToolRunnerExecCallSucceeded')); }); + + tl.debug(tl.loc('ReturningToolRunnerExecPromise')); + return promise; } private getExecutableExtention(): string { diff --git a/Tasks/KubernetesV0/src/utilities.ts b/Tasks/KubernetesV0/src/utilities.ts index e7900a314bdb..2d5757a462eb 100644 --- a/Tasks/KubernetesV0/src/utilities.ts +++ b/Tasks/KubernetesV0/src/utilities.ts @@ -82,7 +82,7 @@ export async function downloadKubectl(version: string, kubectlPath: string): Pro var kubectlPathTmp = kubectlPath+".tmp"; return downloadutility.download(kubectlURL, kubectlPathTmp, false, true).then( (res) => { tl.cp(kubectlPathTmp, kubectlPath, "-f"); - fs.chmod(kubectlPath, "777"); + fs.chmodSync(kubectlPath, "777"); assertFileExists(kubectlPath); return kubectlPath; }, diff --git a/Tasks/KubernetesV0/task.json b/Tasks/KubernetesV0/task.json index f9da11e24aef..80bc77aa640a 100644 --- a/Tasks/KubernetesV0/task.json +++ b/Tasks/KubernetesV0/task.json @@ -14,7 +14,7 @@ "version": { "Major": 0, "Minor": 150, - "Patch": 3 + "Patch": 4 }, "demands": [], "preview": "false", @@ -350,6 +350,7 @@ "messages": { "DownloadingClient": "Downloading kubernetes client.", "CreatingSecret": "Executing create %s secret.", + "CallToolRunnerExec": "Calling Toolrunner exec() method asynchronously to execute the kubectl command and store the returned promise object.", "DeleteSecret": "Executing delete %s secret", "CreatingConfigMap": "Executing create %s configmap.", "DeleteConfigMap": "Executing delete %s configmap", @@ -361,6 +362,9 @@ "DownloadPathForStableTxt": "Download path for stable.txt: %s", "DownloadKubeCtlFailed": "Can not download the kubectl client of version %s. Check if the version is correct https://github.com/kubernetes/kubernetes/releases", "DownloadStableVersionFailed": "Can not download kubernetes stable version file from %s. Falling back to %s", + "ReturningToolRunnerExecPromise": "Called Toolrunner exec() method asynchronously. Returning the promise.", + "ToolRunnerExecCallFailed": "Toolrunner exec() method returned error for the kubectl command. Error: %s.", + "ToolRunnerExecCallSucceeded": "Toolrunner exec() method returned successfully for the kubectl command.", "UsingLatestStableVersion": "Invalid version 1.7 specified in Version Spec input. Using latest stable version instead. Check for correct versions https://github.com/kubernetes/kubernetes/releases", "ConfigurationFileNotFound": "No configuration file matching %s was found.", "OutputVariableDataSizeExceeded": "Output variable not set as kubectl command output exceeded the maximum supported length. Output length: %s, Maximum supported length: %s", diff --git a/Tasks/KubernetesV0/task.loc.json b/Tasks/KubernetesV0/task.loc.json index f39e8c3dbee4..b09e17ae4ec8 100644 --- a/Tasks/KubernetesV0/task.loc.json +++ b/Tasks/KubernetesV0/task.loc.json @@ -14,7 +14,7 @@ "version": { "Major": 0, "Minor": 150, - "Patch": 3 + "Patch": 4 }, "demands": [], "preview": "false", @@ -350,6 +350,7 @@ "messages": { "DownloadingClient": "ms-resource:loc.messages.DownloadingClient", "CreatingSecret": "ms-resource:loc.messages.CreatingSecret", + "CallToolRunnerExec": "ms-resource:loc.messages.CallToolRunnerExec", "DeleteSecret": "ms-resource:loc.messages.DeleteSecret", "CreatingConfigMap": "ms-resource:loc.messages.CreatingConfigMap", "DeleteConfigMap": "ms-resource:loc.messages.DeleteConfigMap", @@ -361,6 +362,9 @@ "DownloadPathForStableTxt": "ms-resource:loc.messages.DownloadPathForStableTxt", "DownloadKubeCtlFailed": "ms-resource:loc.messages.DownloadKubeCtlFailed", "DownloadStableVersionFailed": "ms-resource:loc.messages.DownloadStableVersionFailed", + "ReturningToolRunnerExecPromise": "ms-resource:loc.messages.ReturningToolRunnerExecPromise", + "ToolRunnerExecCallFailed": "ms-resource:loc.messages.ToolRunnerExecCallFailed", + "ToolRunnerExecCallSucceeded": "ms-resource:loc.messages.ToolRunnerExecCallSucceeded", "UsingLatestStableVersion": "ms-resource:loc.messages.UsingLatestStableVersion", "ConfigurationFileNotFound": "ms-resource:loc.messages.ConfigurationFileNotFound", "OutputVariableDataSizeExceeded": "ms-resource:loc.messages.OutputVariableDataSizeExceeded", diff --git a/Tasks/KubernetesV1/Strings/resources.resjson/en-US/resources.resjson b/Tasks/KubernetesV1/Strings/resources.resjson/en-US/resources.resjson index 44790a73b2e5..9fa92b1ad2eb 100644 --- a/Tasks/KubernetesV1/Strings/resources.resjson/en-US/resources.resjson +++ b/Tasks/KubernetesV1/Strings/resources.resjson/en-US/resources.resjson @@ -95,5 +95,9 @@ "loc.messages.KubernetesServiceConnectionNotFound": "Kubernetes service connection details not found.", "loc.messages.OutputVariableDataSizeExceeded": "Output variable not set as kubectl command output exceeded the maximum supported length. Output length: %s, Maximum supported length: %s", "loc.messages.InvalidConfiguration": "No Kubernetes configuration found, supply either inline configuration or configuration file path", + "loc.messages.CallToolRunnerExec": "Calling Toolrunner exec() method asynchronously to execute the kubectl command and store the returned promise object.", + "loc.messages.ReturningToolRunnerExecPromise": "Called Toolrunner exec() method asynchronously. Returning the promise.", + "loc.messages.ToolRunnerExecCallFailed": "Toolrunner exec() method returned error for the kubectl command. Error: %s.", + "loc.messages.ToolRunnerExecCallSucceeded": "Toolrunner exec() method returned successfully for the kubectl command.", "loc.messages.WritingDockerConfigToTempFile": "Writing Docker config to temp file. File path: %s, Docker config: %s" } \ No newline at end of file diff --git a/Tasks/KubernetesV1/src/clusterconnection.ts b/Tasks/KubernetesV1/src/clusterconnection.ts index 0c2f135e6d82..2a63a652e075 100644 --- a/Tasks/KubernetesV1/src/clusterconnection.ts +++ b/Tasks/KubernetesV1/src/clusterconnection.ts @@ -111,10 +111,21 @@ export default class ClusterConnection { command.on("errline", line => { errlines.push(line); }); - return command.exec(options).fail(error => { + + tl.debug(tl.loc('CallToolRunnerExec')); + + let promise = command.exec(options) + .fail(error => { + tl.debug(tl.loc('ToolRunnerExecCallFailed', error)); errlines.forEach(line => tl.error(line)); throw error; + }) + .then(() => { + tl.debug(tl.loc('ToolRunnerExecCallSucceeded')); }); + + tl.debug(tl.loc('ReturningToolRunnerExecPromise')); + return promise; } private async getKubectl() : Promise { diff --git a/Tasks/KubernetesV1/task.json b/Tasks/KubernetesV1/task.json index d11d26429fe0..40fd9fe0e57f 100644 --- a/Tasks/KubernetesV1/task.json +++ b/Tasks/KubernetesV1/task.json @@ -14,7 +14,7 @@ "version": { "Major": 1, "Minor": 150, - "Patch": 4 + "Patch": 5 }, "demands": [], "releaseNotes": "What's new in Version 1.0:
 Added new service connection type input for easy selection of Azure AKS cluster.
 Replaced output variable input with output variables section that we had added in all tasks.", @@ -476,6 +476,10 @@ "KubernetesServiceConnectionNotFound": "Kubernetes service connection details not found.", "OutputVariableDataSizeExceeded": "Output variable not set as kubectl command output exceeded the maximum supported length. Output length: %s, Maximum supported length: %s", "InvalidConfiguration": "No Kubernetes configuration found, supply either inline configuration or configuration file path", + "CallToolRunnerExec": "Calling Toolrunner exec() method asynchronously to execute the kubectl command and store the returned promise object.", + "ReturningToolRunnerExecPromise": "Called Toolrunner exec() method asynchronously. Returning the promise.", + "ToolRunnerExecCallFailed": "Toolrunner exec() method returned error for the kubectl command. Error: %s.", + "ToolRunnerExecCallSucceeded": "Toolrunner exec() method returned successfully for the kubectl command.", "WritingDockerConfigToTempFile": "Writing Docker config to temp file. File path: %s, Docker config: %s" } } diff --git a/Tasks/KubernetesV1/task.loc.json b/Tasks/KubernetesV1/task.loc.json index 33359120639b..d3dd1d932afa 100644 --- a/Tasks/KubernetesV1/task.loc.json +++ b/Tasks/KubernetesV1/task.loc.json @@ -14,7 +14,7 @@ "version": { "Major": 1, "Minor": 150, - "Patch": 4 + "Patch": 5 }, "demands": [], "releaseNotes": "ms-resource:loc.releaseNotes", @@ -476,6 +476,10 @@ "KubernetesServiceConnectionNotFound": "ms-resource:loc.messages.KubernetesServiceConnectionNotFound", "OutputVariableDataSizeExceeded": "ms-resource:loc.messages.OutputVariableDataSizeExceeded", "InvalidConfiguration": "ms-resource:loc.messages.InvalidConfiguration", + "CallToolRunnerExec": "ms-resource:loc.messages.CallToolRunnerExec", + "ReturningToolRunnerExecPromise": "ms-resource:loc.messages.ReturningToolRunnerExecPromise", + "ToolRunnerExecCallFailed": "ms-resource:loc.messages.ToolRunnerExecCallFailed", + "ToolRunnerExecCallSucceeded": "ms-resource:loc.messages.ToolRunnerExecCallSucceeded", "WritingDockerConfigToTempFile": "ms-resource:loc.messages.WritingDockerConfigToTempFile" } } \ No newline at end of file diff --git a/Tasks/NpmV1/task.json b/Tasks/NpmV1/task.json index f209ee15cabd..66790c982c77 100644 --- a/Tasks/NpmV1/task.json +++ b/Tasks/NpmV1/task.json @@ -10,7 +10,7 @@ "version": { "Major": 1, "Minor": 150, - "Patch": 0 + "Patch": 1 }, "runsOn": [ "Agent", diff --git a/Tasks/NpmV1/task.loc.json b/Tasks/NpmV1/task.loc.json index cab70075e6b0..d59db6be1bf6 100644 --- a/Tasks/NpmV1/task.loc.json +++ b/Tasks/NpmV1/task.loc.json @@ -10,7 +10,7 @@ "version": { "Major": 1, "Minor": 150, - "Patch": 0 + "Patch": 1 }, "runsOn": [ "Agent", diff --git a/Tasks/NuGetCommandV2/task.json b/Tasks/NuGetCommandV2/task.json index 0323ffd839fc..dd9c7b901175 100644 --- a/Tasks/NuGetCommandV2/task.json +++ b/Tasks/NuGetCommandV2/task.json @@ -10,7 +10,7 @@ "version": { "Major": 2, "Minor": 150, - "Patch": 0 + "Patch": 1 }, "runsOn": [ "Agent", diff --git a/Tasks/NuGetCommandV2/task.loc.json b/Tasks/NuGetCommandV2/task.loc.json index 0aa1ee59501b..1734d0400f7d 100644 --- a/Tasks/NuGetCommandV2/task.loc.json +++ b/Tasks/NuGetCommandV2/task.loc.json @@ -10,7 +10,7 @@ "version": { "Major": 2, "Minor": 150, - "Patch": 0 + "Patch": 1 }, "runsOn": [ "Agent", diff --git a/Tasks/NuGetV0/task.json b/Tasks/NuGetV0/task.json index a8d74c5b6e79..eeaf007c398b 100644 --- a/Tasks/NuGetV0/task.json +++ b/Tasks/NuGetV0/task.json @@ -11,7 +11,7 @@ "version": { "Major": 0, "Minor": 150, - "Patch": 0 + "Patch": 1 }, "runsOn": [ "Agent", diff --git a/Tasks/NuGetV0/task.loc.json b/Tasks/NuGetV0/task.loc.json index 109f73ce5e96..62cb240f9772 100644 --- a/Tasks/NuGetV0/task.loc.json +++ b/Tasks/NuGetV0/task.loc.json @@ -11,7 +11,7 @@ "version": { "Major": 0, "Minor": 150, - "Patch": 0 + "Patch": 1 }, "runsOn": [ "Agent", diff --git a/Tasks/PipAuthenticateV0/task.json b/Tasks/PipAuthenticateV0/task.json index 8ff718091036..5c1b4069dc89 100644 --- a/Tasks/PipAuthenticateV0/task.json +++ b/Tasks/PipAuthenticateV0/task.json @@ -10,7 +10,7 @@ "version": { "Major": 0, "Minor": 150, - "Patch": 0 + "Patch": 1 }, "runsOn": [ "Agent", diff --git a/Tasks/PipAuthenticateV0/task.loc.json b/Tasks/PipAuthenticateV0/task.loc.json index 65ddfd860290..6077de240137 100644 --- a/Tasks/PipAuthenticateV0/task.loc.json +++ b/Tasks/PipAuthenticateV0/task.loc.json @@ -10,7 +10,7 @@ "version": { "Major": 0, "Minor": 150, - "Patch": 0 + "Patch": 1 }, "runsOn": [ "Agent", diff --git a/Tasks/TwineAuthenticateV0/task.json b/Tasks/TwineAuthenticateV0/task.json index 43c6d278bafd..084958ab42d0 100644 --- a/Tasks/TwineAuthenticateV0/task.json +++ b/Tasks/TwineAuthenticateV0/task.json @@ -10,7 +10,7 @@ "version": { "Major": 0, "Minor": 150, - "Patch": 0 + "Patch": 1 }, "runsOn": [ "Agent", diff --git a/Tasks/TwineAuthenticateV0/task.loc.json b/Tasks/TwineAuthenticateV0/task.loc.json index 10e3c280945d..ab8bc6441ed4 100644 --- a/Tasks/TwineAuthenticateV0/task.loc.json +++ b/Tasks/TwineAuthenticateV0/task.loc.json @@ -10,7 +10,7 @@ "version": { "Major": 0, "Minor": 150, - "Patch": 0 + "Patch": 1 }, "runsOn": [ "Agent", diff --git a/Tasks/UniversalPackagesV0/task.json b/Tasks/UniversalPackagesV0/task.json index ed61264e982f..2d00270214f9 100644 --- a/Tasks/UniversalPackagesV0/task.json +++ b/Tasks/UniversalPackagesV0/task.json @@ -10,7 +10,7 @@ "version": { "Major": 0, "Minor": 150, - "Patch": 0 + "Patch": 1 }, "runsOn": [ "Agent", diff --git a/Tasks/UniversalPackagesV0/task.loc.json b/Tasks/UniversalPackagesV0/task.loc.json index 8d5aca01898d..5061b8b67d98 100644 --- a/Tasks/UniversalPackagesV0/task.loc.json +++ b/Tasks/UniversalPackagesV0/task.loc.json @@ -10,7 +10,7 @@ "version": { "Major": 0, "Minor": 150, - "Patch": 0 + "Patch": 1 }, "runsOn": [ "Agent",