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

Commit c556c61

Browse files
authored
Merge pull request #230 from NuGet/dev
[ReleasePrep][2017.10.16]RI of dev into master
2 parents 4ae1503 + 53fd174 commit c556c61

42 files changed

Lines changed: 1250 additions & 178 deletions

Some content is hidden

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

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,3 +206,4 @@ Results.*.xml
206206

207207
AssemblyInfo.*.cs
208208
/tests/Validation.Helper.Tests/Validation.Helper.Tests.nuget.props
209+
/tests/Validation.Common.Tests/Validation.Common.Tests.nuget.props

NuGet.Jobs.sln

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
33
# Visual Studio 15
4-
VisualStudioVersion = 15.0.26915.1
4+
VisualStudioVersion = 15.0.26923.0
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NuGet.Jobs.Common", "src\NuGet.Jobs.Common\NuGet.Jobs.Common.csproj", "{4B4B1EFB-8F33-42E6-B79F-54E7F3293D31}"
77
EndProject
@@ -95,6 +95,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NuGet.Services.Validation.O
9595
EndProject
9696
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}"
9797
EndProject
98+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Validation.Common.Tests", "tests\Validation.Common.Tests\Validation.Common.Tests.csproj", "{F9690B52-3C92-42A0-B41F-1A6040C2D2EE}"
99+
EndProject
98100
Global
99101
GlobalSection(SolutionConfigurationPlatforms) = preSolution
100102
Debug|Any CPU = Debug|Any CPU
@@ -235,6 +237,10 @@ Global
235237
{A3B0B15D-22D9-4F1F-94C4-B24B28ECF632}.Debug|Any CPU.Build.0 = Debug|Any CPU
236238
{A3B0B15D-22D9-4F1F-94C4-B24B28ECF632}.Release|Any CPU.ActiveCfg = Release|Any CPU
237239
{A3B0B15D-22D9-4F1F-94C4-B24B28ECF632}.Release|Any CPU.Build.0 = Release|Any CPU
240+
{F9690B52-3C92-42A0-B41F-1A6040C2D2EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
241+
{F9690B52-3C92-42A0-B41F-1A6040C2D2EE}.Debug|Any CPU.Build.0 = Debug|Any CPU
242+
{F9690B52-3C92-42A0-B41F-1A6040C2D2EE}.Release|Any CPU.ActiveCfg = Release|Any CPU
243+
{F9690B52-3C92-42A0-B41F-1A6040C2D2EE}.Release|Any CPU.Build.0 = Release|Any CPU
238244
EndGlobalSection
239245
GlobalSection(SolutionProperties) = preSolution
240246
HideSolutionNode = FALSE
@@ -272,6 +278,7 @@ Global
272278
{FC0CEF12-D501-46D1-B1BF-D4134BD8D478} = {B9D03824-A9CA-43AC-86D6-8BB399B9A228}
273279
{0C887292-C5AB-4107-946C-A53B18A38D22} = {6A776396-02B1-475D-A104-26940ADB04AB}
274280
{A3B0B15D-22D9-4F1F-94C4-B24B28ECF632} = {6A776396-02B1-475D-A104-26940ADB04AB}
281+
{F9690B52-3C92-42A0-B41F-1A6040C2D2EE} = {6A776396-02B1-475D-A104-26940ADB04AB}
275282
EndGlobalSection
276283
GlobalSection(ExtensibilityGlobals) = postSolution
277284
SolutionGuid = {284A7AC3-FB43-4F1F-9C9C-2AF0E1F46C2B}

src/Gallery.Maintenance/Job.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public IEnumerable<MaintenanceTask> GetMaintenanceTasks()
5959
var taskBaseType = typeof(MaintenanceTask);
6060

6161
return taskBaseType.Assembly.GetTypes()
62-
.Where(type => type.IsClass && taskBaseType.IsAssignableFrom(type))
62+
.Where(type => type.IsClass && !type.IsAbstract && taskBaseType.IsAssignableFrom(type))
6363
.Select(type =>
6464
(MaintenanceTask) type.GetConstructor(
6565
new Type[] { typeof(ILogger<>).MakeGenericType(type) })

src/Gallery.Maintenance/project.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"dependencies": {
3-
"Microsoft.Extensions.Logging.Abstractions": "1.0.0"
3+
"Microsoft.Extensions.Logging.Abstractions": "1.0.0",
4+
"NuGet.Services.Logging": "2.2.3"
45
},
56
"frameworks": {
67
"net452": {}

src/HandlePackageEdits/App.config

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,14 @@
5757
<assemblyIdentity name="NuGet.Services.KeyVault" publicKeyToken="31bf3856ad364e35" culture="neutral" />
5858
<bindingRedirect oldVersion="0.0.0.0-2.2.3.0" newVersion="2.2.3.0" />
5959
</dependentAssembly>
60+
<dependentAssembly>
61+
<assemblyIdentity name="NuGet.Frameworks" publicKeyToken="31bf3856ad364e35" culture="neutral" />
62+
<bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0" />
63+
</dependentAssembly>
64+
<dependentAssembly>
65+
<assemblyIdentity name="NuGet.Versioning" publicKeyToken="31bf3856ad364e35" culture="neutral" />
66+
<bindingRedirect oldVersion="0.0.0.0-4.3.0.0" newVersion="4.3.0.0" />
67+
</dependentAssembly>
6068
</assemblyBinding>
6169
</runtime>
6270
</configuration>

src/HandlePackageEdits/HandlePackageEdits.Job.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
using Microsoft.WindowsAzure.Storage;
1515
using Microsoft.WindowsAzure.Storage.Blob;
1616
using NuGet.Jobs;
17+
using NuGetGallery;
1718
using NuGetGallery.Packaging;
1819

1920
namespace HandlePackageEdits
@@ -23,11 +24,12 @@ internal class Job : JobBase
2324
private const string HashAlgorithmName = "SHA512";
2425
public static readonly long DefaultMaxAllowedManifestBytes = 10 /* Mb */ * 1024 /* Kb */ * 1024; /* b */
2526

26-
public static readonly string GetEditsBaseSql = @"
27+
public static readonly string GetEditsBaseSql = $@"
2728
SELECT pr.Id, p.NormalizedVersion AS Version, p.Hash, p.HasReadMe, e.*
2829
FROM PackageEdits e
2930
INNER JOIN Packages p ON p.[Key] = e.PackageKey
30-
INNER JOIN PackageRegistrations pr ON pr.[Key] = p.PackageRegistrationKey";
31+
INNER JOIN PackageRegistrations pr ON pr.[Key] = p.PackageRegistrationKey
32+
WHERE p.PackageStatusKey = {(int)PackageStatus.Available}";
3133

3234
public const string DefaultSourceContainerName = "packages";
3335
public const string DefaultBackupContainerName = "package-backups";
@@ -117,7 +119,7 @@ public override async Task Run()
117119
{
118120
edits = (await connection.QueryAsync<PackageEdit>(
119121
GetEditsBaseSql + @"
120-
WHERE [TriedCount] < @MaxTryCount",
122+
AND [TriedCount] < @MaxTryCount",
121123
new
122124
{
123125
MaxTryCount = MaxTryCount.Value

src/HandlePackageEdits/HandlePackageEdits.csproj

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@
3737
<Reference Include="Dapper.StrongName, Version=1.50.2.0, Culture=neutral, PublicKeyToken=e3e8412083d25dd3, processorArchitecture=MSIL">
3838
<HintPath>..\..\packages\Dapper.StrongName.1.50.2\lib\net451\Dapper.StrongName.dll</HintPath>
3939
</Reference>
40+
<Reference Include="Elmah, Version=1.2.14706.0, Culture=neutral, PublicKeyToken=57eac04b2e0f138e, processorArchitecture=MSIL">
41+
<HintPath>..\..\packages\elmah.corelibrary.strongname.1.2.2\lib\Elmah.dll</HintPath>
42+
</Reference>
4043
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
4144
<HintPath>..\..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll</HintPath>
4245
</Reference>
@@ -79,29 +82,29 @@
7982
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
8083
<HintPath>..\..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
8184
</Reference>
82-
<Reference Include="NuGet.Common, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
83-
<HintPath>..\..\packages\NuGet.Common.3.5.0-rc1-final\lib\net45\NuGet.Common.dll</HintPath>
85+
<Reference Include="NuGet.Common, Version=4.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
86+
<HintPath>..\..\packages\NuGet.Common.4.3.0-preview1-2524\lib\net45\NuGet.Common.dll</HintPath>
8487
</Reference>
85-
<Reference Include="NuGet.Frameworks, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
86-
<HintPath>..\..\packages\NuGet.Frameworks.3.5.0-rc1-final\lib\net45\NuGet.Frameworks.dll</HintPath>
88+
<Reference Include="NuGet.Frameworks, Version=4.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
89+
<HintPath>..\..\packages\NuGet.Frameworks.4.3.0-preview1-2524\lib\net45\NuGet.Frameworks.dll</HintPath>
8790
</Reference>
8891
<Reference Include="NuGet.Logging, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
8992
<HintPath>..\..\packages\NuGet.Logging.3.5.0-beta-1160\lib\net45\NuGet.Logging.dll</HintPath>
9093
</Reference>
91-
<Reference Include="NuGet.Packaging, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
92-
<HintPath>..\..\packages\NuGet.Packaging.3.5.0-rc1-final\lib\net45\NuGet.Packaging.dll</HintPath>
94+
<Reference Include="NuGet.Packaging, Version=4.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
95+
<HintPath>..\..\packages\NuGet.Packaging.4.3.0-preview1-2524\lib\net45\NuGet.Packaging.dll</HintPath>
9396
</Reference>
94-
<Reference Include="NuGet.Packaging.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
95-
<HintPath>..\..\packages\NuGet.Packaging.Core.3.5.0-rc1-final\lib\net45\NuGet.Packaging.Core.dll</HintPath>
97+
<Reference Include="NuGet.Packaging.Core, Version=4.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
98+
<HintPath>..\..\packages\NuGet.Packaging.Core.4.3.0-preview1-2524\lib\net45\NuGet.Packaging.Core.dll</HintPath>
9699
</Reference>
97100
<Reference Include="NuGet.Packaging.Core.Types, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
98101
<HintPath>..\..\packages\NuGet.Packaging.Core.Types.3.5.0-rc1-final\lib\net45\NuGet.Packaging.Core.Types.dll</HintPath>
99102
</Reference>
100-
<Reference Include="NuGet.Versioning, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
101-
<HintPath>..\..\packages\NuGet.Versioning.3.5.0-rc1-final\lib\net45\NuGet.Versioning.dll</HintPath>
103+
<Reference Include="NuGet.Versioning, Version=4.3.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
104+
<HintPath>..\..\packages\NuGet.Versioning.4.3.0-preview1-2524\lib\net45\NuGet.Versioning.dll</HintPath>
102105
</Reference>
103-
<Reference Include="NuGetGallery.Core, Version=2.1.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
104-
<HintPath>..\..\packages\NuGetGallery.Core.2.1.1\lib\net452\NuGetGallery.Core.dll</HintPath>
106+
<Reference Include="NuGetGallery.Core, Version=4.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
107+
<HintPath>..\..\packages\NuGetGallery.Core.4.4.0\lib\net452\NuGetGallery.Core.dll</HintPath>
105108
</Reference>
106109
<Reference Include="System" />
107110
<Reference Include="System.ComponentModel.Composition" />

src/HandlePackageEdits/packages.config

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
33
<package id="Dapper.StrongName" version="1.50.2" targetFramework="net452" />
4+
<package id="elmah.corelibrary.strongname" version="1.2.2" targetFramework="net452" />
45
<package id="EntityFramework" version="6.1.3" targetFramework="net452" />
56
<package id="Microsoft.Azure.KeyVault.Core" version="1.0.0" targetFramework="net452" />
67
<package id="Microsoft.Bcl" version="1.1.10" targetFramework="net452" />
@@ -14,14 +15,14 @@
1415
<package id="Microsoft.Web.Xdt" version="2.1.1" targetFramework="net452" />
1516
<package id="Microsoft.WindowsAzure.ConfigurationManager" version="3.2.1" targetFramework="net452" />
1617
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net452" />
17-
<package id="NuGet.Common" version="3.5.0-rc1-final" targetFramework="net452" />
18-
<package id="NuGet.Frameworks" version="3.5.0-rc1-final" targetFramework="net452" />
18+
<package id="NuGet.Common" version="4.3.0-preview1-2524" targetFramework="net452" />
19+
<package id="NuGet.Frameworks" version="4.3.0-preview1-2524" targetFramework="net452" />
1920
<package id="NuGet.Logging" version="3.5.0-beta-1160" targetFramework="net452" />
20-
<package id="NuGet.Packaging" version="3.5.0-rc1-final" targetFramework="net452" />
21-
<package id="NuGet.Packaging.Core" version="3.5.0-rc1-final" targetFramework="net452" />
21+
<package id="NuGet.Packaging" version="4.3.0-preview1-2524" targetFramework="net452" />
22+
<package id="NuGet.Packaging.Core" version="4.3.0-preview1-2524" targetFramework="net452" />
2223
<package id="NuGet.Packaging.Core.Types" version="3.5.0-rc1-final" targetFramework="net452" />
23-
<package id="NuGet.Versioning" version="3.5.0-rc1-final" targetFramework="net452" />
24-
<package id="NuGetGallery.Core" version="2.1.1" targetFramework="net452" />
24+
<package id="NuGet.Versioning" version="4.3.0-preview1-2524" targetFramework="net452" />
25+
<package id="NuGetGallery.Core" version="4.4.0" targetFramework="net452" />
2526
<package id="System.Collections" version="4.0.11" targetFramework="net452" />
2627
<package id="System.Collections.Concurrent" version="4.0.12" targetFramework="net452" />
2728
<package id="System.ComponentModel" version="4.0.1" targetFramework="net452" />

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,13 +100,13 @@ public static class JobArgumentNames
100100
// Arguments specific to validation tasks
101101
public const string RunValidationTasks = "RunValidationTasks";
102102
public const string RequestValidationTasks = "RequestValidationTasks";
103+
public const string PackageUrlTemplate = "PackageUrlTemplate";
103104

104105
// Arguments specific to VCS validation task
105106
public const string VcsValidatorServiceUrl = "VcsValidatorServiceUrl";
106107
public const string VcsValidatorCallbackUrl = "VcsValidatorCallbackUrl";
107108
public const string VcsContactAlias = "VcsContactAlias";
108109
public const string VcsValidatorSubmitterAlias = "VcsValidatorAlias";
109-
public const string VcsPackageUrlTemplate = "VcsPackageUrlTemplate";
110110

111111
// Key Vault
112112
public const string VaultName = "VaultName";

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,8 @@ 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");
1215
}
1316
}

0 commit comments

Comments
 (0)