New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to ASP.NET Core 2.1 #178

Merged
merged 35 commits into from May 31, 2018

Conversation

2 participants
@martincostello
Copy link
Owner

martincostello commented Mar 17, 2018

Migrate the application to ASP.NET Core 2.1. Changes include:

  1. Updating to .NET Core SDK 2.1.300.
  2. Updating to ASP.NET Core 2.1.0.
  3. Using the Microsoft.AspNetCore.App NuGet package instead of Microsoft.AspNetCore.All.
  4. Using some new ASP.NET Core idioms (such as setting the compatibility level).
  5. Using Microsoft.Extensions.Http (HttpClientFactory) for use of HttpClient.
  6. Using Microsoft.AspNetCore.Mvc.Testing for integration tests.
  7. Using Refit to call the TfL API.
  8. Using in-process IIS hosting.
@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Mar 18, 2018

Codecov Report

Merging #178 into master will increase coverage by 1.42%.
The diff coverage is 77.18%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #178      +/-   ##
=========================================
+ Coverage   57.47%   58.9%   +1.42%     
=========================================
  Files          66      68       +2     
  Lines        3149    3105      -44     
  Branches      413     403      -10     
=========================================
+ Hits         1810    1829      +19     
+ Misses       1153    1088      -65     
- Partials      186     188       +2
Impacted Files Coverage Δ
...vel.Site/Middleware/CustomHttpHeadersMiddleware.cs 78.94% <ø> (-0.46%) ⬇️
...LondonTravel.Site/AzureEnvironmentSecretManager.cs 0% <0%> (ø)
.../LondonTravel.Site/Controllers/ManageController.cs 0% <0%> (ø) ⬆️
...LondonTravel.Site/Controllers/AccountController.cs 14.61% <0%> (ø) ⬆️
...rc/LondonTravel.Site/Controllers/HomeController.cs 24.13% <0%> (+0.8%) ⬆️
...c/LondonTravel.Site/Identity/OAuthEventsHandler.cs 67.77% <100%> (ø) ⬆️
...Site/Extensions/IConfigurationBuilderExtensions.cs 57.14% <57.14%> (ø)
src/LondonTravel.Site/Program.cs 55% <75%> (+55%) ⬆️
...ravel.Site/Extensions/ILoggingBuilderExtensions.cs 76.19% <76.19%> (ø)
src/LondonTravel.Site/Startup.cs 82.35% <83.33%> (+82.35%) ⬆️
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fe55939...224db60. Read the comment docs.

martincostello added some commits Mar 17, 2018

Update to ASP.NET Core 2.1
Update to use ASP.NET Core 2.1 (preview 1) and HttpClientFactory.
Use Microsoft.AspNetCore.Mvc.Testing
Use Microsoft.AspNetCore.Mvc.Testing for integration tests.
Remove Microsoft.VisualStudio.Web.CodeGeneration.Tools
Remove Microsoft.VisualStudio.Web.CodeGeneration.Tools as it appears to be failing to restore NuGet packages.
Update version to 2.1.0
Update the version of the site to 2.1.0.
Use explicit gulp and npm versions
Use explicit versions of gulp and npm in CI.
Update to npm 5.7.1.
Add HSTS and HTTPS redirection middleware
Add middlewares for HSTS and HTTP to HTTPS redirection.
Configure HSTS
Configure HSTS and remove header from custom middleware.
Fix integration tests for HTTPS redirection
Fix integration tests by setting the test server base address to HTTPS.
Use in-process IIS hosting
Use in-process IIS hosting instead of the reverse-proxy hosting.
Update npm packages
Update all npm packages to their latest versions.
Fix broken karma-typescript package
Downgrade karma-typescript to a version that works.
Use Refit
Use Refit to call the TfL API.

@martincostello martincostello force-pushed the AspNetCore-2.1 branch from d86be77 to 9c75fdd Mar 28, 2018

martincostello added some commits Mar 28, 2018

Fix code analysis warnings
Fix code analysis warnings for string comparisons.
Work around incorrect "assembly version missing" warnings.
Add gulp binding for project open
Run gulp publish when the site project is opened.
Use Microsoft.AspNetCore.App
Use Microsoft.AspNetCore.App instead of Microsoft.AspNetCore.All.
Update to .NET Core 2.1 Preview 2
Update to preview 2 of .NET Core 2.1.
Update various other dependencies to their latest versions.
@martincostello

This comment has been minimized.

Copy link
Owner

martincostello commented Apr 11, 2018

The logging is a lot more verbose when running in CI now - need to turn it down to speed up the build. Might be to do with the changes to the fixture for the integration tests.

martincostello added some commits May 19, 2018

Update to .NET Core 2.1 RC1
Update to release candidate 1 of .NET Core 2.1.
Update various other dependencies to their latest versions.
Use final ASP.NET Core 2.1 release
Use the early access NuGet feed to migrate to the RTM version of ASP.NET Core 2.1.
Update npm packages
Update npm packages and lock file after merge.
Use npm 6.1.0
Update to npm 6.1.0.
@martincostello

This comment has been minimized.

Copy link
Owner

martincostello commented May 26, 2018

Once RTM packages are in nuget.org, just need to drop the extra NuGet feed and then will do a squash merge.

martincostello added some commits May 26, 2018

Refactor application startup
Refactor application startup to remove redundant setup of configuration, move configuration into the host building, remove the need to use TestStartup and prepare to remove StartupBase.
Reduce local console log verbosity
Reduce the log verbosity used when running on the console for local development.
Remove StartupBase
Remove the separate StartupBase class and just use a single Startup class.
Remove redundant logging configuration
Remove redundant configuration for the application builder.
Remove need to set Development
Remove the need to explicitly set the tests to run as Development instead of Production.
@martincostello

This comment has been minimized.

Copy link
Owner

martincostello commented May 26, 2018

Comparing fe55939 against a6f946a using Kestrel in Development mode:

BenchmarkDotNet=v0.10.14, OS=Windows 10.0.17134
Intel Core i7-6700HQ CPU 2.60GHz (Skylake), 1 CPU, 8 logical and 4 physical cores
.NET Core SDK=2.1.300
  [Host]     : .NET Core 2.1.0 (CoreCLR 4.6.26515.07, CoreFX 4.6.26515.06), 64bit RyuJIT
  DefaultJob : .NET Core 2.1.0 (CoreCLR 4.6.26515.07, CoreFX 4.6.26515.06), 64bit RyuJIT

Method Mean Error StdDev Median Scaled ScaledSD
AspNetCore20 11.50 ms 0.5531 ms 1.631 ms 11.75 ms 1.00 0.00
AspNetCore21 10.65 ms 0.4288 ms 1.258 ms 10.01 ms 0.94 0.17
@martincostello

This comment has been minimized.

Copy link
Owner

martincostello commented May 26, 2018

Looks like there’s some double-logging going on.

martincostello added some commits May 27, 2018

Fix double logging
Fix logs being written to Serilog twice.
Update log levels for tests
Update the log levels used in the tests to reduce CI verbosity (hopefully).
Remove in-process IIS hosting
Remove configuration for IIS in-process hosting as this is no longer part of ASP.NET Core 2.1.0.
Remove early-access download NuGet feed
Remove the early-access download feed URL for 2.1.0 now that the packages have been published to nuget.org.
Use tag to download obtain script
Revert to using tags to get the script to download the SDK.
@martincostello

This comment has been minimized.

Copy link
Owner

martincostello commented May 30, 2018

Just waiting for Azure Web Apps to deploy the 2.1.0 runtime now.

Revert to karma 1.3.0
Revert to karma 1.3.0 (for now) as it does not work in VSTS.

@martincostello martincostello changed the title [DNMY] Migrate to ASP.NET Core 2.1 Migrate to ASP.NET Core 2.1 May 31, 2018

martincostello added some commits May 31, 2018

Migrate to puppeteer
Migrate to puppeteer from PhantomJS as it doesn't work in VSTS anymore.
Downgrade error to warning
Downgrade console.error() to console.warn() when trying to register a service worker.

@martincostello martincostello merged commit b599761 into master May 31, 2018

4 checks passed

codecov/patch 77.18% of diff hit (target 57.47%)
Details
codecov/project 58.9% (+1.42%) compared to fe55939
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@martincostello martincostello deleted the AspNetCore-2.1 branch May 31, 2018

martincostello added a commit that referenced this pull request Jun 2, 2018

Fix VS Code configuration
Fix the launch configuration for VS Code broken by #178.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment