Skip to content

Commit 6583cd1

Browse files
committed
Merge branch 'master' of https://github.com/Particular/ServiceControl into rhys-sql-testing
2 parents 5f8aea6 + edcc40a commit 6583cd1

44 files changed

Lines changed: 287 additions & 358 deletions

File tree

Some content is hidden

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

.github/workflows/build-containers.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ jobs:
3232
shell: pwsh
3333
run: exit $(If ($env:SECRETS_AVAILABLE -eq 'true') { 0 } Else { 1 })
3434
- name: Checkout
35-
uses: actions/checkout@v7.0.0
35+
uses: actions/checkout@v7.0.1
3636
with:
3737
fetch-depth: 0
3838
- name: Setup .NET SDK
39-
uses: actions/setup-dotnet@v5.4.0
39+
uses: actions/setup-dotnet@v6.0.0
4040
with:
4141
global-json-file: global.json
4242
- name: Run MinVer

.github/workflows/build-db-container.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ jobs:
1616
shell: pwsh
1717
run: exit $(If ($env:SECRETS_AVAILABLE -eq 'true') { 0 } Else { 1 })
1818
- name: Checkout
19-
uses: actions/checkout@v7.0.0
19+
uses: actions/checkout@v7.0.1
2020
with:
2121
fetch-depth: 0
2222
- name: Setup .NET SDK
23-
uses: actions/setup-dotnet@v5.4.0
23+
uses: actions/setup-dotnet@v6.0.0
2424
with:
2525
global-json-file: global.json
2626
- name: Run MinVer

.github/workflows/build-windows.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ jobs:
1212
SECRETS_AVAILABLE: ${{ secrets.SECRETS_AVAILABLE }}
1313
run: exit $(If ($env:SECRETS_AVAILABLE -eq 'true') { 0 } Else { 1 })
1414
- name: Checkout
15-
uses: actions/checkout@v7.0.0
15+
uses: actions/checkout@v7.0.1
1616
with:
1717
fetch-depth: 0
1818
- name: Setup .NET SDK
19-
uses: actions/setup-dotnet@v5.4.0
19+
uses: actions/setup-dotnet@v6.0.0
2020
with:
2121
global-json-file: global.json
2222
- name: Download RavenDB Server

.github/workflows/ci.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ jobs:
3636
SECRETS_AVAILABLE: ${{ secrets.SECRETS_AVAILABLE }}
3737
run: exit $(If ($env:SECRETS_AVAILABLE -eq 'true') { 0 } Else { 1 })
3838
- name: Checkout
39-
uses: actions/checkout@v7.0.0
39+
uses: actions/checkout@v7.0.1
4040
with:
4141
fetch-depth: 0
4242
- name: Setup .NET SDK
43-
uses: actions/setup-dotnet@v5.4.0
43+
uses: actions/setup-dotnet@v6.0.0
4444
with:
4545
global-json-file: global.json
4646
- name: Download RavenDB Server
@@ -64,6 +64,23 @@ jobs:
6464
- name: Smoke test PowerShell module import
6565
if: matrix.os-name == 'Windows'
6666
run: Import-Module ./deploy/PowerShellModules/Particular.ServiceControl.Management
67+
68+
# there is an issue with az cli and python 3.14, so for now we need to pin it
69+
# once the issue is resolved it should be able to be re-floated
70+
# https://github.com/Azure/azure-cli/issues/32980
71+
- name: Set Python 3.13 (Linux)
72+
if: matrix.os-name == 'Linux' && matrix.test-category == 'AzureServiceBus'
73+
uses: actions/setup-python@v5
74+
with:
75+
python-version: '3.13'
76+
- name: Install pinned Azure CLI on Python 3.13 (Linux)
77+
if: matrix.os-name == 'Linux' && matrix.test-category == 'AzureServiceBus'
78+
shell: bash
79+
run: |
80+
python -m pip install --upgrade pip
81+
python -m pip install --user "azure-cli==2.64.0"
82+
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
83+
6784
- name: Azure login
6885
uses: azure/login@v3.0.0
6986
if: matrix.test-category == 'AzureServiceBus' || matrix.test-category == 'AzureStorageQueues' || matrix.test-category == 'RabbitMQ' || matrix.test-category == 'PostgreSQL'
@@ -92,7 +109,7 @@ jobs:
92109
registry-username: ${{ secrets.DOCKERHUB_USERNAME }}
93110
registry-password: ${{ secrets.DOCKERHUB_TOKEN }}
94111
- name: Setup Azure Service Bus
95-
uses: Particular/setup-azureservicebus-action@v2.3.0
112+
uses: Particular/setup-azureservicebus-action@v2.5.0
96113
if: matrix.test-category == 'AzureServiceBus'
97114
with:
98115
connection-string-name: ServiceControl_TransportTests_ASBS_ConnectionString

.github/workflows/container-integration-test.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,30 @@ jobs:
5050
shell: pwsh
5151
run: exit $(If ($env:SECRETS_AVAILABLE -eq 'true') { 0 } Else { 1 })
5252
- name: Checkout
53-
uses: actions/checkout@v7.0.0
53+
uses: actions/checkout@v7.0.1
5454
with:
5555
fetch-depth: 0
5656
- name: Setup .NET SDK
57-
uses: actions/setup-dotnet@v5.4.0
57+
uses: actions/setup-dotnet@v6.0.0
5858
with:
5959
global-json-file: global.json
60+
61+
# there is an issue with az cli and python 3.14, so for now we need to pin it
62+
# once the issue is resolved it should be able to be re-floated
63+
# https://github.com/Azure/azure-cli/issues/32980
64+
- name: Set Python 3.13 (Linux)
65+
if: matrix.name == 'asb'
66+
uses: actions/setup-python@v5
67+
with:
68+
python-version: '3.13'
69+
- name: Install pinned Azure CLI on Python 3.13 (Linux)
70+
if: matrix.name == 'asb'
71+
shell: bash
72+
run: |
73+
python -m pip install --upgrade pip
74+
python -m pip install --user "azure-cli==2.64.0"
75+
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
76+
6077
- name: Run MinVer
6178
uses: Particular/run-minver-action@v1.0.0
6279
- name: Log in to GitHub container registry
@@ -77,7 +94,7 @@ jobs:
7794
creds: ${{ secrets.AZURE_ACI_CREDENTIALS }}
7895
- name: Setup Azure Service Bus
7996
if: ${{ matrix.name == 'asb' }}
80-
uses: Particular/setup-azureservicebus-action@v2.3.0
97+
uses: Particular/setup-azureservicebus-action@v2.5.0
8198
with:
8299
connection-string-name: CONNECTIONSTRING
83100
azure-credentials: ${{ secrets.AZURE_ACI_CREDENTIALS }}

.github/workflows/push-container-images.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
shell: pwsh
1616
steps:
1717
- name: Checkout
18-
uses: actions/checkout@v7.0.0
18+
uses: actions/checkout@v7.0.1
1919
- name: Validate build version
2020
id: validate
2121
uses: ./.github/actions/validate-version

src/ServiceControl.Audit.Persistence.InMemory/InMemoryAuditDataStore.cs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,11 @@
99
using ServiceControl.Audit.Auditing.BodyStorage;
1010
using ServiceControl.Audit.Auditing.MessagesView;
1111
using ServiceControl.Audit.Infrastructure;
12-
using ServiceControl.Audit.Monitoring;
13-
using ServiceControl.Audit.Persistence.Infrastructure;
14-
using ServiceControl.Audit.Persistence.Monitoring;
1512
using ServiceControl.SagaAudit;
1613

1714
class InMemoryAuditDataStore : IAuditDataStore
1815
{
1916
IBodyStorage bodyStorage;
20-
public List<KnownEndpoint> knownEndpoints;
2117
public List<FailedAuditImport> failedAuditImports;
2218

2319
public InMemoryAuditDataStore(IBodyStorage bodyStorage)
@@ -26,7 +22,6 @@ public InMemoryAuditDataStore(IBodyStorage bodyStorage)
2622
sagaHistories = [];
2723
messageViews = [];
2824
processedMessages = [];
29-
knownEndpoints = [];
3025
failedAuditImports = [];
3126
}
3227

@@ -176,25 +171,6 @@ Task<MessageBodyView> GetMessageBodyFromMetadata(string messageId)
176171
return Task.FromResult(MessageBodyView.FromString(body, contentType, bodySize, string.Empty));
177172
}
178173

179-
public async Task<QueryResult<IList<KnownEndpointsView>>> QueryKnownEndpoints(CancellationToken cancellationToken)
180-
{
181-
var knownEndpointsView = knownEndpoints
182-
.Select(x => new KnownEndpointsView
183-
{
184-
Id = DeterministicGuid.MakeId(x.Name, x.HostId.ToString()),
185-
EndpointDetails = new EndpointDetails
186-
{
187-
Host = x.Host,
188-
HostId = x.HostId,
189-
Name = x.Name
190-
},
191-
HostDisplayName = x.Host
192-
})
193-
.ToList();
194-
195-
return await Task.FromResult(new QueryResult<IList<KnownEndpointsView>>(knownEndpointsView, new QueryStatsInfo(string.Empty, knownEndpointsView.Count)));
196-
}
197-
198174
public Task<QueryResult<IList<AuditCount>>> QueryAuditCounts(string endpointName, CancellationToken cancellationToken)
199175
{
200176
var results = messageViews

src/ServiceControl.Audit.Persistence.InMemory/InMemoryAuditIngestionUnitOfWork.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
using System.Threading.Tasks;
66
using Auditing.BodyStorage;
77
using ServiceControl.Audit.Auditing;
8-
using ServiceControl.Audit.Persistence.Monitoring;
98
using ServiceControl.Audit.Persistence.UnitOfWork;
109
using ServiceControl.SagaAudit;
1110

@@ -16,12 +15,6 @@ class InMemoryAuditIngestionUnitOfWork(
1615
{
1716
public ValueTask DisposeAsync() => ValueTask.CompletedTask;
1817

19-
public Task RecordKnownEndpoint(KnownEndpoint knownEndpoint, CancellationToken cancellationToken)
20-
{
21-
dataStore.knownEndpoints.Add(knownEndpoint);
22-
return Task.CompletedTask;
23-
}
24-
2518
public async Task RecordProcessedMessage(ProcessedMessage processedMessage, ReadOnlyMemory<byte> body, CancellationToken cancellationToken)
2619
{
2720
if (!body.IsEmpty)

src/ServiceControl.Audit.Persistence.RavenDB/RavenAuditDataStore.cs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,9 @@
88
using Auditing.MessagesView;
99
using Extensions;
1010
using Indexes;
11-
using Monitoring;
1211
using Raven.Client.Documents;
1312
using ServiceControl.Audit.Auditing;
1413
using ServiceControl.Audit.Infrastructure;
15-
using ServiceControl.Audit.Monitoring;
16-
using ServiceControl.Audit.Persistence.Infrastructure;
1714
using ServiceControl.SagaAudit;
1815
using Transformers;
1916

@@ -125,27 +122,6 @@ public async Task<MessageBodyView> GetMessageBody(string messageId, Cancellation
125122
);
126123
}
127124

128-
public async Task<QueryResult<IList<KnownEndpointsView>>> QueryKnownEndpoints(CancellationToken cancellationToken)
129-
{
130-
using var session = await sessionProvider.OpenSession(cancellationToken: cancellationToken);
131-
var endpoints = await session.Advanced.LoadStartingWithAsync<KnownEndpoint>(KnownEndpoint.CollectionName, pageSize: 1024, token: cancellationToken);
132-
133-
var knownEndpoints = endpoints
134-
.Select(x => new KnownEndpointsView
135-
{
136-
Id = DeterministicGuid.MakeId(x.Name, x.HostId.ToString()),
137-
EndpointDetails = new EndpointDetails
138-
{
139-
Host = x.Host,
140-
HostId = x.HostId,
141-
Name = x.Name
142-
},
143-
HostDisplayName = x.Host
144-
})
145-
.ToList();
146-
147-
return new QueryResult<IList<KnownEndpointsView>>(knownEndpoints, new QueryStatsInfo(string.Empty, knownEndpoints.Count));
148-
}
149125

150126
public async Task<QueryResult<IList<AuditCount>>> QueryAuditCounts(string endpointName, CancellationToken cancellationToken)
151127
{

src/ServiceControl.Audit.Persistence.RavenDB/UnitOfWork/RavenAuditIngestionUnitOfWork.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
using System.Threading.Tasks;
77
using Auditing;
88
using Auditing.BodyStorage;
9-
using Monitoring;
109
using NServiceBus;
1110
using Persistence.UnitOfWork;
1211
using Raven.Client;
@@ -50,9 +49,6 @@ MetadataAsDictionary GetExpirationMetadata() =>
5049
public Task RecordSagaSnapshot(SagaSnapshot sagaSnapshot, CancellationToken cancellationToken)
5150
=> bulkInsert.StoreAsync(sagaSnapshot, GetExpirationMetadata());
5251

53-
public Task RecordKnownEndpoint(KnownEndpoint knownEndpoint, CancellationToken cancellationToken)
54-
=> bulkInsert.StoreAsync(knownEndpoint, GetExpirationMetadata());
55-
5652
public async ValueTask DisposeAsync()
5753
{
5854
await bulkInsert.DisposeAsync();

0 commit comments

Comments
 (0)