Skip to content

Commit d848864

Browse files
authored
Merge pull request #274 from datalust/dev
2023.1 Release
2 parents 38b9927 + 6f77c58 commit d848864

File tree

273 files changed

+8876
-8980
lines changed

Some content is hidden

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

273 files changed

+8876
-8980
lines changed

Build.Docker.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ $IsCIBuild = $null -ne $env:APPVEYOR_BUILD_NUMBER
22
$IsPublishedBuild = ($env:APPVEYOR_REPO_BRANCH -eq "main" -or $env:APPVEYOR_REPO_BRANCH -eq "dev") -and $null -eq $env:APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH
33

44
$version = @{ $true = $env:APPVEYOR_BUILD_VERSION; $false = "99.99.99" }[$env:APPVEYOR_BUILD_VERSION -ne $NULL];
5-
$framework = "net6.0"
5+
$framework = "net7.0"
66
$image = "datalust/seqcli"
77
$archs = @(
88
@{ rid = "x64"; platform = "linux/amd64" },
@@ -28,7 +28,7 @@ function Execute-Tests
2828
function Build-DockerImage($arch)
2929
{
3030
$rid = "linux-$($arch.rid)"
31-
& dotnet publish src/SeqCli/SeqCli.csproj -c Release -f $framework -r $rid --self-contained /p:VersionPrefix=$version
31+
& dotnet publish src/SeqCli/SeqCli.csproj -c Release -f $framework -r $rid --self-contained /p:VersionPrefix=$version /p:PublishSingleFile=true
3232
if($LASTEXITCODE -ne 0) { exit 2 }
3333

3434
& docker buildx build --platform "$($arch.platform)" -f dockerfiles/seqcli/$rid.Dockerfile -t "$image-ci:$version-$($arch.rid)" .

Build.ps1

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
$ErrorActionPreference = 'Stop'
22

3-
$framework = 'net6.0'
3+
$framework = 'net7.0'
44
$windowsTfmSuffix = '-windows'
55

66
function Clean-Output
@@ -14,7 +14,7 @@ function Restore-Packages
1414
if($LASTEXITCODE -ne 0) { throw "Build failed" }
1515
}
1616

17-
function Execute-Tests
17+
function Execute-Tests($version)
1818
{
1919
& dotnet test ./test/SeqCli.Tests/SeqCli.Tests.csproj -c Release /p:Configuration=Release /p:Platform=x64 /p:VersionPrefix=$version
2020
if($LASTEXITCODE -ne 0) { throw "Build failed" }
@@ -85,7 +85,7 @@ Create-ArtifactDir
8585
Restore-Packages
8686
Publish-Archives($version)
8787
Publish-DotNetTool($version)
88-
Execute-Tests
88+
Execute-Tests($version)
8989
Publish-Docs($version)
9090

9191
Pop-Location

README.md

Lines changed: 112 additions & 27 deletions
Large diffs are not rendered by default.

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: 2022.1.{build}
1+
version: 2023.1.{build}
22
skip_tags: true
33
image:
44
- Visual Studio 2022

dockerfiles/seqcli/linux-arm64.Dockerfile

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
1-
# based on: https://github.com/dotnet/dotnet-docker/blob/master/2.0/runtime-deps/jessie/amd64/Dockerfile
2-
3-
FROM --platform=linux/arm/v8 ubuntu:20.04
1+
FROM ubuntu:22.04
42

53
RUN apt-get update \
64
&& apt-get install -y --no-install-recommends \
75
ca-certificates \
86
libc6 \
97
libgcc1 \
108
libgssapi-krb5-2 \
11-
libicu66 \
12-
liblttng-ust0 \
13-
libssl1.1 \
9+
libicu70 \
10+
libssl3 \
1411
libstdc++6 \
1512
zlib1g \
16-
&& rm -rf /var/lib/apt/lists/*
13+
&& rm -rf /var/lib/apt/lists/*
1714

18-
COPY src/SeqCli/bin/Release/net6.0/linux-arm64/publish /bin/seqcli
15+
COPY src/SeqCli/bin/Release/net7.0/linux-arm64/publish /bin/seqcli
1916

2017
ENTRYPOINT ["/bin/seqcli/seqcli"]
2118

dockerfiles/seqcli/linux-x64.Dockerfile

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
1-
# based on: https://github.com/dotnet/dotnet-docker/blob/master/2.0/runtime-deps/jessie/amd64/Dockerfile
2-
3-
FROM --platform=linux/amd64 ubuntu:20.04
1+
FROM ubuntu:22.04
42

53
RUN apt-get update \
64
&& apt-get install -y --no-install-recommends \
75
ca-certificates \
86
libc6 \
97
libgcc1 \
108
libgssapi-krb5-2 \
11-
libicu66 \
12-
liblttng-ust0 \
13-
libssl1.1 \
9+
libicu70 \
10+
libssl3 \
1411
libstdc++6 \
1512
zlib1g \
16-
&& rm -rf /var/lib/apt/lists/*
13+
&& rm -rf /var/lib/apt/lists/*
1714

18-
COPY src/SeqCli/bin/Release/net6.0/linux-x64/publish /bin/seqcli
15+
COPY src/SeqCli/bin/Release/net7.0/linux-x64/publish /bin/seqcli
1916

2017
ENTRYPOINT ["/bin/seqcli/seqcli"]
2118

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"sdk": {
3-
"version": "6.0.402"
3+
"version": "7.0.102"
44
}
55
}

seqcli.sln

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ EndProject
4040
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "seqcli", "seqcli", "{7F7CAC3A-1046-4D2B-BF9F-F14525918295}"
4141
ProjectSection(SolutionItems) = preProject
4242
dockerfiles\seqcli\.gitignore = dockerfiles\seqcli\.gitignore
43-
dockerfiles\seqcli\Dockerfile = dockerfiles\seqcli\Dockerfile
44-
dockerfiles\seqcli\run.sh = dockerfiles\seqcli\run.sh
43+
dockerfiles\seqcli\linux-arm64.Dockerfile = dockerfiles\seqcli\linux-arm64.Dockerfile
44+
dockerfiles\seqcli\linux-x64.Dockerfile = dockerfiles\seqcli\linux-x64.Dockerfile
4545
EndProjectSection
4646
EndProject
4747
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Roastery", "src\Roastery\Roastery.csproj", "{D2CB1112-7CD3-4A1B-A114-25130C96295E}"

setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ chmod +x dotnet-install.sh
1414
./dotnet-install.sh --install-dir $HOME/.dotnetcli --no-path --version $RequiredDotnetVersion
1515
rm dotnet-install.sh
1616

17-
docker run --privileged --rm docker/binfmt:a7996909642ee92942dcd6cff44b9b95f08dad64
17+
docker run --privileged --rm linuxkit/binfmt:bebbae0c1100ebf7bf2ad4dfb9dfd719cf0ef132
1818
sudo service docker restart

src/Roastery/Agents/Agent.cs

Lines changed: 35 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -4,51 +4,50 @@
44
using System.Threading.Tasks;
55
using Roastery.Util;
66

7-
namespace Roastery.Agents
7+
namespace Roastery.Agents;
8+
9+
abstract class Agent
810
{
9-
abstract class Agent
10-
{
11-
protected delegate Task Behavior(CancellationToken cancellationToken);
11+
protected delegate Task Behavior(CancellationToken cancellationToken);
1212

13-
readonly int _meanBehaviorIntervalMilliseconds;
13+
readonly int _meanBehaviorIntervalMilliseconds;
1414

15-
protected Agent(int meanBehaviorIntervalMilliseconds)
16-
{
17-
_meanBehaviorIntervalMilliseconds = meanBehaviorIntervalMilliseconds;
18-
}
15+
protected Agent(int meanBehaviorIntervalMilliseconds)
16+
{
17+
_meanBehaviorIntervalMilliseconds = meanBehaviorIntervalMilliseconds;
18+
}
1919

20-
public static Task Run(Agent agent, CancellationToken cancellationToken)
21-
{
22-
return Task.Run(() => agent.RunBehaviorsAsync(cancellationToken), cancellationToken);
23-
}
20+
public static Task Run(Agent agent, CancellationToken cancellationToken)
21+
{
22+
return Task.Run(() => agent.RunBehaviorsAsync(cancellationToken), cancellationToken);
23+
}
2424

25-
async Task RunBehaviorsAsync(CancellationToken cancellationToken)
26-
{
27-
var behaviors = GetBehaviors().ToArray();
28-
if (behaviors.Length == 0)
29-
return;
25+
async Task RunBehaviorsAsync(CancellationToken cancellationToken)
26+
{
27+
var behaviors = GetBehaviors().ToArray();
28+
if (behaviors.Length == 0)
29+
return;
3030

31-
while (!cancellationToken.IsCancellationRequested)
32-
{
33-
var behavior = Distribution.Uniform(behaviors);
31+
while (!cancellationToken.IsCancellationRequested)
32+
{
33+
var behavior = Distribution.Uniform(behaviors);
3434

35-
await Task.Delay((int) Distribution.Uniform(0, _meanBehaviorIntervalMilliseconds), cancellationToken);
35+
await Task.Delay((int) Distribution.Uniform(0, _meanBehaviorIntervalMilliseconds), cancellationToken);
3636

37-
try
38-
{
39-
await behavior(cancellationToken);
40-
}
41-
catch
42-
{
43-
// Exceptions are swallowed here; agents can log exceptions if they wish
44-
}
37+
try
38+
{
39+
await behavior(cancellationToken);
40+
}
41+
catch
42+
{
43+
// Exceptions are swallowed here; agents can log exceptions if they wish
44+
}
4545

46-
await Task.Delay(_meanBehaviorIntervalMilliseconds / 2 +
47-
(int) (_meanBehaviorIntervalMilliseconds * Distribution.Uniform()), cancellationToken);
46+
await Task.Delay(_meanBehaviorIntervalMilliseconds / 2 +
47+
(int) (_meanBehaviorIntervalMilliseconds * Distribution.Uniform()), cancellationToken);
4848

49-
}
5049
}
51-
52-
protected abstract IEnumerable<Behavior> GetBehaviors();
5350
}
54-
}
51+
52+
protected abstract IEnumerable<Behavior> GetBehaviors();
53+
}

0 commit comments

Comments
 (0)