This repository was archived by the owner on Jul 30, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
Search.GenerateAuxiliaryData/Settings
Stats.CreateAzureCdnWarehouseReports/Scripts
Stats.ImportAzureCdnStatistics Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22 "Initialization" : {
33 "AzureCdnCloudStorageAccount" : " DefaultEndpointsProtocol=https;AccountName=nugetdevlegacy;AccountKey=$$Dev-NuGetDevLegacyStorage-Key$$" ,
44 "AzureCdnCloudStorageContainerName" : " nuget-cdnstats" ,
5- "PrimaryDestination" : " DefaultEndpointsProtocol=https;AccountName=nugetdev0 ;AccountKey=$$Dev-NuGetDev0Storage -Key$$"
5+ "PrimaryDestination" : " DefaultEndpointsProtocol=https;AccountName=nugetdevlegacy ;AccountKey=$$Dev-NuGetDevLegacyStorage -Key$$"
66 },
77
88 "GalleryDb" : {
Original file line number Diff line number Diff line change 22 "Initialization" : {
33 "AzureCdnCloudStorageAccount" : " DefaultEndpointsProtocol=https;AccountName=nugetgallery;AccountKey=$$Prod-NuGetGalleryStorage-Key$$" ,
44 "AzureCdnCloudStorageContainerName" : " nuget-cdnstats" ,
5- "PrimaryDestination" : " DefaultEndpointsProtocol=https;AccountName=nugetprod0 ;AccountKey=$$Prod-NuGetProd0Storage -Key$$"
5+ "PrimaryDestination" : " DefaultEndpointsProtocol=https;AccountName=nugetgallery ;AccountKey=$$Prod-NuGetGalleryStorage -Key$$"
66 },
77
88 "GalleryDb" : {
Original file line number Diff line number Diff line change @@ -8,10 +8,10 @@ echo "Starting job - #{Jobs.stats.createazurecdnwarehousereports.Title}"
88title #{Jobs.stats.createazurecdnwarehousereports.Title}
99
1010start /w stats.createazurecdnwarehousereports.exe ^
11- -Configuration " #{Jobs.stats.createazurecdnwarehousereports.Configuration}"
12- -InstrumentationKey " #{Jobs.stats.createazurecdnwarehousereports.InstrumentationKey}" ^
13- -Interval #{Jobs.stats.createazurecdnwarehousereports.Interval} ^
14- -verbose true
11+ -Configuration " #{Jobs.stats.createazurecdnwarehousereports.Configuration}" ^
12+ -InstrumentationKey " #{Jobs.stats.createazurecdnwarehousereports.InstrumentationKey}" ^
13+ -Interval #{Jobs.stats.createazurecdnwarehousereports.Interval} ^
14+ -verbose true
1515
1616echo " Finished #{Jobs.stats.createazurecdnwarehousereports.Title}"
1717
Original file line number Diff line number Diff line change @@ -10,6 +10,12 @@ namespace Stats.ImportAzureCdnStatistics
1010{
1111 internal class DataImporter
1212 {
13+ public enum Table
14+ {
15+ Fact_Dist_Download ,
16+ Fact_Download
17+ }
18+
1319 private readonly Func < Task < SqlConnection > > _openStatisticsSqlConnectionAsync ;
1420 private const string _sqlSelectTop1FromTable = "SELECT TOP 1 * FROM [dbo].[{0}]" ;
1521
@@ -18,8 +24,9 @@ public DataImporter(Func<Task<SqlConnection>> openStatisticsSqlConnectionAsync)
1824 _openStatisticsSqlConnectionAsync = openStatisticsSqlConnectionAsync ;
1925 }
2026
21- public async Task < DataTable > GetDataTableAsync ( string tableName )
27+ public async Task < DataTable > GetDataTableAsync ( Table table )
2228 {
29+ var tableName = table . ToString ( ) ;
2330 var dataTable = new DataTable ( ) ;
2431 var query = string . Format ( _sqlSelectTop1FromTable , tableName ) ;
2532
Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ public async Task<DataTable> CreateAsync(IReadOnlyCollection<PackageStatistics>
126126
127127 // create facts data rows by linking source data with dimensions
128128 var dataImporter = new DataImporter ( _openStatisticsSqlConnectionAsync ) ;
129- var factsDataTable = await dataImporter . GetDataTableAsync ( " Fact_Download" ) ;
129+ var factsDataTable = await dataImporter . GetDataTableAsync ( DataImporter . Table . Fact_Download ) ;
130130
131131 var knownOperationsAvailable = operations . Any ( ) ;
132132 var knownClientsAvailable = clients . Any ( ) ;
@@ -247,7 +247,7 @@ public async Task<DataTable> CreateAsync(IReadOnlyCollection<ToolStatistics> sou
247247
248248 // create facts data rows by linking source data with dimensions
249249 var dataImporter = new DataImporter ( _openStatisticsSqlConnectionAsync ) ;
250- var dataTable = await dataImporter . GetDataTableAsync ( " Fact_Dist_Download" ) ;
250+ var dataTable = await dataImporter . GetDataTableAsync ( DataImporter . Table . Fact_Dist_Download ) ;
251251
252252 var knownClientsAvailable = clients . Any ( ) ;
253253 var knownPlatformsAvailable = platforms . Any ( ) ;
Original file line number Diff line number Diff line change 55using NuGet . Services . Incidents ;
66using NuGet . Services . Status ;
77using System . Collections . Generic ;
8+ using System . Linq ;
89using System . Text . RegularExpressions ;
910
1011namespace StatusAggregator . Parse
1112{
1213 public class OutdatedSearchServiceInstanceIncidentParser : EnvironmentPrefixIncidentParser
1314 {
14- private const string SubtitleRegEx = "A search service instance is using an outdated index!" ;
15+ private const string SubtitleRegEx = "All search service instances are using an outdated index!" ;
1516
1617 public OutdatedSearchServiceInstanceIncidentParser (
1718 IEnumerable < IIncidentParsingFilter > filters ,
1819 ILogger < OutdatedSearchServiceInstanceIncidentParser > logger )
19- : base ( SubtitleRegEx , filters , logger )
20+ : base (
21+ SubtitleRegEx ,
22+ filters . Where ( f => ! ( f is SeverityFilter ) ) , // The incident is always severity 4.
23+ logger )
2024 {
2125 }
2226
You can’t perform that action at this time.
0 commit comments