Skip to content
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

Move Build System to .NET Core 2.1, projects to .NET Standard 2.0 and .NET 4.5.2 #3668

Merged
merged 91 commits into from
May 16, 2019

Conversation

Aaronontheweb
Copy link
Member

This PR introduces the following changes:

  1. Standardize most .NET Framework / Standard / Core versions used inside the core / contrib libraries, their unit tests, MNTR, and so forth. These versions are now set inside common.props and referenced via build parameters.
  2. Remove dotnet-xunit, given that it's deprecated and won't be supported any further in the future.
  3. Replace dotnet-xunit with dotnet test inside our build system, which has future-facing support for the foreseeable future. All of our current build parameters (such as -parallel none) that we rely on inside XUnit are still fully supported.
  4. Fix the long-standing issues with VSTest and Visual Studio locking up the solution whenever certain test suites are run - turns out this is caused by .NET 4.5.2 and possibly older versions of .NET and some of the changes introduced into more recent versions of the VSTest adapter system. Upgrading our unit tests to target .NET 4.6.1 at a minimum fixes the issue.
  5. Update some of our plugins that were supporting really random versions of .NET, like .NET 4.5.1.

All testkits now target .NET 4.5.2 - consistent with what XUnit supports.
All libraries still target .NET 4.5 and .NET Standard 1.6, same as before.
All unit tests, MNTR, perf tests, and so forth target .NET 4.6.1 and .NET Core 1.1.

I have another set of changes planned to get us running on the .NET Core 2.1.500 SDK, but I want to restrict the number of changes made at anyone time and this PR already touches a lot of different projects.

@Aaronontheweb
Copy link
Member Author

Based on build system output thus far:

  • Windows build - ok
  • MNTR .NET Core - ok
  • MNTR .NET full - ok
  • Unit Tests .NET Core / Windows - ok but muted test failures cause process to abort; need to add back the smarter try...catch error handling we had in FAKE
  • Unit Tests .NET Full / Windows - hung on Akka.Cluster.Tests after 30 minutes. Same issue with VSTest adapters in Windows. Upgrading from .NET 4.5.2 was supposed to address this. Might also have to address the .NET Core SDK and XUnit versions to fix this.
  • Unit Tests .NET Core / Linux - compilation failure due to missing F# dependencies on Akka.FSharp.
  • Performance tests Windows / .NET full - ok but still racy (NBench issue)
  • NuGet pack - fails on MNTR (still looking .NET 4.5.2 directory)

@Aaronontheweb
Copy link
Member Author

Going to work the problem starting with the hung .NET Framework tests, since that's been the single biggest pain in the ass for everyone who's been complaining about ReSharper issues inside Visual Studio. I need to do some analysis and see which projects it is that hangs just in-case I can't fix it by upgrading the build + test runtime we're using.

Essentially, in the span of a year all of the .NET Core 1.1 infrastructure has byte-rotted immensely and this is what we're now paying for.

@Aaronontheweb
Copy link
Member Author

dotnet/msbuild#2275

@Aaronontheweb
Copy link
Member Author

After isolated the libraries that all caused the VSTest discovery engine to hang, I think I've narrowed it down to this issue with FsCheck fscheck/FsCheck#380

We don't have this issue with test suites such as Akka.Streams.Tests, where we don't use FsCheck. We do have this issue with Akka.Remote.Tests, Akka.Cluster.Tests, and Akka.Tests.

Going to do some more testing to see if an FsCheck upgrade will fix the issue.

@Aaronontheweb
Copy link
Member Author

Ok, yeah - can confirm the hang in the VSTest adapter was caused by FsCheck. Unfortunately, upgrading to the latest (2.13.0) didn't solve the issue. But removing the FSCHECK compilation symbol from .NET 4.6.1 builds did.

Going to do that and have us skip FsCheck specs for the time being until we can get that regression fixed.

@Aaronontheweb
Copy link
Member Author

I think I got all of the FsCheck instances in this case. Just need to add back the FSCHECK compilation symbol for .NET 4.6.1 builds to restore this functionality again.

@Aaronontheweb
Copy link
Member Author

Akka.Persistence specs OOM-ing on .NET 4.6.1

@Aaronontheweb
Copy link
Member Author

Wonder if this is caused by the EventMemoryJournal filling up and never leaving memory

No longer looking for an exact thread count since the CPU may not schedule it that. Instead, just ensure that all of the threads hit on the dispatcher shut down when the dispatcher is terminated.
@Aaronontheweb Aaronontheweb added this to the 1.4.0 milestone Mar 20, 2019
@Aaronontheweb
Copy link
Member Author

Not quite ready to merge this in yet - going to try to push out a v1.3.13 with some bug fixes first. Once this gets merged in, we're on the v1.4.0 train for good.

@Aaronontheweb
Copy link
Member Author

Pulling in the latest Akka.NET v1.3.13 bits before we merge this into the dev branch and "burn the boats" on any more 1.3.* changes.

@Aaronontheweb Aaronontheweb mentioned this pull request May 16, 2019
16 tasks
heatonmatthew pushed a commit to heatonmatthew/akka.net that referenced this pull request May 16, 2019
@heatonmatthew
Copy link
Contributor

@Aaronontheweb I just pushed a commit that removes some of the deficiencies of the 1.x netstandard api which are now available in the 2.0 netstandard api. Serialization is a big one.

I'll take a look into it, but this might help with getting #3725 running on DotNet Core.

heatonmatthew pushed a commit to heatonmatthew/akka.net that referenced this pull request May 16, 2019
@heatonmatthew
Copy link
Contributor

@Aaronontheweb I cherry-picked your changes from #3725 on top of my two commits above and both the Framework and Core tests appear to work on windows. I'll spin it up in a Linux docker container tomorrow at work and given them a run there too, but I think having the serialization attribute be the platform one (rather than the Akka polyfil) has helped.

This is incidentally one of the core factors that caused me to start down this netstandard2.0 path. I was doing testing with the 3.0 preview 5 and things were getting a bit confused with the significant differences to the 1.x standard api. :)

@Aaronontheweb
Copy link
Member Author

@heatonmatthew great! I need to work on that ASAP as that bug is having a live impact on some of our customers - would you mind sending in a pull request so I can see the changes?

@Aaronontheweb
Copy link
Member Author

@heatonmatthew as for those commits you want to put on top of this PR - would love to see a PR for that too. Would be very much appreciated!

@Aaronontheweb Aaronontheweb merged commit 42f6a5a into akkadotnet:dev May 16, 2019
heatonmatthew pushed a commit to heatonmatthew/akka.net that referenced this pull request May 16, 2019
heatonmatthew pushed a commit to heatonmatthew/akka.net that referenced this pull request May 16, 2019
@heatonmatthew
Copy link
Contributor

@Aaronontheweb PRs created:

@Aaronontheweb
Copy link
Member Author

@heatonmatthew thanks Matt! reviewed #3790 - I'll take a look at #3791 soon too. Really appreciate your help.

madmonkey pushed a commit to madmonkey/akka.net that referenced this pull request Jul 12, 2019
… .NET 4.5.2 (akkadotnet#3668)

* migrated to 'dotnet test'

* added missing variable for detecing TeamCity

* added more targets for end-to-end testing and building

* fixed issue with dotnet test lockup for Akka.Cluster.Tests

* upgraded all core projects to standards

* fixed all major build issues thus far

* upgraded all contrib/cluster projects

* completed standardizing all projects

* fixed issue with Akka.DI.Core

* upgrade Linux to .NET Core 2.0 SDK

* further fixes to build.sh

* changed search location for MNTR assemblies

* upgraded MNTR to .NET 4.6.1

* fixed build.sh dotnet-install command

* fixed .NET Core test execution

* fixed issue with Akka.Remote.Tests.MultiNode outputting to wrong spot

* added channel to build.sh

* changed to wget

* fixed dotnet installer url

* skip API approvals on .NET Core

* fixed issue with MNTR NuGet packaging

* disabled FsCheck

* attempted to address Akka.Persistence memory leak

* migrated to 'dotnet test'

* added missing variable for detecing TeamCity

* added more targets for end-to-end testing and building

* fixed issue with dotnet test lockup for Akka.Cluster.Tests

* rebased on dev

* fixed all major build issues thus far

* upgraded all contrib/cluster projects

* completed standardizing all projects

* fixed issue with Akka.DI.Core

* upgrade Linux to .NET Core 2.0 SDK

* further fixes to build.sh

* changed search location for MNTR assemblies

* upgraded MNTR to .NET 4.6.1

* fixed build.sh dotnet-install command

* fixed .NET Core test execution

* fixed issue with Akka.Remote.Tests.MultiNode outputting to wrong spot

* added channel to build.sh

* changed to wget

* fixed dotnet installer url

* skip API approvals on .NET Core

* fixed issue with MNTR NuGet packaging

* disabled FsCheck

* attempted to address Akka.Persistence memory leak

* fixed issue with Akka.Streams tests

* standardized FluentAssertions version

* fixed compilation of TCK

* upgraded to .NET Core 2.1 SDK

* removed restore stage - no longer needed

* bumpe tests to .NET Core 2.1

* Revert "bumpe tests to .NET Core 2.1"

This reverts commit f76e09f.

* workaround dotnet/msbuild#2275 until .NET Core 2.1 migration

* Revert "upgraded to .NET Core 2.1 SDK"

This reverts commit b000b76.

* improved test error result handling

* Revert "Revert "upgraded to .NET Core 2.1 SDK""

This reverts commit 1b1a836.

* Revert "Revert "bumpe tests to .NET Core 2.1""

This reverts commit 175d6ca.

* moving onto .NET Standard 2.0

* standardized most test projects

* fixed common.props references

* fixed .NET Core 2.1 build systems

* fixed issue with packing MNTR

* fixed issue with single test failure stopping build

* fixed failure handling

* fixed issues with Akka.Streams specs

* fixed scan for incremental tests

* working on FsCheck standardization issues

* removed more net implicit standard junk

* cleaning up implicit package versions; bumped to JSON.NET 12.0.1

* fixed port bindings for Akka.Cluster.Tools and Akka.Cluster.Sharding so suites could theoretically run in parallel

* fixed more ports

* fixed compilation errors

* rolled back to Newtonsoft.Json 9.0.1

* disabled parallelization in Akka.Streams.Tests

* added xunit.runner.json

* Disabled xunit.runner.json for Akka.Streams.Tests

* added more debug logging to scriptedtest

* issue appears to be the 1ms deadline not being long enough on .NET Core - stream isn't even wired up yet

* fixed race condition with Bug2640Spec for akkadotnet#2640

needed to give the system more messages to process so we guarantee hitting all four dispatcher threads when running the test suite in parallel.

* updated API approvals

* fixed issue with Bug2640Spec again

No longer looking for an exact thread count since the CPU may not schedule it that. Instead, just ensure that all of the threads hit on the dispatcher shut down when the dispatcher is terminated.

* same fix as previous
Aaronontheweb added a commit to Aaronontheweb/akka.net that referenced this pull request Jul 30, 2019
… .NET 4.5.2 (akkadotnet#3668)

* migrated to 'dotnet test'

* added missing variable for detecing TeamCity

* added more targets for end-to-end testing and building

* fixed issue with dotnet test lockup for Akka.Cluster.Tests

* upgraded all core projects to standards

* fixed all major build issues thus far

* upgraded all contrib/cluster projects

* completed standardizing all projects

* fixed issue with Akka.DI.Core

* upgrade Linux to .NET Core 2.0 SDK

* further fixes to build.sh

* changed search location for MNTR assemblies

* upgraded MNTR to .NET 4.6.1

* fixed build.sh dotnet-install command

* fixed .NET Core test execution

* fixed issue with Akka.Remote.Tests.MultiNode outputting to wrong spot

* added channel to build.sh

* changed to wget

* fixed dotnet installer url

* skip API approvals on .NET Core

* fixed issue with MNTR NuGet packaging

* disabled FsCheck

* attempted to address Akka.Persistence memory leak

* migrated to 'dotnet test'

* added missing variable for detecing TeamCity

* added more targets for end-to-end testing and building

* fixed issue with dotnet test lockup for Akka.Cluster.Tests

* rebased on dev

* fixed all major build issues thus far

* upgraded all contrib/cluster projects

* completed standardizing all projects

* fixed issue with Akka.DI.Core

* upgrade Linux to .NET Core 2.0 SDK

* further fixes to build.sh

* changed search location for MNTR assemblies

* upgraded MNTR to .NET 4.6.1

* fixed build.sh dotnet-install command

* fixed .NET Core test execution

* fixed issue with Akka.Remote.Tests.MultiNode outputting to wrong spot

* added channel to build.sh

* changed to wget

* fixed dotnet installer url

* skip API approvals on .NET Core

* fixed issue with MNTR NuGet packaging

* disabled FsCheck

* attempted to address Akka.Persistence memory leak

* fixed issue with Akka.Streams tests

* standardized FluentAssertions version

* fixed compilation of TCK

* upgraded to .NET Core 2.1 SDK

* removed restore stage - no longer needed

* bumpe tests to .NET Core 2.1

* Revert "bumpe tests to .NET Core 2.1"

This reverts commit f76e09f.

* workaround dotnet/msbuild#2275 until .NET Core 2.1 migration

* Revert "upgraded to .NET Core 2.1 SDK"

This reverts commit b000b76.

* improved test error result handling

* Revert "Revert "upgraded to .NET Core 2.1 SDK""

This reverts commit 1b1a836.

* Revert "Revert "bumpe tests to .NET Core 2.1""

This reverts commit 175d6ca.

* moving onto .NET Standard 2.0

* standardized most test projects

* fixed common.props references

* fixed .NET Core 2.1 build systems

* fixed issue with packing MNTR

* fixed issue with single test failure stopping build

* fixed failure handling

* fixed issues with Akka.Streams specs

* fixed scan for incremental tests

* working on FsCheck standardization issues

* removed more net implicit standard junk

* cleaning up implicit package versions; bumped to JSON.NET 12.0.1

* fixed port bindings for Akka.Cluster.Tools and Akka.Cluster.Sharding so suites could theoretically run in parallel

* fixed more ports

* fixed compilation errors

* rolled back to Newtonsoft.Json 9.0.1

* disabled parallelization in Akka.Streams.Tests

* added xunit.runner.json

* Disabled xunit.runner.json for Akka.Streams.Tests

* added more debug logging to scriptedtest

* issue appears to be the 1ms deadline not being long enough on .NET Core - stream isn't even wired up yet

* fixed race condition with Bug2640Spec for akkadotnet#2640

needed to give the system more messages to process so we guarantee hitting all four dispatcher threads when running the test suite in parallel.

* updated API approvals

* fixed issue with Bug2640Spec again

No longer looking for an exact thread count since the CPU may not schedule it that. Instead, just ensure that all of the threads hit on the dispatcher shut down when the dispatcher is terminated.

* same fix as previous
Aaronontheweb added a commit to Aaronontheweb/akka.net that referenced this pull request Oct 17, 2019
Aaronontheweb pushed a commit to Aaronontheweb/akka.net that referenced this pull request Feb 28, 2020
@Aaronontheweb Aaronontheweb deleted the upgrade-build-system branch May 26, 2020 19:37
Aaronontheweb added a commit that referenced this pull request May 10, 2021
…3790)

* Enable features that are now in the netstandard2.0 library set (but were missing from the 1.x library set). #3668

* Correct version numbers for Clean target #3668

* Post-merge cleanup

* csproj and code cleanup

* Fix Akka.Persistence.TCK outdated journal spec, original assumption was wrong.

* Avoid hardwiring names, spec name isn't hardwired anymore.

* Add serialization support to exceptions (at least for those in the Akka and Akka.Remote package)

* Add support to wrap exceptions in custom fields for ExceptionSupport

* Add spec for ExceptionSupport

* Update APIApproval list

* Fix flaky spec

* Revert "Fix flaky spec"

This reverts commit c34b2a6.

* Fix flaky tests

Co-authored-by: matthew <matthew.heaton@transmax.com.au>
Co-authored-by: Aaron Stannard <aaron@petabridge.com>
Co-authored-by: Gregorius Soedharmo <arkatufus@yahoo.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants