Skip to content

Commit c01ad6a

Browse files
sanjuyadav24Sanju Yadav
and
Sanju Yadav
authored
Revert "Upgrate new version of tf.exe - vstsom.zip - AB#2257240 (#5138)" (#5217)
This reverts commit 1b7fa9f. Co-authored-by: Sanju Yadav <[email protected]>
1 parent a599018 commit c01ad6a

File tree

4 files changed

+7
-38
lines changed

4 files changed

+7
-38
lines changed

src/Agent.Sdk/Knob/AgentKnobs.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -787,14 +787,6 @@ public class AgentKnobs
787787
new EnvironmentKnobSource("PIPELINE_ARTIFACT_ASSOCIATE_TIMEOUT"),
788788
new BuiltInDefaultKnobSource("900")); // 15 * 60 - Setting the timeout to 15 minutes to account for slowness from azure storage and retries.
789789

790-
public static readonly Knob RollbackToDefaultTfExe = new Knob(
791-
nameof(RollbackToDefaultTfExe),
792-
"If true, the agent will install the default versions of TF, vstsom",
793-
new RuntimeKnobSource("ROLLBACK_TO_DEFAULT_TF_EXE"),
794-
new EnvironmentKnobSource("ROLLBACK_TO_DEFAULT_TF_EXE"),
795-
new PipelineFeatureSource("RollbackToDefaultTfExe"),
796-
new BuiltInDefaultKnobSource("false"));
797-
798790
public static readonly Knob AgentCDNConnectivityFailWarning = new Knob(
799791
nameof(AgentCDNConnectivityFailWarning),
800792
"Show warning message when the Agent CDN Endpoint (download.agent.dev.azure.com) is not reachable. ",

src/Agent.Worker/TfManager.cs

Lines changed: 2 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
using System.Net.Http;
77
using System.Threading;
88
using System.Threading.Tasks;
9-
using Agent.Sdk.Knob;
109

1110
namespace Microsoft.VisualStudio.Services.Agent.Worker
1211
{
@@ -35,17 +34,7 @@ public static async Task DownloadLegacyTfToolsAsync(IExecutionContext executionC
3534

3635
if (!Directory.Exists(tfLegacyExternalsPath))
3736
{
38-
string tfDownloadUrl;
39-
if (!AgentKnobs.RollbackToDefaultTfExe.GetValue(executionContext).AsBoolean())
40-
{
41-
tfDownloadUrl = "https://vstsagenttools.blob.core.windows.net/tools/vstsom/m153_47c0856d/vstsom.zip";
42-
executionContext.Debug("Using the legacy version of tf.exe");
43-
}
44-
else
45-
{
46-
tfDownloadUrl = "https://vstsagenttools.blob.core.windows.net/tools/vstsom/m153_47c0856d_adhoc/vstsom.zip";
47-
executionContext.Debug("Using the default version of tf.exe");
48-
}
37+
const string tfDownloadUrl = "https://vstsagenttools.blob.core.windows.net/tools/vstsom/m153_47c0856d/vstsom.zip";
4938
string tempTfDirectory = Path.Combine(externalsPath, "tf_download_temp");
5039

5140
await DownloadAsync(executionContext, tfDownloadUrl, tempTfDirectory, tfLegacyExternalsPath, retryOptions);
@@ -59,17 +48,7 @@ public static async Task DownloadLegacyTfToolsAsync(IExecutionContext executionC
5948

6049
if (!Directory.Exists(vstsomLegacyExternalsPath))
6150
{
62-
string vstsomDownloadUrl;
63-
if (!AgentKnobs.RollbackToDefaultTfExe.GetValue(executionContext).AsBoolean())
64-
{
65-
vstsomDownloadUrl = "https://vstsagenttools.blob.core.windows.net/tools/vstsom/m122_887c6659/vstsom.zip";
66-
executionContext.Debug("Using the legacy version of vstsom");
67-
}
68-
else
69-
{
70-
vstsomDownloadUrl = "https://vstsagenttools.blob.core.windows.net/tools/vstsom/m153_47c0856d_adhoc/vstsom.zip";
71-
executionContext.Debug("Using the default version of vstsom");
72-
}
51+
const string vstsomDownloadUrl = "https://vstsagenttools.blob.core.windows.net/tools/vstsom/m122_887c6659/vstsom.zip";
7352
string tempVstsomDirectory = Path.Combine(externalsPath, "vstsom_download_temp");
7453

7554
await DownloadAsync(executionContext, vstsomDownloadUrl, tempVstsomDirectory, vstsomLegacyExternalsPath, retryOptions);

src/Misc/externals.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,14 +173,14 @@ if [[ "$PACKAGERUNTIME" == "win-x"* ]]; then
173173
BIT="64"
174174
acquireExternalTool "$CONTAINER_URL/azcopy/1/azcopy.zip" azcopy
175175
acquireExternalTool "$CONTAINER_URL/vstshost/m122_887c6659_binding_redirect_patched/vstshost.zip" vstshost
176-
acquireExternalTool "$CONTAINER_URL/vstsom/dev17.11vs_c0748e6e/vstsom.zip" vstsom
176+
acquireExternalTool "$CONTAINER_URL/vstsom/m153_47c0856d_adhoc/vstsom.zip" vstsom
177177
fi
178178

179179
acquireExternalTool "$CONTAINER_URL/mingit/${MINGIT_VERSION}/MinGit-${MINGIT_VERSION}-${BIT}-bit.zip" git
180180
acquireExternalTool "$CONTAINER_URL/git-lfs/${LFS_VERSION}/x${BIT}/git-lfs.exe" "git/mingw${BIT}/bin"
181181
acquireExternalTool "$CONTAINER_URL/pdbstr/1/pdbstr.zip" pdbstr
182182
acquireExternalTool "$CONTAINER_URL/symstore/1/symstore.zip" symstore
183-
acquireExternalTool "$CONTAINER_URL/vstsom/dev17.11vs_c0748e6e/vstsom.zip" tf
183+
acquireExternalTool "$CONTAINER_URL/vstsom/m153_47c0856d_adhoc/vstsom.zip" tf
184184
acquireExternalTool "$CONTAINER_URL/vswhere/2_8_4/vswhere.zip" vswhere
185185
acquireExternalTool "https://dist.nuget.org/win-x86-commandline/v4.6.4/nuget.exe" nuget
186186

@@ -205,14 +205,14 @@ elif [[ "$PACKAGERUNTIME" == "win-arm64" || "$PACKAGERUNTIME" == "win-arm32" ]];
205205

206206
# acquireExternalTool "$CONTAINER_URL/azcopy/1/azcopy.zip" azcopy # Unavailable for Win ARM 64 - https://learn.microsoft.com/en-us/azure/storage/common/storage-use-azcopy-v10?tabs=dnf#download-the-azcopy-portable-binary
207207
acquireExternalTool "$CONTAINER_URL/vstshost/m122_887c6659_binding_redirect_patched/vstshost.zip" vstshost # Custom package. Will the same work for Win ARM 64?
208-
acquireExternalTool "$CONTAINER_URL/vstsom/dev17.11vs_c0748e6e/vstsom.zip" vstsom # Custom package. Will the same work for Win ARM 64?
208+
acquireExternalTool "$CONTAINER_URL/vstsom/m153_47c0856d_adhoc/vstsom.zip" vstsom # Custom package. Will the same work for Win ARM 64?
209209
fi
210210

211211
acquireExternalTool "$CONTAINER_URL/mingit/${MINGIT_VERSION}/MinGit-${MINGIT_VERSION}-${BIT}-bit.zip" git # Unavailable for Win ARM 64 - https://github.com/git-for-windows/git/releases
212212
acquireExternalTool "$CONTAINER_URL/git-lfs/${LFS_VERSION}/win-arm${BIT}/git-lfs.exe" "git/mingw${BIT}/bin"
213213
acquireExternalTool "$CONTAINER_URL/pdbstr/win-arm${BIT}/1/pdbstr.zip" pdbstr
214214
acquireExternalTool "$CONTAINER_URL/symstore/win-arm${BIT}/1/symstore.zip" symstore
215-
acquireExternalTool "$CONTAINER_URL/vstsom/dev17.11vs_c0748e6e/vstsom.zip" tf
215+
acquireExternalTool "$CONTAINER_URL/vstsom/m153_47c0856d_adhoc/vstsom.zip" tf
216216
acquireExternalTool "$CONTAINER_URL/vswhere/2_8_4/vswhere.zip" vswhere
217217
acquireExternalTool "https://dist.nuget.org/win-x86-commandline/v4.6.4/nuget.exe" nuget
218218

src/Test/L0/Worker/TfManagerL0.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
using System.IO;
66
using System.Threading;
77
using System.Threading.Tasks;
8-
using Agent.Sdk.Knob;
98
using Microsoft.VisualStudio.Services.Agent.Util;
109
using Microsoft.VisualStudio.Services.Agent.Worker;
1110
using Moq;
@@ -32,7 +31,6 @@ public async Task DownloadTfLegacyToolsAsync()
3231
executionContext.Setup(x => x.CancellationToken).Returns(tokenSource.Token);
3332
executionContext.Setup(x => x.GetVariableValueOrDefault(It.Is<string>(s => s == "Agent.HomeDirectory")))
3433
.Returns(hostContext.GetDirectory(WellKnownDirectory.Root));
35-
executionContext.Setup(x => x.GetVariableValueOrDefault("ROLLBACK_TO_DEFAULT_TF_EXE")).Returns("false");
3634

3735
string externalsPath = hostContext.GetDirectory(WellKnownDirectory.Externals);
3836
string tfPath = Path.Combine(externalsPath, TfLegacy);
@@ -80,7 +78,7 @@ public async Task DownloadAsync_Retries()
8078
retryOptions.Setup(opt => opt.ToString()).Throws<Exception>();
8179
retryOptions.Setup(opt => opt.Limit).Returns(3);
8280

83-
const string downloadUrl = "https://vstsagenttools.blob.core.windows.net/tools/vstsom/m153_47c0856d/vstsom.zip";
81+
const string downloadUrl = "https://vstsagenttools.blob.core.windows.net/tools/vstsom/m122_887c6659/vstsom.zip";
8482
string tempDirectory = Path.Combine(hostContext.GetDirectory(WellKnownDirectory.Externals), "temp-test");
8583
string extractDirectory = Path.Combine(hostContext.GetDirectory(WellKnownDirectory.Externals), "test");
8684

0 commit comments

Comments
 (0)