Skip to content

Commit

Permalink
Merge pull request #5519 from akkadotnet/dev
Browse files Browse the repository at this point in the history
v1.4.32 Akka.NET Release
  • Loading branch information
Aaronontheweb authored Jan 18, 2022
2 parents c795dee + 2ae5dc1 commit f47465d
Show file tree
Hide file tree
Showing 277 changed files with 4,502 additions and 1,698 deletions.
1 change: 1 addition & 0 deletions .github/workflows/nightly-nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
jobs:
build-and-publish:
runs-on: windows-latest
if: github.repository == 'akkadotnet/akka.net'
steps:
- uses: actions/checkout@v2
- name: Setup .NET 5
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -224,3 +224,4 @@ launchSettings.json
# NDepend
*.ndproj
/[Nn][Dd]epend[Oo]ut
.ionide/symbolCache.db
176 changes: 0 additions & 176 deletions CONTRIBUTING.md

This file was deleted.

37 changes: 36 additions & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,40 @@
#### 1.4.32 January 19 2022 ####
Akka.NET v1.4.32 is a minor release that contains some API improvements. Most of the changes have been aimed at improving our web documentation and code cleanup to modernize some of our code. One big improvement in this version release is the Hyperion serialization update.

Hyperion 0.12.0 introduces a new deserialization security mechanism to allow users to selectively filter allowed types during deserialization to prevent deserialization of untrusted data described [here](https://cwe.mitre.org/data/definitions/502.html). This new feature is exposed in Akka.NET in HOCON through the new [`akka.actor.serialization-settings.hyperion.allowed-types`](https://github.com/akkadotnet/akka.net/blob/dev/src/contrib/serializers/Akka.Serialization.Hyperion/reference.conf#L33-L35) settings or programmatically through the new `WithTypeFilter` method in the `HyperionSerializerSetup` class.

The simplest way to programmatically describe the type filter is to use the convenience class `TypeFilterBuilder`:

```c#
var typeFilter = TypeFilterBuilder.Create()
.Include<AllowedClassA>()
.Include<AllowedClassB>()
.Build();
var setup = HyperionSerializerSetup.Default
.WithTypeFilter(typeFilter);
```

You can also create your own implementation of `ITypeFilter` and pass an instance of it into the `WithTypeFilter` method.

For complete documentation, please read the Hyperion [readme on filtering types for secure deserialization.](https://github.com/akkadotnet/Hyperion#whitelisting-types-on-deserialization)

* [Akka.Streams: Added Flow.LazyInitAsync and Sink.LazyInitSink to replace Sink.LazyInit](https://github.com/akkadotnet/akka.net/pull/5476)
* [Akka.Serialization.Hyperion: Implement the new ITypeFilter security feature](https://github.com/akkadotnet/akka.net/pull/5510)

If you want to see the [full set of changes made in Akka.NET v1.4.32, click here](https://github.com/akkadotnet/akka.net/milestone/63).

| COMMITS | LOC+ | LOC- | AUTHOR |
| --- | --- | --- | --- |
| 11 | 1752 | 511 | Aaron Stannard |
| 8 | 1433 | 534 | Gregorius Soedharmo |
| 3 | 754 | 222 | Ismael Hamed |
| 2 | 3 | 6 | Brah McDude |
| 2 | 227 | 124 | Ebere Abanonu |
| 1 | 331 | 331 | Sean Killeen |
| 1 | 1 | 1 | TangkasOka |

#### 1.4.31 December 20 2021 ####
Akka.NET v1.4.30 is a minor release that contains some bug fixes.
Akka.NET v1.4.31 is a minor release that contains some bug fixes.

Akka.NET v1.4.30 contained a breaking change that broke binary compatibility with all Akka.DI plugins.
Even though those plugins are deprecated that change is not compatible with our SemVer standards
Expand Down
4 changes: 2 additions & 2 deletions build-system/pr-validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ jobs:
- task: Npm@1
inputs:
command: "custom"
customCommand: "install -g markdownlint-cli"
customCommand: "install -g markdownlint-cli markdownlint-rule-titlecase"
- task: CmdLine@2
inputs:
script: 'markdownlint "docs/**/*.md"'
script: 'markdownlint "docs/**/*.md" --rules "markdownlint-rule-titlecase"'
- job: WindowsBuild
displayName: Windows Build
pool:
Expand Down
65 changes: 39 additions & 26 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -325,30 +325,36 @@ Target "MultiNodeTestsNetCore" (fun _ ->
let projects =
let rawProjects = match (isWindows) with
| true -> !! "./src/**/*.Tests.MultiNode.csproj"
| _ -> !! "./src/**/*.Tests.MulitNode.csproj" // if you need to filter specs for Linux vs. Windows, do it here
| _ -> !! "./src/**/*.Tests.MultiNode.csproj" // if you need to filter specs for Linux vs. Windows, do it here
rawProjects |> Seq.choose filterProjects

let runSingleProject project =
let projectDlls = projects |> Seq.map ( fun project ->
let assemblyName = fileNameWithoutExt project
(directory project) @@ "bin" @@ "Release" @@ testNetCoreVersion @@ assemblyName + ".dll"
)

let runSingleProject projectDll =
let arguments =
match (hasTeamCity) with
| true -> (sprintf "test -c Release --no-build --logger:trx --logger:\"console;verbosity=normal\" --framework %s --results-directory \"%s\" -- -parallel none -teamcity" testNetCoreVersion outputMultiNode)
| false -> (sprintf "test -c Release --no-build --logger:trx --logger:\"console;verbosity=normal\" --framework %s --results-directory \"%s\" -- -parallel none" testNetCoreVersion outputMultiNode)

| true -> (sprintf "test \"%s\" -l:trx -l:\"console;verbosity=detailed\" --framework %s --results-directory \"%s\" -- -teamcity" projectDll testNetCoreVersion outputMultiNode)
| false -> (sprintf "test \"%s\" -l:trx -l:\"console;verbosity=detailed\" --framework %s --results-directory \"%s\"" projectDll testNetCoreVersion outputMultiNode)

let resultPath = (directory projectDll)
File.WriteAllText(
(resultPath @@ "xunit.multinode.runner.json"),
(sprintf "{\"outputDirectory\":\"%s\"}" outputMultiNode).Replace("\\", "\\\\"))

let result = ExecProcess(fun info ->
info.FileName <- "dotnet"
info.WorkingDirectory <- (Directory.GetParent project).FullName
info.WorkingDirectory <- outputMultiNode
info.Arguments <- arguments) (TimeSpan.FromMinutes 90.0)

ResultHandling.failBuildIfXUnitReportedError TestRunnerErrorLevel.Error result

CreateDir outputMultiNode
projects |> Seq.iter ( fun project ->
try
runSingleProject project
with
ex ->
raise (Exception(sprintf "Exception thrown while testing %s" project, ex))
)
projectDlls |> Seq.iter ( fun projectDll ->
runSingleProject projectDll
)
)

Target "MultiNodeTestsNet" (fun _ ->
Expand All @@ -358,31 +364,38 @@ Target "MultiNodeTestsNet" (fun _ ->
let projects =
let rawProjects = match (isWindows) with
| true -> !! "./src/**/*.Tests.MultiNode.csproj"
| _ -> !! "./src/**/*.Tests.MulitNode.csproj" // if you need to filter specs for Linux vs. Windows, do it here
| _ -> !! "./src/**/*.Tests.MultiNode.csproj" // if you need to filter specs for Linux vs. Windows, do it here
rawProjects |> Seq.choose filterProjects

let runSingleProject project =
let projectDlls = projects |> Seq.map ( fun project ->
let assemblyName = fileNameWithoutExt project
(directory project) @@ "bin" @@ "Release" @@ testNetVersion @@ assemblyName + ".dll"
)

let runSingleProject projectDll =
let arguments =
match (hasTeamCity) with
| true -> (sprintf "test -c Release --no-build --logger:trx --logger:\"console;verbosity=normal\" --framework %s --results-directory \"%s\" -- -parallel none -teamcity" testNetVersion outputMultiNode)
| false -> (sprintf "test -c Release --no-build --logger:trx --logger:\"console;verbosity=normal\" --framework %s --results-directory \"%s\" -- -parallel none" testNetVersion outputMultiNode)

| true -> (sprintf "test \"%s\" -l:trx -l:\"console;verbosity=detailed\" --framework %s --results-directory \"%s\" -- -teamcity" projectDll testNetVersion outputMultiNode)
| false -> (sprintf "test \"%s\" -l:trx -l:\"console;verbosity=detailed\" --framework %s --results-directory \"%s\"" projectDll testNetVersion outputMultiNode)

let resultPath = (directory projectDll)
File.WriteAllText(
(resultPath @@ "xunit.multinode.runner.json"),
(sprintf "{\"outputDirectory\":\"%s\"}" outputMultiNode).Replace("\\", "\\\\"))

let result = ExecProcess(fun info ->
info.FileName <- "dotnet"
info.WorkingDirectory <- (Directory.GetParent project).FullName
info.WorkingDirectory <- outputMultiNode
info.Arguments <- arguments) (TimeSpan.FromMinutes 90.0)

ResultHandling.failBuildIfXUnitReportedError TestRunnerErrorLevel.Error result

CreateDir outputMultiNode
projects |> Seq.iter ( fun project ->
try
runSingleProject project
with
ex ->
raise (Exception(sprintf "Exception thrown while testing %s" project, ex))
)
projectDlls |> Seq.iter ( fun projectDll ->
runSingleProject projectDll
)
)

Target "NBench" (fun _ ->
ensureDirectory outputPerfTests
let projects =
Expand Down
4 changes: 2 additions & 2 deletions docs/articles/actors/dependency-injection.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ var worker1Ref = system.ActorOf(system.DI().Props<TypedWorker>(), "Worker1");
var worker2Ref = system.ActorOf(system.DI().Props<TypedWorker>(), "Worker2");
```

### Creating Child Actors using DI
### Creating Child Actors Using DI

When you want to create child actors from within your existing actors using
Dependency Injection you can use the Actor Content extension just like in
Expand Down Expand Up @@ -203,7 +203,7 @@ var system = ActorSystem.Create("MySystem");
var propsResolver = new NinjectDependencyResolver(container,system);
```

#### Other frameworks
#### Other Frameworks

Support for additional dependency injection frameworks may be added in the
future, but you can easily implement your own by implementing an
Expand Down
4 changes: 2 additions & 2 deletions docs/articles/actors/di-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ title: DI Core
**Actor Producer Extension** library is used to create a Dependency Injection Container for the [Akka.NET](https://github.com/akkadotnet/akka.net) framework.

## What is it?
## What Is It?

**Akka.DI.Core** is an **ActorSystem extension** library for the Akka.NET
framework that provides a simple way to create an Actor Dependency Resolver
that can be used an alternative to the basic capabilities of [Props](xref:receive-actor-api#props)
when you have actors with multiple dependencies.

## How do you create an Extension?
## How Do You Create an Extension?

* Create a new class library
* Reference your favorite IoC Container, the Akka.DI.Core, and of course Akka
Expand Down
Loading

0 comments on commit f47465d

Please sign in to comment.