From 182c48f0b0681d479a5cbf7b4faa8012697305a3 Mon Sep 17 00:00:00 2001 From: Brennan Conroy Date: Fri, 12 Apr 2019 17:40:48 +0000 Subject: [PATCH 1/3] Merged PR 891: Update MessagePack dependency Update MessagePack dependency Related work items: #142 --- build/dependencies.props | 2 +- build/sources.props | 2 +- eng/Dependencies.props | 1 + eng/PatchConfig.props | 2 ++ .../src/Protocol/MessagePackHubProtocol.cs | 5 ++--- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/build/dependencies.props b/build/dependencies.props index b5f3763217..d120513bd4 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -108,7 +108,7 @@ 4.2.1 3.1.0 1.10.0 - 1.7.3.4 + 1.7.3.7 2.1.1 2.2.1 5.2.6 diff --git a/build/sources.props b/build/sources.props index 5b458ddf09..7648381d3b 100644 --- a/build/sources.props +++ b/build/sources.props @@ -19,7 +19,7 @@ https://dotnet.myget.org/F/aspnetcore-master/api/v3/index.json; https://dotnet.myget.org/F/roslyn/api/v3/index.json; https://vside.myget.org/F/vssdk/api/v3/index.json; - https://vside.myget.org/F/vsmac/api/v3/index.json + https://vside.myget.org/F/vsmac/api/v3/index.json; diff --git a/eng/Dependencies.props b/eng/Dependencies.props index e98d42be14..2f7b478d68 100644 --- a/eng/Dependencies.props +++ b/eng/Dependencies.props @@ -98,6 +98,7 @@ and are generated based on the last package release. + diff --git a/eng/PatchConfig.props b/eng/PatchConfig.props index 29e74d4f85..c25500cb91 100644 --- a/eng/PatchConfig.props +++ b/eng/PatchConfig.props @@ -28,6 +28,8 @@ Later on, this will be checked using this condition: + Microsoft.AspNetCore.SignalR.Protocols.MessagePack; + Microsoft.AspNetCore.SignalR.Redis; diff --git a/src/SignalR/common/Protocols.MessagePack/src/Protocol/MessagePackHubProtocol.cs b/src/SignalR/common/Protocols.MessagePack/src/Protocol/MessagePackHubProtocol.cs index 0b693605bf..36e4886e42 100644 --- a/src/SignalR/common/Protocols.MessagePack/src/Protocol/MessagePackHubProtocol.cs +++ b/src/SignalR/common/Protocols.MessagePack/src/Protocol/MessagePackHubProtocol.cs @@ -245,14 +245,13 @@ namespace Microsoft.AspNetCore.SignalR.Protocol var headerCount = ReadMapLength(input, ref offset, "headers"); if (headerCount > 0) { - // If headerCount is larger than int.MaxValue, things are going to go horribly wrong anyway :) - var headers = new Dictionary((int)headerCount, StringComparer.Ordinal); + var headers = new Dictionary(StringComparer.Ordinal); for (var i = 0; i < headerCount; i++) { var key = ReadString(input, ref offset, $"headers[{i}].Key"); var value = ReadString(input, ref offset, $"headers[{i}].Value"); - headers[key] = value; + headers.Add(key, value); } return headers; } From d558350d5052e09c57bc54de60227bfd2abd355c Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Tue, 14 May 2019 10:49:47 -0700 Subject: [PATCH 2/3] Move updateMigrations.cmd back into its correct subfolder --- {migrations => src/Templating/migrations}/updateMigrations.cmd | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {migrations => src/Templating/migrations}/updateMigrations.cmd (100%) diff --git a/migrations/updateMigrations.cmd b/src/Templating/migrations/updateMigrations.cmd similarity index 100% rename from migrations/updateMigrations.cmd rename to src/Templating/migrations/updateMigrations.cmd From 6ab3df58afad9ff867ba7ded85f332d8a45c1c6b Mon Sep 17 00:00:00 2001 From: Nate McMaster Date: Tue, 4 Jun 2019 16:58:12 -0700 Subject: [PATCH 3/3] Update branding to 2.1.12 (#10865) --- build/dependencies.props | 6 +-- build/submodules.props | 2 +- eng/Baseline.Designer.props | 22 +++++----- eng/Baseline.xml | 16 ++++---- eng/PatchConfig.props | 5 ++- eng/tools/BaselineGenerator/Program.cs | 6 ++- eng/tools/BaselineGenerator/README.md | 4 +- .../ArchiveBaseline.2.1.11.txt | 1 + .../ArchiveBaseline.2.1.11.txt | 1 + .../ZipManifestGenerator/Program.cs | 10 +++++ .../ZipManifestGenerator/README.md | 21 +++------- .../ZipManifestGenerator/UpdateBaselines.ps1 | 40 +++++++++++++++++++ version.props | 2 +- 13 files changed, 93 insertions(+), 43 deletions(-) create mode 100644 src/PackageArchive/Archive.CiServer.Patch.Compat/ArchiveBaseline.2.1.11.txt create mode 100644 src/PackageArchive/Archive.CiServer.Patch/ArchiveBaseline.2.1.11.txt create mode 100644 src/PackageArchive/ZipManifestGenerator/UpdateBaselines.ps1 diff --git a/build/dependencies.props b/build/dependencies.props index 316c47c1ad..608ac5f664 100644 --- a/build/dependencies.props +++ b/build/dependencies.props @@ -2,9 +2,8 @@ - 2.1.10 - 2.1.10 - 4.5.2 + 2.1.11 + 2.1.11 @@ -187,6 +186,7 @@ 4.5.0 5.2.0 3.1.1 + 4.5.3 4.3.4 4.5.3 4.5.0 diff --git a/build/submodules.props b/build/submodules.props index a088430493..4370c412c7 100644 --- a/build/submodules.props +++ b/build/submodules.props @@ -37,6 +37,6 @@ - + diff --git a/eng/Baseline.Designer.props b/eng/Baseline.Designer.props index a88565ad31..519b19b9db 100644 --- a/eng/Baseline.Designer.props +++ b/eng/Baseline.Designer.props @@ -2,7 +2,7 @@ $(MSBuildAllProjects);$(MSBuildThisFileFullPath) - 2.1.10 + 2.1.11 @@ -542,14 +542,14 @@ - 2.1.6 + 2.1.11 - + @@ -618,15 +618,15 @@ - 2.1.3 + 2.1.11 - + @@ -634,7 +634,7 @@ - + @@ -727,7 +727,7 @@ - 2.1.3 + 2.1.11 @@ -1081,19 +1081,19 @@ - 1.0.4 + 1.0.11 + - - 1.0.4 + 1.0.11 + - diff --git a/eng/Baseline.xml b/eng/Baseline.xml index e4001b8f78..6011202d83 100644 --- a/eng/Baseline.xml +++ b/eng/Baseline.xml @@ -1,10 +1,10 @@ - - + @@ -61,7 +61,7 @@ build of ASP.NET Core 2.1.x. Update this list when preparing for a new patch. - + @@ -70,7 +70,7 @@ build of ASP.NET Core 2.1.x. Update this list when preparing for a new patch. - + @@ -79,7 +79,7 @@ build of ASP.NET Core 2.1.x. Update this list when preparing for a new patch. - + @@ -111,8 +111,8 @@ build of ASP.NET Core 2.1.x. Update this list when preparing for a new patch. - - + + @@ -127,4 +127,4 @@ build of ASP.NET Core 2.1.x. Update this list when preparing for a new patch. - + \ No newline at end of file diff --git a/eng/PatchConfig.props b/eng/PatchConfig.props index 15c67e764d..57bc9bf38d 100644 --- a/eng/PatchConfig.props +++ b/eng/PatchConfig.props @@ -35,5 +35,8 @@ Later on, this will be checked using this condition: Microsoft.AspNetCore.SignalR.Redis; - + + + + diff --git a/eng/tools/BaselineGenerator/Program.cs b/eng/tools/BaselineGenerator/Program.cs index b8089832f0..f8ea164d53 100644 --- a/eng/tools/BaselineGenerator/Program.cs +++ b/eng/tools/BaselineGenerator/Program.cs @@ -61,7 +61,11 @@ namespace PackageBaselineGenerator var sourceRepository = new SourceRepository(packageSource, providers); if (_update.HasValue()) { - return await RunUpdateAsync(inputPath, input, sourceRepository); + var updateResult = await RunUpdateAsync(inputPath, input, sourceRepository); + if (updateResult != 0) + { + return updateResult; + } } var feedType = await sourceRepository.GetFeedType(CancellationToken.None); diff --git a/eng/tools/BaselineGenerator/README.md b/eng/tools/BaselineGenerator/README.md index fa3e4e0bda..4a77247a38 100644 --- a/eng/tools/BaselineGenerator/README.md +++ b/eng/tools/BaselineGenerator/README.md @@ -8,8 +8,8 @@ Add `--package-source {source}` to the commands below if the packages of interes ### Auto-update -1. Run `dotnet run --update` in this project folder. -2. Run `dotnet run` in this project. +Run `dotnet run --update` in this project folder. This will attempt to find the latest patch version of packages and +update the baseline file. ### Manual update diff --git a/src/PackageArchive/Archive.CiServer.Patch.Compat/ArchiveBaseline.2.1.11.txt b/src/PackageArchive/Archive.CiServer.Patch.Compat/ArchiveBaseline.2.1.11.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/src/PackageArchive/Archive.CiServer.Patch.Compat/ArchiveBaseline.2.1.11.txt @@ -0,0 +1 @@ + diff --git a/src/PackageArchive/Archive.CiServer.Patch/ArchiveBaseline.2.1.11.txt b/src/PackageArchive/Archive.CiServer.Patch/ArchiveBaseline.2.1.11.txt new file mode 100644 index 0000000000..8b13789179 --- /dev/null +++ b/src/PackageArchive/Archive.CiServer.Patch/ArchiveBaseline.2.1.11.txt @@ -0,0 +1 @@ + diff --git a/src/PackageArchive/ZipManifestGenerator/Program.cs b/src/PackageArchive/ZipManifestGenerator/Program.cs index 883d21b7c4..649a2631db 100644 --- a/src/PackageArchive/ZipManifestGenerator/Program.cs +++ b/src/PackageArchive/ZipManifestGenerator/Program.cs @@ -5,6 +5,7 @@ using System; using System.IO; using System.IO.Compression; using System.Linq; +using System.Net; using System.Net.Http; using System.Threading.Tasks; @@ -21,6 +22,8 @@ Usage: The output file path for the ZIP manifest file."); } + private const int ZipDoesNotExist = 404; + public static async Task Main(string[] args) { if (args.Length != 2) @@ -42,6 +45,13 @@ Usage: Console.WriteLine($"log: Downloading {url}"); zipPath = Path.Combine(Path.GetTempPath(), Path.GetRandomFileName() + ".zip"); var response = await new HttpClient().GetAsync(url); + + if (response.StatusCode == HttpStatusCode.NotFound) + { + Console.Error.WriteLine($"Could not find {url}."); + return ZipDoesNotExist; + } + response.EnsureSuccessStatusCode(); using (var outStream = File.Create(zipPath)) diff --git a/src/PackageArchive/ZipManifestGenerator/README.md b/src/PackageArchive/ZipManifestGenerator/README.md index 9922f2e465..441b96ebba 100644 --- a/src/PackageArchive/ZipManifestGenerator/README.md +++ b/src/PackageArchive/ZipManifestGenerator/README.md @@ -1,5 +1,5 @@ ZipManifestGenerator ---------- +-------------------- This console app is used to generate the list of files in a zip archive. @@ -13,19 +13,10 @@ Usage: Example: dotnet run ./archive.zip files.txt ``` -## Example for servicing updates +## Servicing updates -To generate a new manifest for the incremental CI server package caches, you would run +For convenience, this folder contains [./UpdateBaselines.ps1](./UpdateBaselines.ps1) to update +the baselines from the last patch release. -```ps1 -$ProdConBuild='20180919-01' -$Version='2.1.5' - -$patchUrl = "https://dotnetfeed.blob.core.windows.net/orchestrated-release-2-1/${ProdconBuild}/final/assets/aspnetcore/Runtime/${Version}/nuGetPackagesArchive-ci-server-${Version}.patch.zip" - -dotnet run $patchUrl "../Archive.CiServer.Patch/ArchiveBaseline.${Version}.txt" - -$compatPatchUrl = "https://dotnetfeed.blob.core.windows.net/orchestrated-release-2-1/${ProdconBuild}/final/assets/aspnetcore/Runtime/${Version}/nuGetPackagesArchive-ci-server-compat-${Version}.patch.zip" - -dotnet run $compatPatchUrl "../Archive.CiServer.Patch.Compat/ArchiveBaseline.${Version}.txt" -``` +Using version.props to figure out the last version, this script reads the build manifests from https://github.com/dotnet/versions/tree/master/build-info/dotnet/product/cli/release and +invokes the manifest generator diff --git a/src/PackageArchive/ZipManifestGenerator/UpdateBaselines.ps1 b/src/PackageArchive/ZipManifestGenerator/UpdateBaselines.ps1 new file mode 100644 index 0000000000..9e0481e40e --- /dev/null +++ b/src/PackageArchive/ZipManifestGenerator/UpdateBaselines.ps1 @@ -0,0 +1,40 @@ +$ErrorActionPreference = 'Stop' +$ProgressPreference = 'SilentlyContinue' + +Push-Location $PSScriptRoot +try { + + [xml]$versionProps = Get-Content "$PSScriptRoot/../../../version.props" + $LastVersion = "$($versionProps.Project.PropertyGroup.AspNetCoreMajorVersion).$($versionProps.Project.PropertyGroup.AspNetCoreMinorVersion).$($versionProps.Project.PropertyGroup.AspNetCorePatchVersion - 1)" + $manifestUrl = "https://raw.githubusercontent.com/dotnet/versions/master/build-info/dotnet/product/cli/release/$LastVersion/build.xml" + $buildXml = Invoke-RestMethod -Method GET $manifestUrl + $feedUrl = $buildXml.OrchestratedBuild.Endpoint.Url + $baseFeedUrl = $feedUrl -replace 'final/index.json','' + + Write-Host "Last patch version = $LastVersion" + Write-Host "BaseURL = $baseFeedUrl" + + function CreateBaseLineFromZip($url, $filePath) { + dotnet run $url $filePath + + if ($lastexitcode -eq 404) { + Write-Host -f Yellow "It appears there was no patch zip in the last release, so creating an empty baseline file in $filePath." + Set-Content -path $filePath '' + } + elseif($lastexitcode -ne 0) { + Write-Error "ZipGenerator failed" + exit 1 + } + } + + CreateBaseLineFromZip ` + "$baseFeedUrl/final/assets/aspnetcore/Runtime/${LastVersion}/nuGetPackagesArchive-ci-server-${LastVersion}.patch.zip" ` + "../Archive.CiServer.Patch/ArchiveBaseline.${LastVersion}.txt" + + CreateBaseLineFromZip ` + "$baseFeedUrl/final/assets/aspnetcore/Runtime/${LastVersion}/nuGetPackagesArchive-ci-server-compat-${LastVersion}.patch.zip" ` + "../Archive.CiServer.Patch.Compat/ArchiveBaseline.${LastVersion}.txt" +} +finally { + Pop-Location +} diff --git a/version.props b/version.props index 13a113a115..8c94afbed8 100644 --- a/version.props +++ b/version.props @@ -2,7 +2,7 @@ 2 1 - 11 + 12 servicing Servicing t000