Skip to content

Commit f47465d

Browse files
Merge pull request #5519 from akkadotnet/dev
v1.4.32 Akka.NET Release
2 parents c795dee + 2ae5dc1 commit f47465d

File tree

277 files changed

+4502
-1698
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

277 files changed

+4502
-1698
lines changed

.github/workflows/nightly-nuget.yml

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212
jobs:
1313
build-and-publish:
1414
runs-on: windows-latest
15+
if: github.repository == 'akkadotnet/akka.net'
1516
steps:
1617
- uses: actions/checkout@v2
1718
- name: Setup .NET 5

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -224,3 +224,4 @@ launchSettings.json
224224
# NDepend
225225
*.ndproj
226226
/[Nn][Dd]epend[Oo]ut
227+
.ionide/symbolCache.db

CONTRIBUTING.md

-176
This file was deleted.

RELEASE_NOTES.md

+36-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,40 @@
1+
#### 1.4.32 January 19 2022 ####
2+
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.
3+
4+
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.
5+
6+
The simplest way to programmatically describe the type filter is to use the convenience class `TypeFilterBuilder`:
7+
8+
```c#
9+
var typeFilter = TypeFilterBuilder.Create()
10+
.Include<AllowedClassA>()
11+
.Include<AllowedClassB>()
12+
.Build();
13+
var setup = HyperionSerializerSetup.Default
14+
.WithTypeFilter(typeFilter);
15+
```
16+
17+
You can also create your own implementation of `ITypeFilter` and pass an instance of it into the `WithTypeFilter` method.
18+
19+
For complete documentation, please read the Hyperion [readme on filtering types for secure deserialization.](https://github.com/akkadotnet/Hyperion#whitelisting-types-on-deserialization)
20+
21+
* [Akka.Streams: Added Flow.LazyInitAsync and Sink.LazyInitSink to replace Sink.LazyInit](https://github.com/akkadotnet/akka.net/pull/5476)
22+
* [Akka.Serialization.Hyperion: Implement the new ITypeFilter security feature](https://github.com/akkadotnet/akka.net/pull/5510)
23+
24+
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).
25+
26+
| COMMITS | LOC+ | LOC- | AUTHOR |
27+
| --- | --- | --- | --- |
28+
| 11 | 1752 | 511 | Aaron Stannard |
29+
| 8 | 1433 | 534 | Gregorius Soedharmo |
30+
| 3 | 754 | 222 | Ismael Hamed |
31+
| 2 | 3 | 6 | Brah McDude |
32+
| 2 | 227 | 124 | Ebere Abanonu |
33+
| 1 | 331 | 331 | Sean Killeen |
34+
| 1 | 1 | 1 | TangkasOka |
35+
136
#### 1.4.31 December 20 2021 ####
2-
Akka.NET v1.4.30 is a minor release that contains some bug fixes.
37+
Akka.NET v1.4.31 is a minor release that contains some bug fixes.
338

439
Akka.NET v1.4.30 contained a breaking change that broke binary compatibility with all Akka.DI plugins.
540
Even though those plugins are deprecated that change is not compatible with our SemVer standards

build-system/pr-validation.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ jobs:
4848
- task: Npm@1
4949
inputs:
5050
command: "custom"
51-
customCommand: "install -g markdownlint-cli"
51+
customCommand: "install -g markdownlint-cli markdownlint-rule-titlecase"
5252
- task: CmdLine@2
5353
inputs:
54-
script: 'markdownlint "docs/**/*.md"'
54+
script: 'markdownlint "docs/**/*.md" --rules "markdownlint-rule-titlecase"'
5555
- job: WindowsBuild
5656
displayName: Windows Build
5757
pool:

build.fsx

+39-26
Original file line numberDiff line numberDiff line change
@@ -325,30 +325,36 @@ Target "MultiNodeTestsNetCore" (fun _ ->
325325
let projects =
326326
let rawProjects = match (isWindows) with
327327
| true -> !! "./src/**/*.Tests.MultiNode.csproj"
328-
| _ -> !! "./src/**/*.Tests.MulitNode.csproj" // if you need to filter specs for Linux vs. Windows, do it here
328+
| _ -> !! "./src/**/*.Tests.MultiNode.csproj" // if you need to filter specs for Linux vs. Windows, do it here
329329
rawProjects |> Seq.choose filterProjects
330330

331-
let runSingleProject project =
331+
let projectDlls = projects |> Seq.map ( fun project ->
332+
let assemblyName = fileNameWithoutExt project
333+
(directory project) @@ "bin" @@ "Release" @@ testNetCoreVersion @@ assemblyName + ".dll"
334+
)
335+
336+
let runSingleProject projectDll =
332337
let arguments =
333338
match (hasTeamCity) with
334-
| true -> (sprintf "test -c Release --no-build --logger:trx --logger:\"console;verbosity=normal\" --framework %s --results-directory \"%s\" -- -parallel none -teamcity" testNetCoreVersion outputMultiNode)
335-
| false -> (sprintf "test -c Release --no-build --logger:trx --logger:\"console;verbosity=normal\" --framework %s --results-directory \"%s\" -- -parallel none" testNetCoreVersion outputMultiNode)
336-
339+
| true -> (sprintf "test \"%s\" -l:trx -l:\"console;verbosity=detailed\" --framework %s --results-directory \"%s\" -- -teamcity" projectDll testNetCoreVersion outputMultiNode)
340+
| false -> (sprintf "test \"%s\" -l:trx -l:\"console;verbosity=detailed\" --framework %s --results-directory \"%s\"" projectDll testNetCoreVersion outputMultiNode)
341+
342+
let resultPath = (directory projectDll)
343+
File.WriteAllText(
344+
(resultPath @@ "xunit.multinode.runner.json"),
345+
(sprintf "{\"outputDirectory\":\"%s\"}" outputMultiNode).Replace("\\", "\\\\"))
346+
337347
let result = ExecProcess(fun info ->
338348
info.FileName <- "dotnet"
339-
info.WorkingDirectory <- (Directory.GetParent project).FullName
349+
info.WorkingDirectory <- outputMultiNode
340350
info.Arguments <- arguments) (TimeSpan.FromMinutes 90.0)
341351

342352
ResultHandling.failBuildIfXUnitReportedError TestRunnerErrorLevel.Error result
343353

344354
CreateDir outputMultiNode
345-
projects |> Seq.iter ( fun project ->
346-
try
347-
runSingleProject project
348-
with
349-
ex ->
350-
raise (Exception(sprintf "Exception thrown while testing %s" project, ex))
351-
)
355+
projectDlls |> Seq.iter ( fun projectDll ->
356+
runSingleProject projectDll
357+
)
352358
)
353359

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

364-
let runSingleProject project =
370+
let projectDlls = projects |> Seq.map ( fun project ->
371+
let assemblyName = fileNameWithoutExt project
372+
(directory project) @@ "bin" @@ "Release" @@ testNetVersion @@ assemblyName + ".dll"
373+
)
374+
375+
let runSingleProject projectDll =
365376
let arguments =
366377
match (hasTeamCity) with
367-
| true -> (sprintf "test -c Release --no-build --logger:trx --logger:\"console;verbosity=normal\" --framework %s --results-directory \"%s\" -- -parallel none -teamcity" testNetVersion outputMultiNode)
368-
| false -> (sprintf "test -c Release --no-build --logger:trx --logger:\"console;verbosity=normal\" --framework %s --results-directory \"%s\" -- -parallel none" testNetVersion outputMultiNode)
369-
378+
| true -> (sprintf "test \"%s\" -l:trx -l:\"console;verbosity=detailed\" --framework %s --results-directory \"%s\" -- -teamcity" projectDll testNetVersion outputMultiNode)
379+
| false -> (sprintf "test \"%s\" -l:trx -l:\"console;verbosity=detailed\" --framework %s --results-directory \"%s\"" projectDll testNetVersion outputMultiNode)
380+
381+
let resultPath = (directory projectDll)
382+
File.WriteAllText(
383+
(resultPath @@ "xunit.multinode.runner.json"),
384+
(sprintf "{\"outputDirectory\":\"%s\"}" outputMultiNode).Replace("\\", "\\\\"))
385+
370386
let result = ExecProcess(fun info ->
371387
info.FileName <- "dotnet"
372-
info.WorkingDirectory <- (Directory.GetParent project).FullName
388+
info.WorkingDirectory <- outputMultiNode
373389
info.Arguments <- arguments) (TimeSpan.FromMinutes 90.0)
374390

375391
ResultHandling.failBuildIfXUnitReportedError TestRunnerErrorLevel.Error result
376392

377393
CreateDir outputMultiNode
378-
projects |> Seq.iter ( fun project ->
379-
try
380-
runSingleProject project
381-
with
382-
ex ->
383-
raise (Exception(sprintf "Exception thrown while testing %s" project, ex))
384-
)
394+
projectDlls |> Seq.iter ( fun projectDll ->
395+
runSingleProject projectDll
396+
)
385397
)
398+
386399
Target "NBench" (fun _ ->
387400
ensureDirectory outputPerfTests
388401
let projects =

docs/articles/actors/dependency-injection.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ var worker1Ref = system.ActorOf(system.DI().Props<TypedWorker>(), "Worker1");
105105
var worker2Ref = system.ActorOf(system.DI().Props<TypedWorker>(), "Worker2");
106106
```
107107

108-
### Creating Child Actors using DI
108+
### Creating Child Actors Using DI
109109

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

206-
#### Other frameworks
206+
#### Other Frameworks
207207

208208
Support for additional dependency injection frameworks may be added in the
209209
future, but you can easily implement your own by implementing an

docs/articles/actors/di-core.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ title: DI Core
1010
1111
**Actor Producer Extension** library is used to create a Dependency Injection Container for the [Akka.NET](https://github.com/akkadotnet/akka.net) framework.
1212

13-
## What is it?
13+
## What Is It?
1414

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

20-
## How do you create an Extension?
20+
## How Do You Create an Extension?
2121

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

0 commit comments

Comments
 (0)