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

Commit 86215ba

Browse files
authored
Merge pull request #205 from NuGet/dev
[ReleasePrep][2017.09.01] RI of dev into master
2 parents 9e793e0 + 9fc89f6 commit 86215ba

140 files changed

Lines changed: 1753 additions & 3011 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: 8 additions & 15 deletions
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.26621.2
4+
VisualStudioVersion = 15.0.26811.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
@@ -12,14 +12,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{05F997
1212
EndProject
1313
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{6A776396-02B1-475D-A104-26940ADB04AB}"
1414
EndProject
15-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests.AzureJobTraceListener", "src\Tests.Logger\Tests.AzureJobTraceListener.csproj", "{7EBE57A8-D3B1-44FE-A467-AEC5636CA82B}"
16-
EndProject
1715
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Unclassified", "Unclassified", "{FA5644B5-4F08-43F6-86B3-039374312A47}"
1816
EndProject
1917
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ArchivePackages", "src\ArchivePackages\ArchivePackages.csproj", "{A08F0185-4DA3-4D5B-BF0C-B178596D5789}"
2018
EndProject
21-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests.AppConfig.AzureJobTraceListener", "src\Tests.AppConfig.AzureJobTraceListener\Tests.AppConfig.AzureJobTraceListener.csproj", "{C520044F-0D65-4A12-BC0E-57FB3AAA7546}"
22-
EndProject
2319
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Search", "Search", "{57F34E9A-3A98-4E48-BF76-D49CB9CB3323}"
2420
EndProject
2521
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HandlePackageEdits", "src\HandlePackageEdits\HandlePackageEdits.csproj", "{C959B545-51C8-4D83-B9A0-243BBC199E49}"
@@ -89,6 +85,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NuGetCDNRedirect", "src\NuG
8985
EndProject
9086
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests.Search.GenerateAuxiliaryData", "tests\Tests.Search.GenerateAuxiliaryData\Tests.Search.GenerateAuxiliaryData.csproj", "{BA59047E-846A-472C-8587-73719DDB29CE}"
9187
EndProject
88+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests.Gallery.Maintenance", "tests\Tests.Gallery.Maintenance\Tests.Gallery.Maintenance.csproj", "{147A757D-864B-4C74-B8CF-14DFF9793605}"
89+
EndProject
9290
Global
9391
GlobalSection(SolutionConfigurationPlatforms) = preSolution
9492
Debug|Any CPU = Debug|Any CPU
@@ -99,18 +97,10 @@ Global
9997
{4B4B1EFB-8F33-42E6-B79F-54E7F3293D31}.Debug|Any CPU.Build.0 = Debug|Any CPU
10098
{4B4B1EFB-8F33-42E6-B79F-54E7F3293D31}.Release|Any CPU.ActiveCfg = Release|Any CPU
10199
{4B4B1EFB-8F33-42E6-B79F-54E7F3293D31}.Release|Any CPU.Build.0 = Release|Any CPU
102-
{7EBE57A8-D3B1-44FE-A467-AEC5636CA82B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
103-
{7EBE57A8-D3B1-44FE-A467-AEC5636CA82B}.Debug|Any CPU.Build.0 = Debug|Any CPU
104-
{7EBE57A8-D3B1-44FE-A467-AEC5636CA82B}.Release|Any CPU.ActiveCfg = Release|Any CPU
105-
{7EBE57A8-D3B1-44FE-A467-AEC5636CA82B}.Release|Any CPU.Build.0 = Release|Any CPU
106100
{A08F0185-4DA3-4D5B-BF0C-B178596D5789}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
107101
{A08F0185-4DA3-4D5B-BF0C-B178596D5789}.Debug|Any CPU.Build.0 = Debug|Any CPU
108102
{A08F0185-4DA3-4D5B-BF0C-B178596D5789}.Release|Any CPU.ActiveCfg = Release|Any CPU
109103
{A08F0185-4DA3-4D5B-BF0C-B178596D5789}.Release|Any CPU.Build.0 = Release|Any CPU
110-
{C520044F-0D65-4A12-BC0E-57FB3AAA7546}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
111-
{C520044F-0D65-4A12-BC0E-57FB3AAA7546}.Debug|Any CPU.Build.0 = Debug|Any CPU
112-
{C520044F-0D65-4A12-BC0E-57FB3AAA7546}.Release|Any CPU.ActiveCfg = Release|Any CPU
113-
{C520044F-0D65-4A12-BC0E-57FB3AAA7546}.Release|Any CPU.Build.0 = Release|Any CPU
114104
{C959B545-51C8-4D83-B9A0-243BBC199E49}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
115105
{C959B545-51C8-4D83-B9A0-243BBC199E49}.Debug|Any CPU.Build.0 = Debug|Any CPU
116106
{C959B545-51C8-4D83-B9A0-243BBC199E49}.Release|Any CPU.ActiveCfg = Release|Any CPU
@@ -217,14 +207,16 @@ Global
217207
{BA59047E-846A-472C-8587-73719DDB29CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
218208
{BA59047E-846A-472C-8587-73719DDB29CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
219209
{BA59047E-846A-472C-8587-73719DDB29CE}.Release|Any CPU.Build.0 = Release|Any CPU
210+
{147A757D-864B-4C74-B8CF-14DFF9793605}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
211+
{147A757D-864B-4C74-B8CF-14DFF9793605}.Debug|Any CPU.Build.0 = Debug|Any CPU
212+
{147A757D-864B-4C74-B8CF-14DFF9793605}.Release|Any CPU.ActiveCfg = Release|Any CPU
213+
{147A757D-864B-4C74-B8CF-14DFF9793605}.Release|Any CPU.Build.0 = Release|Any CPU
220214
EndGlobalSection
221215
GlobalSection(SolutionProperties) = preSolution
222216
HideSolutionNode = FALSE
223217
EndGlobalSection
224218
GlobalSection(NestedProjects) = preSolution
225-
{7EBE57A8-D3B1-44FE-A467-AEC5636CA82B} = {6A776396-02B1-475D-A104-26940ADB04AB}
226219
{A08F0185-4DA3-4D5B-BF0C-B178596D5789} = {FA5644B5-4F08-43F6-86B3-039374312A47}
227-
{C520044F-0D65-4A12-BC0E-57FB3AAA7546} = {6A776396-02B1-475D-A104-26940ADB04AB}
228220
{C959B545-51C8-4D83-B9A0-243BBC199E49} = {88725659-D5F8-49F9-9B7E-D87C5B9917D7}
229221
{4646F0C5-EC7A-45F5-8E45-D51C715C1DC9} = {88651B16-6E56-426F-B8D8-849279A86D59}
230222
{FC4A7438-6EFD-437F-A077-8F5BF4654316} = {6A776396-02B1-475D-A104-26940ADB04AB}
@@ -252,6 +244,7 @@ Global
252244
{8336BEBE-EC6A-4E40-A1C9-8C34A507E62D} = {6A776396-02B1-475D-A104-26940ADB04AB}
253245
{BC9EA7CE-AD21-4D17-B581-F8ED8CBD7191} = {FA5644B5-4F08-43F6-86B3-039374312A47}
254246
{BA59047E-846A-472C-8587-73719DDB29CE} = {6A776396-02B1-475D-A104-26940ADB04AB}
247+
{147A757D-864B-4C74-B8CF-14DFF9793605} = {6A776396-02B1-475D-A104-26940ADB04AB}
255248
EndGlobalSection
256249
GlobalSection(ExtensibilityGlobals) = postSolution
257250
SolutionGuid = {284A7AC3-FB43-4F1F-9C9C-2AF0E1F46C2B}

SnapshotAzureBlob/SnapshotAzureBlob.csproj

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@
3232
<WarningLevel>4</WarningLevel>
3333
</PropertyGroup>
3434
<ItemGroup>
35-
<Reference Include="Microsoft.ApplicationInsights, Version=2.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
36-
<HintPath>..\packages\Microsoft.ApplicationInsights.2.1.0\lib\net45\Microsoft.ApplicationInsights.dll</HintPath>
37-
</Reference>
3835
<Reference Include="Microsoft.Azure.KeyVault.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
3936
<HintPath>..\packages\Microsoft.Azure.KeyVault.Core.1.0.0\lib\net40\Microsoft.Azure.KeyVault.Core.dll</HintPath>
4037
</Reference>
@@ -47,12 +44,6 @@
4744
<Reference Include="Microsoft.Data.Services.Client, Version=5.8.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
4845
<HintPath>..\packages\Microsoft.Data.Services.Client.5.8.2\lib\net40\Microsoft.Data.Services.Client.dll</HintPath>
4946
</Reference>
50-
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
51-
<HintPath>..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.1.0.0\lib\netstandard1.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath>
52-
</Reference>
53-
<Reference Include="Microsoft.Extensions.Logging, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
54-
<HintPath>..\packages\Microsoft.Extensions.Logging.1.0.0\lib\netstandard1.1\Microsoft.Extensions.Logging.dll</HintPath>
55-
</Reference>
5647
<Reference Include="Microsoft.Extensions.Logging.Abstractions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
5748
<HintPath>..\packages\Microsoft.Extensions.Logging.Abstractions.1.0.0\lib\netstandard1.1\Microsoft.Extensions.Logging.Abstractions.dll</HintPath>
5849
</Reference>
@@ -62,30 +53,6 @@
6253
<Reference Include="Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
6354
<HintPath>..\packages\Newtonsoft.Json.9.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
6455
</Reference>
65-
<Reference Include="NuGet.Services.Logging, Version=4.0.1229.0, Culture=neutral, processorArchitecture=MSIL">
66-
<HintPath>..\packages\NuGet.Services.Logging.4.0.1229-master\lib\net452\NuGet.Services.Logging.dll</HintPath>
67-
</Reference>
68-
<Reference Include="Serilog, Version=2.0.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10, processorArchitecture=MSIL">
69-
<HintPath>..\packages\Serilog.2.0.0\lib\net45\Serilog.dll</HintPath>
70-
</Reference>
71-
<Reference Include="Serilog.Enrichers.Environment, Version=2.0.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10, processorArchitecture=MSIL">
72-
<HintPath>..\packages\Serilog.Enrichers.Environment.2.1.0\lib\net45\Serilog.Enrichers.Environment.dll</HintPath>
73-
</Reference>
74-
<Reference Include="Serilog.Enrichers.Process, Version=2.0.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10, processorArchitecture=MSIL">
75-
<HintPath>..\packages\Serilog.Enrichers.Process.2.0.0\lib\net45\Serilog.Enrichers.Process.dll</HintPath>
76-
</Reference>
77-
<Reference Include="Serilog.Extensions.Logging, Version=1.0.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10, processorArchitecture=MSIL">
78-
<HintPath>..\packages\Serilog.Extensions.Logging.1.2.0\lib\net45\Serilog.Extensions.Logging.dll</HintPath>
79-
</Reference>
80-
<Reference Include="Serilog.Sinks.ApplicationInsights, Version=2.1.0.0, Culture=neutral, processorArchitecture=MSIL">
81-
<HintPath>..\packages\Serilog.Sinks.ApplicationInsights.2.1.0\lib\net45\Serilog.Sinks.ApplicationInsights.dll</HintPath>
82-
</Reference>
83-
<Reference Include="Serilog.Sinks.ColoredConsole, Version=2.0.0.0, Culture=neutral, PublicKeyToken=24c2f752a8e58a10, processorArchitecture=MSIL">
84-
<HintPath>..\packages\Serilog.Sinks.ColoredConsole.2.0.0\lib\net45\Serilog.Sinks.ColoredConsole.dll</HintPath>
85-
</Reference>
86-
<Reference Include="SerilogTraceListener, Version=2.0.0.0, Culture=neutral, PublicKeyToken=9398e41289d9b801, processorArchitecture=MSIL">
87-
<HintPath>..\packages\SerilogTraceListener.2.0.10027\lib\net45\SerilogTraceListener.dll</HintPath>
88-
</Reference>
8956
<Reference Include="System" />
9057
<Reference Include="System.Core" />
9158
<Reference Include="System.Spatial, Version=5.8.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">

SnapshotAzureBlob/SnapshotAzureBlobJob.cs

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
using Microsoft.WindowsAzure.Storage.Blob;
1212
using Microsoft.Extensions.Logging;
1313
using NuGet.Jobs;
14-
using NuGet.Services.Logging;
1514

1615
namespace SnapshotAzureBlob
1716
{
@@ -20,24 +19,10 @@ public class SnapshotAzureBlobJob : JobBase
2019
private string _connectionString;
2120
private string _container;
2221

23-
public ILogger Logger { get; private set; }
24-
25-
public override bool Init(IDictionary<string, string> jobArgsDictionary)
22+
public override void Init(IDictionary<string, string> jobArgsDictionary)
2623
{
27-
try
28-
{
29-
var loggerConfiguration = LoggingSetup.CreateDefaultLoggerConfiguration(ConsoleLogOnly);
30-
var loggerFactory = LoggingSetup.CreateLoggerFactory(loggerConfiguration);
31-
Logger = loggerFactory.CreateLogger<SnapshotAzureBlobJob>();
32-
_connectionString = JobConfigurationManager.GetArgument(jobArgsDictionary, ArgumentNames.SnapshotAzureBlobJob_ConnectionString);
33-
_container = JobConfigurationManager.GetArgument(jobArgsDictionary, ArgumentNames.SnapshotAzureBlobJob_Container);
34-
}
35-
catch (Exception exception)
36-
{
37-
Logger.LogCritical(LogEvents.JobInitFailed, exception, "Failed to initialize job!");
38-
return false;
39-
}
40-
return true;
24+
_connectionString = JobConfigurationManager.GetArgument(jobArgsDictionary, ArgumentNames.SnapshotAzureBlobJob_ConnectionString);
25+
_container = JobConfigurationManager.GetArgument(jobArgsDictionary, ArgumentNames.SnapshotAzureBlobJob_Container);
4126
}
4227

4328
public string GetUsage()
@@ -48,12 +33,13 @@ public string GetUsage()
4833
+ $"-{JobArgumentNames.InstrumentationKey} <intrumentationKey> ";
4934
}
5035

51-
public override Task<bool> Run()
36+
public override Task Run()
5237
{
5338
var storageAccount = CloudStorageAccount.Parse(_connectionString);
5439
var blobClient = storageAccount.CreateCloudBlobClient();
5540
EnsureOneSnapshot(_container, blobClient);
56-
return Task.FromResult(true);
41+
42+
return Task.FromResult(0);
5743
}
5844

5945
private void EnsureOneSnapshot(string containerName, CloudBlobClient client)
@@ -85,12 +71,12 @@ private void EnsureOneSnapshot(string containerName, CloudBlobClient client)
8571
}
8672
catch (Exception ex)
8773
{
88-
this.Logger.LogCritical(LogEvents.SnaphotFailed, ex, "The snapshot failed for blob {Blob}.", item.Uri);
74+
Logger.LogCritical(LogEvents.SnaphotFailed, ex, "The snapshot failed for blob {Blob}.", item.Uri);
8975
}
9076
});
9177
sw.Stop();
9278

93-
this.Logger.LogInformation("Created {snapshotCount} snapshots in {timeInMilliseconds} milliseconds", snapshotCount, sw.ElapsedMilliseconds);
79+
Logger.LogInformation("Created {snapshotCount} snapshots in {timeInMilliseconds} milliseconds", snapshotCount, sw.ElapsedMilliseconds);
9480
}
9581
}
9682
}

SnapshotAzureBlob/packages.config

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,11 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="Microsoft.ApplicationInsights" version="2.1.0" targetFramework="net452" />
43
<package id="Microsoft.Azure.KeyVault.Core" version="1.0.0" targetFramework="net452" />
54
<package id="Microsoft.Data.Edm" version="5.8.2" targetFramework="net452" />
65
<package id="Microsoft.Data.OData" version="5.8.2" targetFramework="net452" />
76
<package id="Microsoft.Data.Services.Client" version="5.8.2" targetFramework="net452" />
8-
<package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="1.0.0" targetFramework="net452" />
9-
<package id="Microsoft.Extensions.Logging" version="1.0.0" targetFramework="net452" />
107
<package id="Microsoft.Extensions.Logging.Abstractions" version="1.0.0" targetFramework="net452" />
118
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net452" />
12-
<package id="NuGet.Services.Logging" version="4.0.1229-master" targetFramework="net452" />
13-
<package id="Serilog" version="2.0.0" targetFramework="net452" />
14-
<package id="Serilog.Enrichers.Environment" version="2.1.0" targetFramework="net452" />
15-
<package id="Serilog.Enrichers.Process" version="2.0.0" targetFramework="net452" />
16-
<package id="Serilog.Extensions.Logging" version="1.2.0" targetFramework="net452" />
17-
<package id="Serilog.Sinks.ApplicationInsights" version="2.1.0" targetFramework="net452" />
18-
<package id="Serilog.Sinks.ColoredConsole" version="2.0.0" targetFramework="net452" />
19-
<package id="SerilogTraceListener" version="2.0.10027" targetFramework="net452" />
209
<package id="System.Collections" version="4.0.11" targetFramework="net452" />
2110
<package id="System.Collections.Concurrent" version="4.0.12" targetFramework="net452" />
2211
<package id="System.ComponentModel" version="4.0.1" targetFramework="net452" />

src/ArchivePackages/App.config

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@
3737
<assemblyIdentity name="NuGet.Services.KeyVault" publicKeyToken="31bf3856ad364e35" culture="neutral" />
3838
<bindingRedirect oldVersion="0.0.0.0-2.2.3.0" newVersion="2.2.3.0" />
3939
</dependentAssembly>
40+
<dependentAssembly>
41+
<assemblyIdentity name="Microsoft.ApplicationInsights" publicKeyToken="31bf3856ad364e35" culture="neutral" />
42+
<bindingRedirect oldVersion="0.0.0.0-2.1.0.0" newVersion="2.1.0.0" />
43+
</dependentAssembly>
4044
</assemblyBinding>
4145
</runtime>
4246
</configuration>

0 commit comments

Comments
 (0)