Skip to content

Commit 11a4a0f

Browse files
authored
Merge pull request #312 from datalust/dev
2024.1 Release
2 parents 629f673 + c47f7c5 commit 11a4a0f

File tree

85 files changed

+1197
-496
lines changed

Some content is hidden

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

85 files changed

+1197
-496
lines changed

Build.Docker.ps1

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,23 @@ $IsCIBuild = $null -ne $env:APPVEYOR_BUILD_NUMBER
66
$IsPublishedBuild = ($env:APPVEYOR_REPO_BRANCH -eq "main" -or $env:APPVEYOR_REPO_BRANCH -eq "dev") -and $null -eq $env:APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH
77

88
$version = Get-SemVer(@{ $true = $env:APPVEYOR_BUILD_VERSION; $false = "99.99.99" }[$env:APPVEYOR_BUILD_VERSION -ne $NULL])
9-
$framework = "net7.0"
9+
$framework = "net8.0"
1010
$image = "datalust/seqcli"
1111
$archs = @(
1212
@{ rid = "x64"; platform = "linux/amd64" },
1313
@{ rid = "arm64"; platform = "linux/arm64/v8" }
1414
)
1515

16+
$endToEndVersion = "preview"
17+
1618
function Execute-Tests
1719
{
1820
& dotnet test ./test/SeqCli.Tests/SeqCli.Tests.csproj -c Release -f $framework /p:Configuration=Release /p:VersionPrefix=$version
1921
if ($LASTEXITCODE -ne 0) { exit 1 }
2022

2123
cd ./test/SeqCli.EndToEnd/
22-
docker pull datalust/seq:latest
24+
docker pull "datalust/seq:$endToEndVersion"
25+
docker tag "datalust/seq:$endToEndVersion" datalust/seq:latest
2326
& dotnet run -f $framework -- --docker-server
2427
if ($LASTEXITCODE -ne 0)
2528
{

Build.ps1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Push-Location $PSScriptRoot
55
$ErrorActionPreference = 'Stop'
66

77
$version = Get-SemVer(@{ $true = $env:APPVEYOR_BUILD_VERSION; $false = "99.99.99" }[$env:APPVEYOR_BUILD_VERSION -ne $NULL])
8-
$framework = 'net7.0'
8+
$framework = 'net8.0'
99
$windowsTfmSuffix = '-windows'
1010

1111
function Clean-Output
@@ -86,7 +86,8 @@ Clean-Output
8686
Create-ArtifactDir
8787
Restore-Packages
8888
Publish-Archives($version)
89-
Publish-DotNetTool($version)
89+
# Temporarily disabled while SerilogTracing is in pre-release
90+
# Publish-DotNetTool($version)
9091
Execute-Tests($version)
9192
Publish-Docs($version)
9293

README.md

Lines changed: 174 additions & 38 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: 2023.4.{build}
1+
version: 2024.1.{build}
22
skip_tags: true
33
image:
44
- Visual Studio 2022

dockerfiles/seqcli/linux-arm64.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ RUN apt-get update \
1212
zlib1g \
1313
&& rm -rf /var/lib/apt/lists/*
1414

15-
COPY src/SeqCli/bin/Release/net7.0/linux-arm64/publish /bin/seqcli
15+
COPY src/SeqCli/bin/Release/net8.0/linux-arm64/publish /bin/seqcli
1616

1717
ENTRYPOINT ["/bin/seqcli/seqcli"]
1818

dockerfiles/seqcli/linux-x64.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ RUN apt-get update \
1212
zlib1g \
1313
&& rm -rf /var/lib/apt/lists/*
1414

15-
COPY src/SeqCli/bin/Release/net7.0/linux-x64/publish /bin/seqcli
15+
COPY src/SeqCli/bin/Release/net8.0/linux-x64/publish /bin/seqcli
1616

1717
ENTRYPOINT ["/bin/seqcli/seqcli"]
1818

global.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"sdk": {
3-
"version": "7.0.400"
3+
"version": "8.0.101"
44
}
5-
}
5+
}

src/Roastery/Data/Database.cs

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
using System.Threading.Tasks;
88
using Roastery.Util;
99
using Serilog;
10+
using Serilog.Events;
11+
using SerilogTracing;
12+
using SerilogTracing.Instrumentation;
1013

1114
namespace Roastery.Data;
1215

@@ -134,17 +137,23 @@ static string AsSqlLiteral(object? o)
134137

135138
async Task LogExecAsync(string sql, int rowCount)
136139
{
140+
using var activity = _logger.StartActivity("Execution of {Sql}", sql);
141+
137142
if (Distribution.OnceIn(200))
138143
{
139-
throw new OperationCanceledException(
144+
var exception = new OperationCanceledException(
140145
"A deadlock was detected and the transaction chosen as the deadlock victim.");
141-
}
142146

143-
var sw = Stopwatch.StartNew();
147+
activity.Complete(LogEventLevel.Error, exception);
148+
149+
throw exception;
150+
}
151+
152+
144153
var delay = 10 + (int)(Distribution.Uniform() * Math.Pow(rowCount, 1.6));
145154
await Task.Delay(delay);
146-
_logger.Debug("Execution of {Sql} affected {RowCount} rows in {Elapsed:0.000} ms",
147-
sql, rowCount, sw.Elapsed.TotalMilliseconds);
155+
156+
activity.AddProperty("RowCount", rowCount);
148157
}
149158

150159
static T Clone<T>(T value) where T: IIdentifiable, new()

src/Roastery/Program.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public static async Task Main(ILogger logger, CancellationToken cancellationToke
2121

2222
var database = new Database(webApplicationLogger, "roastery");
2323
DatabaseMigrator.Populate(database);
24-
24+
2525
var client = new HttpClient(
2626
"https://roastery.datalust.co",
2727
new NetworkLatencyMiddleware(
@@ -35,13 +35,13 @@ public static async Task Main(ILogger logger, CancellationToken cancellationToke
3535
}, webApplicationLogger))))));
3636

3737
var agents = new List<Agent>();
38-
38+
3939
for (var i = 0; i < 100; ++i)
4040
agents.Add(new Customer(client, Person.Generate(), (int)Distribution.Uniform(60000, 180000)));
41-
41+
4242
for (var i = 0; i < 3; ++i)
4343
agents.Add(new WarehouseStaff(client));
44-
44+
4545
var batchApplicationLogger = logger.ForContext("Application", "Roastery Batch Processing");
4646
agents.Add(new CatalogBatch(client, batchApplicationLogger));
4747
agents.Add(new ArchivingBatch(client, batchApplicationLogger));

src/Roastery/Roastery.csproj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net7.0</TargetFramework>
4+
<TargetFramework>net8.0</TargetFramework>
55
<Nullable>enable</Nullable>
66
</PropertyGroup>
7-
7+
88
<ItemGroup>
9-
<PackageReference Include="Serilog" Version="3.0.1" />
9+
<PackageReference Include="Serilog" Version="3.1.1" />
10+
<PackageReference Include="SerilogTracing" Version="1.0.0-dev-00088" />
1011
</ItemGroup>
1112

1213
</Project>

0 commit comments

Comments
 (0)