Skip to content
This repository was archived by the owner on Jul 30, 2024. It is now read-only.

Commit 8a3b27d

Browse files
committed
Remove legacy validation code (VCS-based) (#605)
Progress on https://github.com/NuGet/Engineering/issues/123
1 parent f85cafb commit 8a3b27d

99 files changed

Lines changed: 28 additions & 4826 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

NuGet.Jobs.sln

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Stats.RollUpDownloadFacts",
5555
EndProject
5656
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Validation", "Validation", "{678D7B14-F8BC-4193-99AF-2EE8AA390A02}"
5757
EndProject
58-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Validation.Common", "src\Validation.Common\Validation.Common.csproj", "{2539DDF3-0CC5-4A03-B5F9-39B47744A7BD}"
59-
EndProject
60-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Validation.Runner", "src\Validation.Runner\Validation.Runner.csproj", "{1EB7FF94-9B4A-4008-8F8E-5F867C0B00DE}"
61-
EndProject
6258
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Gallery", "Gallery", "{88725659-D5F8-49F9-9B7E-D87C5B9917D7}"
6359
EndProject
6460
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gallery.CredentialExpiration", "src\Gallery.CredentialExpiration\Gallery.CredentialExpiration.csproj", "{FA8C7905-985F-4919-AAA9-4B9A252F4977}"
@@ -71,10 +67,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gallery.Maintenance", "src\
7167
EndProject
7268
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CopyAzureContainer", "src\CopyAzureContainer\CopyAzureContainer.csproj", "{A07F7D0C-F269-43D5-A812-3ABC47090885}"
7369
EndProject
74-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Validation.Helper", "src\Validation.Helper\Validation.Helper.csproj", "{305FB2C1-01FD-413D-B788-7B85BAD85A41}"
75-
EndProject
76-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Validation.Helper.Tests", "tests\Validation.Helper.Tests\Validation.Helper.Tests.csproj", "{8336BEBE-EC6A-4E40-A1C9-8C34A507E62D}"
77-
EndProject
7870
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NuGetCDNRedirect", "src\NuGetCDNRedirect\NuGetCDNRedirect.csproj", "{BC9EA7CE-AD21-4D17-B581-F8ED8CBD7191}"
7971
EndProject
8072
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests.Search.GenerateAuxiliaryData", "tests\Tests.Search.GenerateAuxiliaryData\Tests.Search.GenerateAuxiliaryData.csproj", "{BA59047E-846A-472C-8587-73719DDB29CE}"
@@ -89,8 +81,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NuGet.Services.Validation.O
8981
EndProject
9082
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NuGet.Services.Validation.Orchestrator.Tests", "tests\NuGet.Services.Validation.Orchestrator.Tests\NuGet.Services.Validation.Orchestrator.Tests.csproj", "{A3B0B15D-22D9-4F1F-94C4-B24B28ECF632}"
9183
EndProject
92-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Validation.Common.Tests", "tests\Validation.Common.Tests\Validation.Common.Tests.csproj", "{F9690B52-3C92-42A0-B41F-1A6040C2D2EE}"
93-
EndProject
9484
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Validation.PackageSigning.Core", "src\Validation.PackageSigning.Core\Validation.PackageSigning.Core.csproj", "{91C060DA-736F-4DA9-A57F-CB3AC0E6CB10}"
9585
EndProject
9686
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Validation.PackageSigning.ValidateCertificate", "src\Validation.PackageSigning.ValidateCertificate\Validation.PackageSigning.ValidateCertificate.csproj", "{A245E448-8AE0-452B-9338-8C0E0B637D72}"
@@ -219,14 +209,6 @@ Global
219209
{3E0A20C8-C6D2-4762-955D-C7BF35C2C9A7}.Debug|Any CPU.Build.0 = Debug|Any CPU
220210
{3E0A20C8-C6D2-4762-955D-C7BF35C2C9A7}.Release|Any CPU.ActiveCfg = Release|Any CPU
221211
{3E0A20C8-C6D2-4762-955D-C7BF35C2C9A7}.Release|Any CPU.Build.0 = Release|Any CPU
222-
{2539DDF3-0CC5-4A03-B5F9-39B47744A7BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
223-
{2539DDF3-0CC5-4A03-B5F9-39B47744A7BD}.Debug|Any CPU.Build.0 = Debug|Any CPU
224-
{2539DDF3-0CC5-4A03-B5F9-39B47744A7BD}.Release|Any CPU.ActiveCfg = Release|Any CPU
225-
{2539DDF3-0CC5-4A03-B5F9-39B47744A7BD}.Release|Any CPU.Build.0 = Release|Any CPU
226-
{1EB7FF94-9B4A-4008-8F8E-5F867C0B00DE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
227-
{1EB7FF94-9B4A-4008-8F8E-5F867C0B00DE}.Debug|Any CPU.Build.0 = Debug|Any CPU
228-
{1EB7FF94-9B4A-4008-8F8E-5F867C0B00DE}.Release|Any CPU.ActiveCfg = Release|Any CPU
229-
{1EB7FF94-9B4A-4008-8F8E-5F867C0B00DE}.Release|Any CPU.Build.0 = Release|Any CPU
230212
{FA8C7905-985F-4919-AAA9-4B9A252F4977}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
231213
{FA8C7905-985F-4919-AAA9-4B9A252F4977}.Debug|Any CPU.Build.0 = Debug|Any CPU
232214
{FA8C7905-985F-4919-AAA9-4B9A252F4977}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -243,14 +225,6 @@ Global
243225
{A07F7D0C-F269-43D5-A812-3ABC47090885}.Debug|Any CPU.Build.0 = Debug|Any CPU
244226
{A07F7D0C-F269-43D5-A812-3ABC47090885}.Release|Any CPU.ActiveCfg = Release|Any CPU
245227
{A07F7D0C-F269-43D5-A812-3ABC47090885}.Release|Any CPU.Build.0 = Release|Any CPU
246-
{305FB2C1-01FD-413D-B788-7B85BAD85A41}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
247-
{305FB2C1-01FD-413D-B788-7B85BAD85A41}.Debug|Any CPU.Build.0 = Debug|Any CPU
248-
{305FB2C1-01FD-413D-B788-7B85BAD85A41}.Release|Any CPU.ActiveCfg = Release|Any CPU
249-
{305FB2C1-01FD-413D-B788-7B85BAD85A41}.Release|Any CPU.Build.0 = Release|Any CPU
250-
{8336BEBE-EC6A-4E40-A1C9-8C34A507E62D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
251-
{8336BEBE-EC6A-4E40-A1C9-8C34A507E62D}.Debug|Any CPU.Build.0 = Debug|Any CPU
252-
{8336BEBE-EC6A-4E40-A1C9-8C34A507E62D}.Release|Any CPU.ActiveCfg = Release|Any CPU
253-
{8336BEBE-EC6A-4E40-A1C9-8C34A507E62D}.Release|Any CPU.Build.0 = Release|Any CPU
254228
{BC9EA7CE-AD21-4D17-B581-F8ED8CBD7191}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
255229
{BC9EA7CE-AD21-4D17-B581-F8ED8CBD7191}.Debug|Any CPU.Build.0 = Debug|Any CPU
256230
{BC9EA7CE-AD21-4D17-B581-F8ED8CBD7191}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -279,10 +253,6 @@ Global
279253
{A3B0B15D-22D9-4F1F-94C4-B24B28ECF632}.Debug|Any CPU.Build.0 = Debug|Any CPU
280254
{A3B0B15D-22D9-4F1F-94C4-B24B28ECF632}.Release|Any CPU.ActiveCfg = Release|Any CPU
281255
{A3B0B15D-22D9-4F1F-94C4-B24B28ECF632}.Release|Any CPU.Build.0 = Release|Any CPU
282-
{F9690B52-3C92-42A0-B41F-1A6040C2D2EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
283-
{F9690B52-3C92-42A0-B41F-1A6040C2D2EE}.Debug|Any CPU.Build.0 = Debug|Any CPU
284-
{F9690B52-3C92-42A0-B41F-1A6040C2D2EE}.Release|Any CPU.ActiveCfg = Release|Any CPU
285-
{F9690B52-3C92-42A0-B41F-1A6040C2D2EE}.Release|Any CPU.Build.0 = Release|Any CPU
286256
{91C060DA-736F-4DA9-A57F-CB3AC0E6CB10}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
287257
{91C060DA-736F-4DA9-A57F-CB3AC0E6CB10}.Debug|Any CPU.Build.0 = Debug|Any CPU
288258
{91C060DA-736F-4DA9-A57F-CB3AC0E6CB10}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -419,22 +389,17 @@ Global
419389
{B5C01B7A-933D-483E-AF07-6AA266B0EB49} = {B9D03824-A9CA-43AC-86D6-8BB399B9A228}
420390
{CF7645A4-B4C0-4827-B6B0-AE42108071C6} = {57F34E9A-3A98-4E48-BF76-D49CB9CB3323}
421391
{3E0A20C8-C6D2-4762-955D-C7BF35C2C9A7} = {B9D03824-A9CA-43AC-86D6-8BB399B9A228}
422-
{2539DDF3-0CC5-4A03-B5F9-39B47744A7BD} = {678D7B14-F8BC-4193-99AF-2EE8AA390A02}
423-
{1EB7FF94-9B4A-4008-8F8E-5F867C0B00DE} = {678D7B14-F8BC-4193-99AF-2EE8AA390A02}
424392
{FA8C7905-985F-4919-AAA9-4B9A252F4977} = {88725659-D5F8-49F9-9B7E-D87C5B9917D7}
425393
{12719498-B87E-4E92-8C2B-30046393CF85} = {BEC3DF4D-9A04-42C8-8B4F-D42750202B4D}
426394
{EFF021CA-1BF4-4C09-BFB8-D314EAAD24D2} = {88725659-D5F8-49F9-9B7E-D87C5B9917D7}
427395
{A07F7D0C-F269-43D5-A812-3ABC47090885} = {FA5644B5-4F08-43F6-86B3-039374312A47}
428-
{305FB2C1-01FD-413D-B788-7B85BAD85A41} = {678D7B14-F8BC-4193-99AF-2EE8AA390A02}
429-
{8336BEBE-EC6A-4E40-A1C9-8C34A507E62D} = {6A776396-02B1-475D-A104-26940ADB04AB}
430396
{BC9EA7CE-AD21-4D17-B581-F8ED8CBD7191} = {FA5644B5-4F08-43F6-86B3-039374312A47}
431397
{BA59047E-846A-472C-8587-73719DDB29CE} = {6A776396-02B1-475D-A104-26940ADB04AB}
432398
{147A757D-864B-4C74-B8CF-14DFF9793605} = {6A776396-02B1-475D-A104-26940ADB04AB}
433399
{FC0CEF12-D501-46D1-B1BF-D4134BD8D478} = {B9D03824-A9CA-43AC-86D6-8BB399B9A228}
434400
{0C887292-C5AB-4107-946C-A53B18A38D22} = {6A776396-02B1-475D-A104-26940ADB04AB}
435401
{E6D094FB-9068-4578-B176-116F97E7506B} = {678D7B14-F8BC-4193-99AF-2EE8AA390A02}
436402
{A3B0B15D-22D9-4F1F-94C4-B24B28ECF632} = {6A776396-02B1-475D-A104-26940ADB04AB}
437-
{F9690B52-3C92-42A0-B41F-1A6040C2D2EE} = {6A776396-02B1-475D-A104-26940ADB04AB}
438403
{91C060DA-736F-4DA9-A57F-CB3AC0E6CB10} = {678D7B14-F8BC-4193-99AF-2EE8AA390A02}
439404
{A245E448-8AE0-452B-9338-8C0E0B637D72} = {678D7B14-F8BC-4193-99AF-2EE8AA390A02}
440405
{5ACE7756-F8D0-4D90-9957-872DE4A1381E} = {6A776396-02B1-475D-A104-26940ADB04AB}

build.ps1

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ Invoke-BuildStep 'Clearing artifacts' { Clear-Artifacts } `
8787

8888
Invoke-BuildStep 'Set version metadata in AssemblyInfo.cs' { `
8989
$versionMetadata =
90-
"$PSScriptRoot\src\Validation.Helper\Properties\AssemblyInfo.g.cs",
9190
"$PSScriptRoot\src\CopyAzureContainer\Properties\AssemblyInfo.g.cs",
9291
"$PSScriptRoot\src\NuGetCDNRedirect\Properties\AssemblyInfo.g.cs",
9392
"$PSScriptRoot\src\NuGet.Services.Validation.Orchestrator\Properties\AssemblyInfo.g.cs",
@@ -96,7 +95,6 @@ Invoke-BuildStep 'Set version metadata in AssemblyInfo.cs' { `
9695
"$PSScriptRoot\src\Validation.PackageSigning.ProcessSignature\Properties\AssemblyInfo.g.cs",
9796
"$PSScriptRoot\src\Validation.PackageSigning.ValidateCertificate\Properties\AssemblyInfo.g.cs",
9897
"$PSScriptRoot\src\Validation.PackageSigning.RevalidateCertificate\Properties\AssemblyInfo.g.cs",
99-
"$PSScriptRoot\src\NuGet.Jobs.Common\Properties\AssemblyInfo.g.cs",
10098
"$PSScriptRoot\src\Validation.Common.Job\Properties\AssemblyInfo.g.cs",
10199
"$PSScriptRoot\src\Validation.ScanAndSign.Core\Properties\AssemblyInfo.g.cs",
102100
"$PSScriptRoot\src\PackageLagMonitor\Properties\AssemblyInfo.g.cs",
@@ -150,9 +148,7 @@ Invoke-BuildStep 'Creating artifacts' {
150148
"src/ArchivePackages/ArchivePackages.csproj", `
151149
"src/Search.GenerateAuxiliaryData/Search.GenerateAuxiliaryData.csproj", `
152150
"src/Stats.RollUpDownloadFacts/Stats.RollUpDownloadFacts.csproj", `
153-
"src/Validation.Runner/Validation.Runner.csproj", `
154151
"src/NuGet.SupportRequests.Notifications/NuGet.SupportRequests.Notifications.csproj", `
155-
"src/Validation.Helper/Validation.Helper.csproj", `
156152
"src/CopyAzureContainer/CopyAzureContainer.csproj", `
157153
"src/NuGetCDNRedirect/NuGetCDNRedirect.csproj", `
158154
"src/NuGet.Services.Validation.Orchestrator/NuGet.Services.Validation.Orchestrator.csproj", `

src/NuGet.Jobs.Common/Configuration/JobArgumentNames.cs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,6 @@ public static class JobArgumentNames
9999
public const string PackageUrlTemplate = "PackageUrlTemplate";
100100
public const string BatchSize = "BatchSize";
101101

102-
// Arguments specific to VCS validation task
103-
public const string VcsValidatorServiceUrl = "VcsValidatorServiceUrl";
104-
public const string VcsValidatorCallbackUrl = "VcsValidatorCallbackUrl";
105-
public const string VcsContactAlias = "VcsContactAlias";
106-
public const string VcsValidatorSubmitterAlias = "VcsValidatorAlias";
107-
108102
// Key Vault
109103
public const string VaultName = "VaultName";
110104
public const string ClientId = "ClientId";

src/NuGet.Services.Validation.Orchestrator/Vcs/IPackageCriteria.cs renamed to src/NuGet.Services.Validation.Orchestrator/Criteria/IPackageCriteria.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
using System.Collections.Generic;
55

6-
namespace NuGet.Services.Validation.Vcs
6+
namespace NuGet.Services.Validation
77
{
88
/// <summary>
99
/// Generic criteria used to include or exclude packages from a process.

src/NuGet.Services.Validation.Orchestrator/Vcs/IPackageCriteriaEvaluator.cs renamed to src/NuGet.Services.Validation.Orchestrator/Criteria/IPackageCriteriaEvaluator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
using NuGet.Services.Entities;
55

6-
namespace NuGet.Services.Validation.Vcs
6+
namespace NuGet.Services.Validation
77
{
88
/// <summary>
99
/// Evaluates whether a given entity matches some criteria.

src/NuGet.Services.Validation.Orchestrator/Vcs/PackageCriteria.cs renamed to src/NuGet.Services.Validation.Orchestrator/Criteria/PackageCriteria.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
using System.Collections.Generic;
55

6-
namespace NuGet.Services.Validation.Vcs
6+
namespace NuGet.Services.Validation
77
{
88
public class PackageCriteria : ICriteria
99
{

src/NuGet.Services.Validation.Orchestrator/Vcs/PackageCriteriaEvaluator.cs renamed to src/NuGet.Services.Validation.Orchestrator/Criteria/PackageCriteriaEvaluator.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
using System.Text.RegularExpressions;
77
using NuGet.Services.Entities;
88

9-
namespace NuGet.Services.Validation.Vcs
9+
namespace NuGet.Services.Validation
1010
{
1111
public class PackageCriteriaEvaluator : ICriteriaEvaluator<Package>
1212
{

src/NuGet.Services.Validation.Orchestrator/Error.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ public static class Error
99
{
1010
public static EventId ConfigurationReadFailure = new EventId(1, "Failed to process configuration");
1111
public static EventId ConfigurationValidationFailure = new EventId(2, "Configuration is invalid");
12-
public static EventId VcsValidationAlreadyStarted = new EventId(3, "VCS validation already started");
13-
public static EventId VcsValidationFailureAuditFound = new EventId(4, "VCS validation failure audit found");
14-
public static EventId VcsValidationUnexpectedAuditFound = new EventId(5, "VCS validation unexpected audit found");
1512
public static EventId OrchestratorOnMessageException = new EventId(6, "Failed to process orchestrator message");
1613
public static EventId UpdatingPackageDbStatusFailed = new EventId(7, "Failed to update package status in DB");
1714

src/NuGet.Services.Validation.Orchestrator/Job.cs

Lines changed: 5 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -17,31 +17,28 @@
1717
using Microsoft.Extensions.DependencyInjection;
1818
using Microsoft.Extensions.Logging;
1919
using Microsoft.Extensions.Options;
20-
using Microsoft.WindowsAzure.Storage;
2120
using NuGet.Jobs;
2221
using NuGet.Jobs.Configuration;
2322
using NuGet.Jobs.Validation;
24-
using NuGet.Jobs.Validation.Common;
2523
using NuGet.Jobs.Validation.PackageSigning.Messages;
2624
using NuGet.Jobs.Validation.ScanAndSign;
2725
using NuGet.Jobs.Validation.Storage;
28-
using NuGet.Services.Validation.Symbols;
2926
using NuGet.Jobs.Validation.Symbols.Core;
3027
using NuGet.Services.Configuration;
28+
using NuGet.Services.Entities;
3129
using NuGet.Services.KeyVault;
3230
using NuGet.Services.Logging;
31+
using NuGet.Services.Messaging;
32+
using NuGet.Services.Messaging.Email;
3333
using NuGet.Services.ServiceBus;
3434
using NuGet.Services.Sql;
3535
using NuGet.Services.Validation.Orchestrator.PackageSigning.ScanAndSign;
3636
using NuGet.Services.Validation.Orchestrator.Telemetry;
3737
using NuGet.Services.Validation.PackageSigning.ProcessSignature;
3838
using NuGet.Services.Validation.PackageSigning.ValidateCertificate;
39-
using NuGet.Services.Validation.Vcs;
40-
using NuGet.Services.Messaging.Email;
39+
using NuGet.Services.Validation.Symbols;
4140
using NuGetGallery;
4241
using NuGetGallery.Diagnostics;
43-
using NuGet.Services.Entities;
44-
using NuGet.Services.Messaging;
4542

4643
namespace NuGet.Services.Validation.Orchestrator
4744
{
@@ -56,7 +53,6 @@ public class Job : JobBase
5653
private const string ValidateArgument = "Validate";
5754

5855
private const string ConfigurationSectionName = "Configuration";
59-
private const string VcsSectionName = "Vcs";
6056
private const string PackageSigningSectionName = "PackageSigning";
6157
private const string PackageCertificatesSectionName = "PackageCertificates";
6258
private const string ScanAndSignSectionName = "ScanAndSign";
@@ -70,7 +66,6 @@ public class Job : JobBase
7066
private const string PackageDownloadTimeoutName = "PackageDownloadTimeout";
7167

7268
private const string EmailBindingKey = EmailConfigurationSectionName;
73-
private const string VcsBindingKey = VcsSectionName;
7469
private const string PackageVerificationTopicClientBindingKey = "PackageVerificationTopicClient";
7570
private const string PackageSignatureBindingKey = PackageSigningSectionName;
7671
private const string PackageCertificatesBindingKey = PackageCertificatesSectionName;
@@ -188,7 +183,6 @@ private DbConnection CreateDbConnection<T>(IServiceProvider serviceProvider) whe
188183
private void ConfigureJobServices(IServiceCollection services, IConfigurationRoot configurationRoot)
189184
{
190185
services.Configure<ValidationConfiguration>(configurationRoot.GetSection(ConfigurationSectionName));
191-
services.Configure<VcsConfiguration>(configurationRoot.GetSection(VcsSectionName));
192186
services.Configure<ProcessSignatureConfiguration>(configurationRoot.GetSection(PackageSigningSectionName));
193187
services.Configure<ValidateCertificateConfiguration>(configurationRoot.GetSection(PackageCertificatesSectionName));
194188
services.Configure<OrchestrationRunnerConfiguration>(configurationRoot.GetSection(RunnerConfigurationSectionName));
@@ -239,7 +233,6 @@ private void ConfigureJobServices(IServiceCollection services, IConfigurationRoo
239233
services.AddTransient<IServiceBusMessageSerializer, ServiceBusMessageSerializer>();
240234
services.AddTransient<IBrokeredMessageSerializer<PackageValidationMessageData>, PackageValidationMessageDataSerializationAdapter>();
241235
services.AddTransient<ICriteriaEvaluator<Package>, PackageCriteriaEvaluator>();
242-
services.AddTransient<VcsValidator>();
243236
services.AddTransient<IProcessSignatureEnqueuer, ProcessSignatureEnqueuer>();
244237
services.AddTransient<ICloudBlobClient>(c =>
245238
{
@@ -298,17 +291,6 @@ private static IServiceProvider CreateProvider(IServiceCollection services, ICon
298291
var containerBuilder = new ContainerBuilder();
299292
containerBuilder.Populate(services);
300293

301-
/// Initialize dependencies for the <see cref="VcsValidator"/>. There is some additional complexity here
302-
/// because the implementations require ambiguous types (such as a <see cref="string"/> and a
303-
/// <see cref="CloudStorageAccount"/> which there may be more than one configuration of).
304-
containerBuilder
305-
.Register(c =>
306-
{
307-
var vcsConfiguration = c.Resolve<IOptionsSnapshot<VcsConfiguration>>();
308-
var cloudStorageAccount = CloudStorageAccount.Parse(vcsConfiguration.Value.DataStorageAccount);
309-
return cloudStorageAccount;
310-
})
311-
.Keyed<CloudStorageAccount>(VcsBindingKey);
312294
containerBuilder
313295
.Register(c =>
314296
{
@@ -317,23 +299,7 @@ private static IServiceProvider CreateProvider(IServiceCollection services, ICon
317299
return topicClient;
318300
})
319301
.Keyed<TopicClientWrapper>(PackageVerificationTopicClientBindingKey);
320-
321-
containerBuilder
322-
.RegisterType<PackageValidationService>()
323-
.WithKeyedParameter(typeof(CloudStorageAccount), VcsBindingKey)
324-
.WithParameter(new ResolvedParameter(
325-
(pi, ctx) => pi.ParameterType == typeof(string),
326-
(pi, ctx) => ctx.Resolve<IOptionsSnapshot<VcsConfiguration>>().Value.ContainerName))
327-
.As<IPackageValidationService>();
328-
329-
containerBuilder
330-
.RegisterType<PackageValidationAuditor>()
331-
.WithKeyedParameter(typeof(CloudStorageAccount), VcsBindingKey)
332-
.WithParameter(new ResolvedParameter(
333-
(pi, ctx) => pi.ParameterType == typeof(string),
334-
(pi, ctx) => ctx.Resolve<IOptionsSnapshot<VcsConfiguration>>().Value.ContainerName))
335-
.As<IPackageValidationAuditor>();
336-
302+
337303
containerBuilder
338304
.RegisterType<ProcessSignatureEnqueuer>()
339305
.WithParameter(new ResolvedParameter(

src/NuGet.Services.Validation.Orchestrator/NuGet.Services.Validation.Orchestrator.csproj

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,10 @@
107107
<Compile Include="SymbolValidationMessageHandler.cs" />
108108
<Compile Include="ValidationPackageFileService.cs" />
109109
<Compile Include="ValidationSetProcessorResult.cs" />
110-
<Compile Include="Vcs\IPackageCriteria.cs" />
111-
<Compile Include="Vcs\IPackageCriteriaEvaluator.cs" />
112-
<Compile Include="Vcs\PackageCriteriaEvaluator.cs" />
113-
<Compile Include="Vcs\PackageCriteria.cs" />
114-
<Compile Include="Vcs\VcsConfiguration.cs" />
115-
<Compile Include="Vcs\VcsValidator.cs" />
110+
<Compile Include="Criteria\IPackageCriteria.cs" />
111+
<Compile Include="Criteria\IPackageCriteriaEvaluator.cs" />
112+
<Compile Include="Criteria\PackageCriteriaEvaluator.cs" />
113+
<Compile Include="Criteria\PackageCriteria.cs" />
116114
<Compile Include="Configuration\ValidationDbConfiguration.cs" />
117115
<Compile Include="PackageValidationMessageHandler.cs" />
118116
<Compile Include="ValidationOutcomeProcessor.cs" />
@@ -142,10 +140,6 @@
142140
<Project>{fa87d075-a934-4443-8d0b-5db32640b6d7}</Project>
143141
<Name>Validation.Common.Job</Name>
144142
</ProjectReference>
145-
<ProjectReference Include="..\Validation.Common\Validation.Common.csproj">
146-
<Project>{2539ddf3-0cc5-4a03-b5f9-39b47744a7bd}</Project>
147-
<Name>Validation.Common</Name>
148-
</ProjectReference>
149143
<ProjectReference Include="..\Validation.PackageSigning.Core\Validation.PackageSigning.Core.csproj">
150144
<Project>{91C060DA-736F-4DA9-A57F-CB3AC0E6CB10}</Project>
151145
<Name>Validation.PackageSigning.Core</Name>

0 commit comments

Comments
 (0)