From 695fc57205879d9626be2c01a8e60eba944e2461 Mon Sep 17 00:00:00 2001 From: Divyansh Manchanda Date: Wed, 13 Mar 2019 14:03:17 +0530 Subject: [PATCH] Not calling github APIs to validate version number (#9817) * not checking for valid version for kubectl tool * bumping up kubernetes task version * add v in front of version --- Tasks/KubernetesV1/src/utilities.ts | 14 ++++++++++++-- Tasks/KubernetesV1/task.json | 2 +- Tasks/KubernetesV1/task.loc.json | 2 +- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Tasks/KubernetesV1/src/utilities.ts b/Tasks/KubernetesV1/src/utilities.ts index 963578677d1f..9ce1f5ec3059 100644 --- a/Tasks/KubernetesV1/src/utilities.ts +++ b/Tasks/KubernetesV1/src/utilities.ts @@ -47,9 +47,19 @@ export async function getKubectlVersion(versionSpec: string, checkLatest: boolea tl.warning(tl.loc("UsingLatestStableVersion")); return kubectlutility.getStableKubectlVersion(); } + else if ("v".concat(versionSpec) === kubectlutility.stableKubectlVersion) { + tl.debug(util.format("Using default versionSpec:%s.", versionSpec)); + return kubectlutility.stableKubectlVersion; + } else { - let versions = await kubectlutility.getAvailableKubectlVersions(); - return sanitizeVersionString(versions, versionSpec); + // Do not check for validity of the version here, + // We'll return proper error message when the download fails + if(!versionSpec.startsWith("v")) { + return "v".concat(versionSpec); + } + else{ + return versionSpec; + } } } diff --git a/Tasks/KubernetesV1/task.json b/Tasks/KubernetesV1/task.json index 68ce78ef5d23..36732d151df8 100644 --- a/Tasks/KubernetesV1/task.json +++ b/Tasks/KubernetesV1/task.json @@ -14,7 +14,7 @@ "version": { "Major": 1, "Minor": 1, - "Patch": 26 + "Patch": 29 }, "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.", diff --git a/Tasks/KubernetesV1/task.loc.json b/Tasks/KubernetesV1/task.loc.json index ff778f67f53c..4fe47c8669c2 100644 --- a/Tasks/KubernetesV1/task.loc.json +++ b/Tasks/KubernetesV1/task.loc.json @@ -14,7 +14,7 @@ "version": { "Major": 1, "Minor": 1, - "Patch": 26 + "Patch": 29 }, "demands": [], "releaseNotes": "ms-resource:loc.releaseNotes",