From 7778d9030c2c74b7003f7c2d116e3b7b5913e662 Mon Sep 17 00:00:00 2001 From: fadnavistanmay <43892780+fadnavistanmay@users.noreply.github.com> Date: Mon, 24 Apr 2023 00:44:36 -0700 Subject: [PATCH] Upgrade vss api netcore version, has BuildXL changes (#4220) * Upgrade vss api netcore version, has BuildXL changes * Adding Nuget authenticate task * Nuget auth task before the build * Try v0 * Remove nuget auth task * Nuget auth * Remove auth task * Remove redundant security package declaration * Adding System.Security.Cryptography.ProtectedData back * Adding cred provider * Removing redundant system.buffers reference * Supress warnings * Remove unused variable * Removing HashType.64k hardcoding --- src/Agent.Listener/Agent.Listener.csproj | 1 + src/Agent.PluginHost/Agent.PluginHost.csproj | 1 + src/Agent.Plugins/Agent.Plugins.csproj | 1 + src/Agent.Sdk/Agent.Sdk.csproj | 3 +-- src/Agent.Sdk/Util/PlatformUtil.cs | 4 ++-- src/Agent.Worker/Agent.Worker.csproj | 2 +- src/Common.props | 2 +- .../Blob/BlobFileInfo.cs | 2 +- .../Blob/BlobStoreUtils.cs | 4 ++-- .../Microsoft.VisualStudio.Services.Agent.csproj | 3 +-- src/Test/L1/Mock/FakeJobServer.cs | 2 +- src/Test/Test.csproj | 5 ++++- 12 files changed, 17 insertions(+), 13 deletions(-) diff --git a/src/Agent.Listener/Agent.Listener.csproj b/src/Agent.Listener/Agent.Listener.csproj index a52235e051..e9e1eb1493 100644 --- a/src/Agent.Listener/Agent.Listener.csproj +++ b/src/Agent.Listener/Agent.Listener.csproj @@ -4,6 +4,7 @@ Exe + true diff --git a/src/Agent.PluginHost/Agent.PluginHost.csproj b/src/Agent.PluginHost/Agent.PluginHost.csproj index f68fc56128..7aed7f31dd 100644 --- a/src/Agent.PluginHost/Agent.PluginHost.csproj +++ b/src/Agent.PluginHost/Agent.PluginHost.csproj @@ -4,6 +4,7 @@ Exe + true diff --git a/src/Agent.Plugins/Agent.Plugins.csproj b/src/Agent.Plugins/Agent.Plugins.csproj index f71a17560d..e58759a558 100644 --- a/src/Agent.Plugins/Agent.Plugins.csproj +++ b/src/Agent.Plugins/Agent.Plugins.csproj @@ -4,6 +4,7 @@ Library + true diff --git a/src/Agent.Sdk/Agent.Sdk.csproj b/src/Agent.Sdk/Agent.Sdk.csproj index 25630c0443..98c85e1c74 100644 --- a/src/Agent.Sdk/Agent.Sdk.csproj +++ b/src/Agent.Sdk/Agent.Sdk.csproj @@ -3,15 +3,14 @@ Library + true - - \ No newline at end of file diff --git a/src/Agent.Sdk/Util/PlatformUtil.cs b/src/Agent.Sdk/Util/PlatformUtil.cs index 37590a1f89..9cb7304310 100644 --- a/src/Agent.Sdk/Util/PlatformUtil.cs +++ b/src/Agent.Sdk/Util/PlatformUtil.cs @@ -391,7 +391,7 @@ public static bool DetectDockerContainer() } } } - catch (Exception ex) + catch (Exception) { // Logging exception will be handled by JobRunner throw; @@ -411,7 +411,7 @@ public static bool DetectAzureVM() if (metadataProvider.HasMetadata()) isAzureVM = true; } - catch (Exception ex) + catch (Exception) { // Logging exception will be handled by JobRunner throw; diff --git a/src/Agent.Worker/Agent.Worker.csproj b/src/Agent.Worker/Agent.Worker.csproj index 9172bf1f75..3328d9276a 100644 --- a/src/Agent.Worker/Agent.Worker.csproj +++ b/src/Agent.Worker/Agent.Worker.csproj @@ -4,6 +4,7 @@ Exe + true @@ -14,7 +15,6 @@ - diff --git a/src/Common.props b/src/Common.props index f4846110a4..1234681446 100644 --- a/src/Common.props +++ b/src/Common.props @@ -10,7 +10,7 @@ OS_UNKNOWN ARCH_UNKNOWN - 0.5.181-private + 0.5.183-private $(CodeAnalysis) diff --git a/src/Microsoft.VisualStudio.Services.Agent/Blob/BlobFileInfo.cs b/src/Microsoft.VisualStudio.Services.Agent/Blob/BlobFileInfo.cs index 9e1906547e..56b61483f6 100644 --- a/src/Microsoft.VisualStudio.Services.Agent/Blob/BlobFileInfo.cs +++ b/src/Microsoft.VisualStudio.Services.Agent/Blob/BlobFileInfo.cs @@ -13,7 +13,7 @@ public DedupIdentifier DedupId { get { - return Node.GetDedupIdentifier(HashType.Dedup64K); + return Node.GetDedupIdentifier(); } } public bool Success { get; set; } diff --git a/src/Microsoft.VisualStudio.Services.Agent/Blob/BlobStoreUtils.cs b/src/Microsoft.VisualStudio.Services.Agent/Blob/BlobStoreUtils.cs index 662ed20a92..56928caca8 100644 --- a/src/Microsoft.VisualStudio.Services.Agent/Blob/BlobStoreUtils.cs +++ b/src/Microsoft.VisualStudio.Services.Agent/Blob/BlobStoreUtils.cs @@ -43,7 +43,7 @@ public static class BlobStoreUtils foreach (var file in fileNodes.Where(x => x.Success)) { // ChunkHelper uses 64k block default size - var dedupId = file.Node.GetDedupIdentifier(HashType.Dedup64K); + var dedupId = file.Node.GetDedupIdentifier(); fileDedupIds[dedupId] = file.Path; } @@ -180,7 +180,7 @@ private static DedupNode CreateNodeToUpload(IEnumerable nodes) var chunk = await ChunkerHelper.CreateFromFileAsync(FileSystem.Instance, itemPath, cancellationToken, false); var rootNode = new DedupNode(new[] { chunk }); // ChunkHelper uses 64k block default size - var dedupId = rootNode.GetDedupIdentifier(HashType.Dedup64K); + var dedupId = rootNode.GetDedupIdentifier(); // Setup upload session to keep file for at mimimum one day // Blobs will need to be associated with the server with an ID ref otherwise they will be diff --git a/src/Microsoft.VisualStudio.Services.Agent/Microsoft.VisualStudio.Services.Agent.csproj b/src/Microsoft.VisualStudio.Services.Agent/Microsoft.VisualStudio.Services.Agent.csproj index 85fa0623ca..658f0f3311 100644 --- a/src/Microsoft.VisualStudio.Services.Agent/Microsoft.VisualStudio.Services.Agent.csproj +++ b/src/Microsoft.VisualStudio.Services.Agent/Microsoft.VisualStudio.Services.Agent.csproj @@ -4,6 +4,7 @@ Library + true @@ -13,8 +14,6 @@ - - diff --git a/src/Test/L1/Mock/FakeJobServer.cs b/src/Test/L1/Mock/FakeJobServer.cs index c19de4341b..c69c153457 100644 --- a/src/Test/L1/Mock/FakeJobServer.cs +++ b/src/Test/L1/Mock/FakeJobServer.cs @@ -142,7 +142,7 @@ public Task UploadLogToBlobStore(Stream blob, string h UploadedAttachmentBlobFiles.Add(itemPath); var chunk = await ChunkerHelper.CreateFromFileAsync(FileSystem.Instance, itemPath, cancellationToken, false); var rootNode = new DedupNode(new[] { chunk }); - var dedupId = rootNode.GetDedupIdentifier(HashType.Dedup64K); + var dedupId = rootNode.GetDedupIdentifier(); return (dedupId, rootNode.TransitiveContentBytes); } diff --git a/src/Test/Test.csproj b/src/Test/Test.csproj index b3f8cf3b98..3d4ff03b59 100644 --- a/src/Test/Test.csproj +++ b/src/Test/Test.csproj @@ -8,13 +8,16 @@ + + true + + -