Skip to content

Commit 82ef693

Browse files
committed
chore: rollback sqlClient version;
1 parent 4e2e18b commit 82ef693

8 files changed

Lines changed: 39 additions & 39 deletions

File tree

src/ScanEventWorker/Domain/ParcelSummary.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public void ApplyScanEvent(ScanEvent scanEvent)
1515
{
1616
if (scanEvent.EventId <= LatestEventId)
1717
{
18-
return; // idempotent ignore older events
18+
return; // idempotent - ignore older events
1919
}
2020

2121
LatestEventId = scanEvent.EventId;

src/ScanEventWorker/Program.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
using var instanceMutex = new Mutex(initiallyOwned: true, name: "Global\\ScanEventWorker_Instance", out bool mutexAcquired);
1313
if (!mutexAcquired)
1414
{
15-
// Another instance is already running log to stderr and exit cleanly.
15+
// Another instance is already running - log to stderr and exit cleanly.
1616
Console.Error.WriteLine("FATAL: Another ScanEventWorker instance is already running. Exiting.");
1717
return 1;
1818
}
@@ -38,22 +38,22 @@
3838

3939
builder.Services.AddSingleton(scanOptions);
4040

41-
// Infrastructure Persistence
41+
// Infrastructure Persistence
4242
builder.Services.AddSingleton(sp =>
4343
new DatabaseInitialiser(connectionString, sp.GetRequiredService<ILogger<DatabaseInitialiser>>()));
4444
builder.Services.AddSingleton<IScanEventRepository>(sp =>
4545
new ScanEventRepository(
4646
connectionString,
4747
sp.GetRequiredService<ILogger<ScanEventRepository>>()));
4848

49-
// Infrastructure HTTP API Client with resilience
49+
// Infrastructure HTTP API Client with resilience
5050
builder.Services.AddHttpClient<IScanEventApiClient, ScanEventApiClient>(client =>
5151
{
5252
string baseUrl = scanOptions.BaseUrl ?? throw new InvalidOperationException("ScanEventApi:BaseUrl is required");
5353
client.BaseAddress = new Uri(baseUrl);
5454
}).AddStandardResilienceHandler();
5555

56-
// Infrastructure SQS
56+
// Infrastructure SQS
5757
builder.Services.AddSingleton<IAmazonSQS>(_ =>
5858
{
5959
string region = builder.Configuration["Aws:Region"] ?? "ap-southeast-2";

src/ScanEventWorker/ScanEventWorker.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<PackageReference Include="AWSSDK.SQS" Version="4.0.2.14" />
1818
<PackageReference Include="Dapper" Version="2.1.66" />
1919
<PackageReference Include="Dapper.AOT" Version="1.0.48" />
20-
<PackageReference Include="Microsoft.Data.SqlClient" Version="7.0.0-preview3.25342.7" />
20+
<PackageReference Include="Microsoft.Data.SqlClient" Version="7.0.0-preview2.25289.6" />
2121
<PackageReference Include="Microsoft.Extensions.Configuration.Binder"
2222
Version="11.0.0-preview.1.26104.118" />
2323
<PackageReference Include="Microsoft.Extensions.Hosting" Version="11.0.0-preview.1.26104.118" />

src/ScanEventWorker/Workers/ApiPollerWorker.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ protected override async Task ExecuteAsync(CancellationToken stoppingToken)
5353
if (events.Count > 1 && events.Zip(events.Skip(1)).Any(pair => pair.First.EventId.Value > pair.Second.EventId.Value))
5454
{
5555
logger.LogWarning(
56-
"API returned {Count} events out of EventId order sorting defensively",
56+
"API returned {Count} events out of EventId order - sorting defensively",
5757
events.Count);
5858
events = [.. events.OrderBy(e => e.EventId.Value)];
5959
}
@@ -63,7 +63,7 @@ protected override async Task ExecuteAsync(CancellationToken stoppingToken)
6363
if (staleCount > 0)
6464
{
6565
logger.LogWarning(
66-
"API returned {StaleCount} stale events with EventId < {FromId} possible FromEventId contract violation",
66+
"API returned {StaleCount} stale events with EventId < {FromId} - possible FromEventId contract violation",
6767
staleCount,
6868
lastEventId);
6969
}

src/ScanEventWorker/Workers/EventProcessorWorker.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ protected override async Task ExecuteAsync(CancellationToken stoppingToken)
3939
logger.LogWarning(
4040
"Failed to process EventId {EventId}: {Error}. Message will be redelivered by SQS",
4141
message.Body.EventId, result.Error);
42-
// Don't delete SQS redelivers after visibility timeout, then DLQ after maxReceiveCount
42+
// Don't delete- SQS redelivers after visibility timeout, then DLQ after maxReceiveCount
4343
}
4444
}
4545
}

src/ScanEventWorker/packages.lock.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@
2525
},
2626
"Microsoft.Data.SqlClient": {
2727
"type": "Direct",
28-
"requested": "[7.0.0-preview3.25342.7, )",
29-
"resolved": "7.0.0-preview3.25342.7",
30-
"contentHash": "/4yUz6qHpd/CSurpFCoxeo6y3dUgSRwHoGB7A+VHRT4knPCpSFGtru9lbukSR0DW2wdJKvCoBA3IxcIxWjcH4w==",
28+
"requested": "[7.0.0-preview2.25289.6, )",
29+
"resolved": "7.0.0-preview2.25289.6",
30+
"contentHash": "KhqVZcSlHqFSObRdXA2SF6EgTj0sLw8hwUCL2j1XvDo6dGT52fNUBUXhZGI7mRQYLB9DZoVjE5KO+Kurp+LVnQ==",
3131
"dependencies": {
3232
"Azure.Core": "1.49.0",
3333
"Azure.Identity": "1.16.0",
3434
"Microsoft.Bcl.Cryptography": "9.0.9",
3535
"Microsoft.Data.SqlClient.SNI.runtime": "6.0.2",
36-
"Microsoft.Extensions.Caching.Memory": "9.0.9",
36+
"Microsoft.Extensions.Caching.Memory": "9.0.5",
3737
"Microsoft.IdentityModel.JsonWebTokens": "8.14.0",
3838
"Microsoft.IdentityModel.Protocols.OpenIdConnect": "8.14.0",
3939
"Microsoft.SqlServer.Server": "1.0.0",
@@ -156,22 +156,22 @@
156156
},
157157
"Microsoft.Extensions.Caching.Abstractions": {
158158
"type": "Transitive",
159-
"resolved": "9.0.9",
160-
"contentHash": "NgtRHOdPrAEacfjXLSrH/SRrSqGf6Vaa6d16mW2yoyJdg7AJr0BnBvxkv7PkCm/CHVyzojTK7Y+oUDEulqY1Qw==",
159+
"resolved": "9.0.5",
160+
"contentHash": "RV6wOTvH5BeVRs6cvxFuaV1ut05Dklpvq19XRO1JxAayfLWYIEP7K94aamY0iSUhoehWk1X5H6gMcbZkHuBjew==",
161161
"dependencies": {
162-
"Microsoft.Extensions.Primitives": "9.0.9"
162+
"Microsoft.Extensions.Primitives": "9.0.5"
163163
}
164164
},
165165
"Microsoft.Extensions.Caching.Memory": {
166166
"type": "Transitive",
167-
"resolved": "9.0.9",
168-
"contentHash": "ln31BtsDsBQxykJgxuCtiUXWRET9FmqeEq0BpPIghkYtGpDDVs8ZcLHAjCCzbw6aGoLek4Z7JaDjSO/CjOD0iw==",
167+
"resolved": "9.0.5",
168+
"contentHash": "qDmoAzIUBup5KZG1Abv51ifbHMCWFnaXbt05l+Sd92mLOpF9OwHOuoxu3XhzXaPGfq0Ns3pv1df5l8zuKjFgGw==",
169169
"dependencies": {
170-
"Microsoft.Extensions.Caching.Abstractions": "9.0.9",
171-
"Microsoft.Extensions.DependencyInjection.Abstractions": "9.0.9",
172-
"Microsoft.Extensions.Logging.Abstractions": "9.0.9",
173-
"Microsoft.Extensions.Options": "9.0.9",
174-
"Microsoft.Extensions.Primitives": "9.0.9"
170+
"Microsoft.Extensions.Caching.Abstractions": "9.0.5",
171+
"Microsoft.Extensions.DependencyInjection.Abstractions": "9.0.5",
172+
"Microsoft.Extensions.Logging.Abstractions": "9.0.5",
173+
"Microsoft.Extensions.Options": "9.0.5",
174+
"Microsoft.Extensions.Primitives": "9.0.5"
175175
}
176176
},
177177
"Microsoft.Extensions.Compliance.Abstractions": {

tests/ScanEventWorker.Tests/Workers/ApiPollerWorkerTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ public async Task WhenApiReturnsOutOfOrderEvents_SortsDefensivelyAndAdvancesCorr
233233
await worker.ExecuteTask!;
234234
await worker.StopAsync(CancellationToken.None);
235235

236-
// After sort [5, 10], events[^1] is EventId=10 the correct max
236+
// After sort [5, 10], events[^1] is EventId=10- the correct max
237237
await _repository.Received(1).UpdateLastEventIdAsync(10L, Arg.Any<CancellationToken>());
238238
}
239239

@@ -259,7 +259,7 @@ public async Task WhenApiReturnsStaleEvents_ContinuesProcessingNormally()
259259
await worker.ExecuteTask!;
260260
await worker.StopAsync(CancellationToken.None);
261261

262-
// Stale events are processed normally idempotent MERGE handles dedup.
262+
// Stale events are processed normally - idempotent MERGE handles dedup.
263263
// lastEventId must not regress: advance marker stays at 20, not events[^1]=10.
264264
await _repository.Received(1).UpdateLastEventIdAsync(20L, Arg.Any<CancellationToken>());
265265
await _queue.Received(2).SendAsync(Arg.Any<ScanEvent>(), Arg.Any<CancellationToken>());

tests/ScanEventWorker.Tests/packages.lock.json

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,14 @@
112112
},
113113
"Microsoft.Data.SqlClient": {
114114
"type": "Transitive",
115-
"resolved": "7.0.0-preview3.25342.7",
116-
"contentHash": "/4yUz6qHpd/CSurpFCoxeo6y3dUgSRwHoGB7A+VHRT4knPCpSFGtru9lbukSR0DW2wdJKvCoBA3IxcIxWjcH4w==",
115+
"resolved": "7.0.0-preview2.25289.6",
116+
"contentHash": "KhqVZcSlHqFSObRdXA2SF6EgTj0sLw8hwUCL2j1XvDo6dGT52fNUBUXhZGI7mRQYLB9DZoVjE5KO+Kurp+LVnQ==",
117117
"dependencies": {
118118
"Azure.Core": "1.49.0",
119119
"Azure.Identity": "1.16.0",
120120
"Microsoft.Bcl.Cryptography": "9.0.9",
121121
"Microsoft.Data.SqlClient.SNI.runtime": "6.0.2",
122-
"Microsoft.Extensions.Caching.Memory": "9.0.9",
122+
"Microsoft.Extensions.Caching.Memory": "9.0.5",
123123
"Microsoft.IdentityModel.JsonWebTokens": "8.14.0",
124124
"Microsoft.IdentityModel.Protocols.OpenIdConnect": "8.14.0",
125125
"Microsoft.SqlServer.Server": "1.0.0",
@@ -144,22 +144,22 @@
144144
},
145145
"Microsoft.Extensions.Caching.Abstractions": {
146146
"type": "Transitive",
147-
"resolved": "9.0.9",
148-
"contentHash": "NgtRHOdPrAEacfjXLSrH/SRrSqGf6Vaa6d16mW2yoyJdg7AJr0BnBvxkv7PkCm/CHVyzojTK7Y+oUDEulqY1Qw==",
147+
"resolved": "9.0.5",
148+
"contentHash": "RV6wOTvH5BeVRs6cvxFuaV1ut05Dklpvq19XRO1JxAayfLWYIEP7K94aamY0iSUhoehWk1X5H6gMcbZkHuBjew==",
149149
"dependencies": {
150-
"Microsoft.Extensions.Primitives": "9.0.9"
150+
"Microsoft.Extensions.Primitives": "9.0.5"
151151
}
152152
},
153153
"Microsoft.Extensions.Caching.Memory": {
154154
"type": "Transitive",
155-
"resolved": "9.0.9",
156-
"contentHash": "ln31BtsDsBQxykJgxuCtiUXWRET9FmqeEq0BpPIghkYtGpDDVs8ZcLHAjCCzbw6aGoLek4Z7JaDjSO/CjOD0iw==",
155+
"resolved": "9.0.5",
156+
"contentHash": "qDmoAzIUBup5KZG1Abv51ifbHMCWFnaXbt05l+Sd92mLOpF9OwHOuoxu3XhzXaPGfq0Ns3pv1df5l8zuKjFgGw==",
157157
"dependencies": {
158-
"Microsoft.Extensions.Caching.Abstractions": "9.0.9",
159-
"Microsoft.Extensions.DependencyInjection.Abstractions": "9.0.9",
160-
"Microsoft.Extensions.Logging.Abstractions": "9.0.9",
161-
"Microsoft.Extensions.Options": "9.0.9",
162-
"Microsoft.Extensions.Primitives": "9.0.9"
158+
"Microsoft.Extensions.Caching.Abstractions": "9.0.5",
159+
"Microsoft.Extensions.DependencyInjection.Abstractions": "9.0.5",
160+
"Microsoft.Extensions.Logging.Abstractions": "9.0.5",
161+
"Microsoft.Extensions.Options": "9.0.5",
162+
"Microsoft.Extensions.Primitives": "9.0.5"
163163
}
164164
},
165165
"Microsoft.Extensions.Compliance.Abstractions": {
@@ -778,7 +778,7 @@
778778
"AWSSDK.SQS": "[4.0.2.14, )",
779779
"Dapper": "[2.1.66, )",
780780
"Dapper.AOT": "[1.0.48, )",
781-
"Microsoft.Data.SqlClient": "[7.0.0-preview3.25342.7, )",
781+
"Microsoft.Data.SqlClient": "[7.0.0-preview2.25289.6, )",
782782
"Microsoft.Extensions.Configuration.Binder": "[11.0.0-preview.1.26104.118, )",
783783
"Microsoft.Extensions.Hosting": "[11.0.0-preview.1.26104.118, )",
784784
"Microsoft.Extensions.Http.Resilience": "[10.3.0, )"

0 commit comments

Comments
 (0)