Skip to content

Commit 9135fee

Browse files
authored
Merge branch 'master' into dependabot/nuget/src/Azure.Identity-1.13.1
2 parents 28eea73 + cb3692f commit 9135fee

38 files changed

+213
-117
lines changed

.github/workflows/build-windows.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@ jobs:
1515
with:
1616
fetch-depth: 0
1717
- name: Setup .NET SDK
18-
uses: actions/setup-dotnet@v4.0.1
18+
uses: actions/setup-dotnet@v4.1.0
1919
with:
2020
dotnet-version: 8.0.x
21+
- name: dotnet info
22+
run: dotnet --info
2123
- name: Download RavenDB Server
2224
shell: pwsh
2325
run: ./tools/download-ravendb-server.ps1

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
with:
3737
fetch-depth: 0
3838
- name: Setup .NET SDK
39-
uses: actions/setup-dotnet@v4.0.1
39+
uses: actions/setup-dotnet@v4.1.0
4040
with:
4141
dotnet-version: 8.0.x
4242
- name: Download RavenDB Server
@@ -75,7 +75,7 @@ jobs:
7575
connection-string-env-var: ServiceControl_TransportTests_SQL_ConnectionString
7676
catalog: nservicebus
7777
- name: Setup PostgreSQL
78-
uses: Particular/[email protected].0
78+
uses: Particular/[email protected].1
7979
if: matrix.test-category == 'PostgreSQL'
8080
with:
8181
connection-string-name: ServiceControl_TransportTests_PostgreSQL_ConnectionString

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
expected-healthy-containers: 4
3838
- name: sqs
3939
transport: AmazonSQS
40-
connection-string: 'AccessKeyId=demo;SecretAccessKey=demo;Region=us-east-1'
40+
# No connection-string - should be able to load AWS info only from environment variables
4141
compose-cmd: docker compose -f servicecontrol.yml -f sqs.yml up -d
4242
expected-healthy-containers: 5
4343
env:
@@ -127,4 +127,4 @@ jobs:
127127
echo "Found $numHealthy healthy containers out of ${{matrix.expected-healthy-containers}} expected"
128128
if ($numHealthy -ne ${{matrix.expected-healthy-containers}}) {
129129
exit 1
130-
}
130+
}

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ A video demo showing how to set it up is available on the Particular YouTube cha
2020

2121
All containers are [created on each build and pushed](.github/workflows/push-container-images.yml) to the [GitHub container registry](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry) where the various instance type can be [accessed by their names](/.github/workflows/push-container-images.yml#L33) and run locally.
2222

23+
It's also possible to [locally test containers built from PRs in GitHub Container Registry](/docs/testing.md#container-tests)
24+
2325
### Infrastructure setup
2426

2527
If the instance is executed for the first time, it must set up the required infrastructure. To do so, once the instance is configured to use the selected transport and persister, run it in setup mode. This can be done by using the `Setup {instance name}` launch profile that is defined in

docs/test-ghcr-tag/.env

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Use `pr-####` or full alpha version such as `6.1.0-alpha.0.8`
2+
SERVICECONTROL_TAG=pr-4575
3+
4+
# ServicePulse image is pulled from Docker Hub
5+
SERVICEPULSE_TAG=latest
6+
7+
# RabbitMQ configuration
8+
TRANSPORTTYPE=RabbitMQ.QuorumConventionalRouting
9+
CONNECTIONSTRING="host=rabbitmq;username=guest;password=guest"
10+
11+
# Will load your local license if found in your environment variables
12+
PARTICULARSOFTWARE_LICENSE="$PARTICULARSOFTWARE_LICENSE"

docs/test-ghcr-tag/compose.yml

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# Important changes here due to new ServiceControl development should also be made in the following locations:
2+
# * /src/container-integration-test
3+
# * https://github.com/Particular/PlatformContainerExamples/tree/main/docker-compose
4+
# * https://github.com/ParticularLabs/AwsLoanBrokerSample/blob/main/docker-compose.yml
5+
6+
name: servicecontrol-pr
7+
8+
services:
9+
servicecontrol:
10+
image: ghcr.io/particular/servicecontrol:${SERVICECONTROL_TAG}
11+
env_file: .env
12+
ports:
13+
- "33333:33333"
14+
environment:
15+
RAVENDB_CONNECTIONSTRING: http://servicecontrol-db:8080
16+
REMOTEINSTANCES: '[{"api_uri":"http://servicecontrol-audit:44444/api"}]'
17+
command: --setup-and-run
18+
restart: unless-stopped
19+
depends_on:
20+
servicecontrol-db:
21+
condition: service_healthy
22+
rabbitmq:
23+
condition: service_healthy
24+
25+
servicecontrol-db:
26+
image: ghcr.io/particular/servicecontrol-ravendb:${SERVICECONTROL_TAG}
27+
ports:
28+
- "8080:8080"
29+
volumes:
30+
- db-config:/etc/ravendb
31+
- db-data:/var/lib/ravendb/data
32+
33+
servicecontrol-audit:
34+
image: ghcr.io/particular/servicecontrol-audit:${SERVICECONTROL_TAG}
35+
env_file: .env
36+
ports:
37+
- "44444:44444"
38+
environment:
39+
RAVENDB_CONNECTIONSTRING: http://servicecontrol-db:8080
40+
command: --setup-and-run
41+
restart: unless-stopped
42+
depends_on:
43+
servicecontrol-db:
44+
condition: service_healthy
45+
rabbitmq:
46+
condition: service_healthy
47+
48+
servicecontrol-monitoring:
49+
image: ghcr.io/particular/servicecontrol-monitoring:${SERVICECONTROL_TAG}
50+
env_file: .env
51+
restart: unless-stopped
52+
command: --setup-and-run
53+
ports:
54+
- "33633:33633"
55+
depends_on:
56+
rabbitmq:
57+
condition: service_healthy
58+
59+
servicepulse:
60+
image: particular/servicepulse:${SERVICEPULSE_TAG}
61+
ports:
62+
- "9090:9090"
63+
environment:
64+
SERVICECONTROL_URL: http://servicecontrol:33333
65+
MONITORING_URL: http://servicecontrol-monitoring:33633
66+
restart: unless-stopped
67+
depends_on:
68+
servicecontrol:
69+
condition: service_healthy
70+
servicecontrol-monitoring:
71+
condition: service_healthy
72+
rabbitmq:
73+
condition: service_healthy
74+
75+
rabbitmq:
76+
image: rabbitmq:3-management
77+
ports:
78+
- "5672:5672"
79+
- "15672:15672"
80+
restart: unless-stopped
81+
healthcheck:
82+
test: rabbitmq-diagnostics check_port_connectivity
83+
interval: 30s
84+
timeout: 10s
85+
start_period: 30s
86+
start_interval: 10s
87+
retries: 3
88+
volumes:
89+
- rabbitmq-data:/var/lib/rabbitmq
90+
91+
volumes:
92+
rabbitmq-data:
93+
db-config:
94+
db-data:

docs/testing.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,18 @@ Multi-instance tests validate the interaction between different ServiceControl i
3939
## Container tests
4040

4141
Containers images generated for all builds are pushed to the [GitHub container registry](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry). Once pushed all images are tested by [spinning them all up for each supported transport](/src/container-integration-test/).
42+
43+
Containers built by a PR and stored on GitHub Container Registry can be tested locally:
44+
45+
1. [Authenticate to the GitHub Container Registry using a personal access token](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry#authenticating-with-a-personal-access-token-classic).
46+
2. In the terminal, navigate to []`/docs/test-ghcr-tag`](/docs/test/ghcr-tag).
47+
3. Edit the [`.env` file](/docs/test-ghcr-tag/.env) to specify the PR-based tag (in the form `pr-####`) to test.
48+
4. Run `docker compose up -d`.
49+
5. Services will be avialable at the following URLs:
50+
* [RabbitMQ Management](http://localhost:15672) (Login: `guest`/`guest`)
51+
* [RavenDB](http://localhost:8080)
52+
* [ServiceControl API](http://localhost:33333/api)
53+
* [Audit API](http://localhost:44444/api)
54+
* [Monitoring API](http://localhost:33633)
55+
* [ServicePulse (latest from Docker Hub)](http://localhost:9090)
56+
6. Tear down services using `docker compose down`.

global.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"sdk": {
3+
"version": "8.0.400",
4+
"rollForward": "latestFeature"
5+
},
6+
"msbuild-sdks": {
7+
"Microsoft.Build.NoTargets": "3.7.56"
8+
}
9+
}

src/Directory.Packages.props

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,22 @@
11
<Project>
2-
32
<PropertyGroup>
43
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
54
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
65
</PropertyGroup>
7-
86
<ItemGroup Label="Versions for direct package references">
97
<PackageVersion Include="Autofac" Version="8.1.1" />
10-
<PackageVersion Include="AWSSDK.CloudWatch" Version="3.7.401.31" />
11-
<PackageVersion Include="AWSSDK.SecurityToken" Version="3.7.400.33" />
8+
<PackageVersion Include="AWSSDK.CloudWatch" Version="3.7.402" />
9+
<PackageVersion Include="AWSSDK.SecurityToken" Version="3.7.401.2" />
1210
<PackageVersion Include="Azure.Identity" Version="1.13.1" />
1311
<PackageVersion Include="Azure.Monitor.Query" Version="1.5.0" />
1412
<PackageVersion Include="Azure.ResourceManager.ServiceBus" Version="1.0.1" />
1513
<PackageVersion Include="ByteSize" Version="2.1.2" />
1614
<PackageVersion Include="Caliburn.Micro" Version="4.0.212" />
17-
<PackageVersion Include="DotNetZip" Version="1.16.0" />
1815
<PackageVersion Include="FluentValidation" Version="11.10.0" />
19-
<PackageVersion Include="Fody" Version="6.8.2" />
16+
<PackageVersion Include="Fody" Version="6.9.0" />
2017
<PackageVersion Include="GitHubActionsTestLogger" Version="2.4.1" />
2118
<PackageVersion Include="HdrHistogram" Version="2.5.0" />
22-
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.10" />
19+
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.11" />
2320
<PackageVersion Include="Microsoft.AspNetCore.SignalR.Client" Version="8.0.10" />
2421
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" />
2522
<PackageVersion Include="Microsoft.Extensions.DependencyModel" Version="8.0.2" />
@@ -29,10 +26,10 @@
2926
<PackageVersion Include="Microsoft.Extensions.TimeProvider.Testing" Version="8.10.0" />
3027
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
3128
<PackageVersion Include="Microsoft-WindowsAPICodePack-Shell" Version="1.1.5" />
32-
<PackageVersion Include="Mindscape.Raygun4Net.NetCore" Version="11.1.0" />
29+
<PackageVersion Include="Mindscape.Raygun4Net.NetCore" Version="11.1.2" />
3330
<PackageVersion Include="NLog.Extensions.Logging" Version="5.3.14" />
34-
<PackageVersion Include="NServiceBus" Version="9.2.2" />
35-
<PackageVersion Include="NServiceBus.AcceptanceTesting" Version="9.2.2" />
31+
<PackageVersion Include="NServiceBus" Version="9.2.3" />
32+
<PackageVersion Include="NServiceBus.AcceptanceTesting" Version="9.2.3" />
3633
<PackageVersion Include="NServiceBus.AmazonSQS" Version="7.0.1" />
3734
<PackageVersion Include="NServiceBus.CustomChecks" Version="5.0.0" />
3835
<PackageVersion Include="NServiceBus.Extensions.Hosting" Version="3.0.0" />
@@ -47,35 +44,34 @@
4744
<PackageVersion Include="NServiceBus.Transport.AzureServiceBus" Version="4.2.3" />
4845
<PackageVersion Include="NServiceBus.Transport.AzureStorageQueues" Version="13.0.1" />
4946
<PackageVersion Include="NServiceBus.Transport.Msmq.Sources" Version="3.0.1" />
50-
<PackageVersion Include="NServiceBus.Transport.SqlServer" Version="8.1.5" />
51-
<PackageVersion Include="NServiceBus.Transport.PostgreSql" Version="8.1.5" />
52-
<PackageVersion Include="NuGet.Versioning" Version="6.11.1" />
47+
<PackageVersion Include="NServiceBus.Transport.SqlServer" Version="8.1.6" />
48+
<PackageVersion Include="NServiceBus.Transport.PostgreSql" Version="8.1.6" />
49+
<PackageVersion Include="NuGet.Versioning" Version="6.12.1" />
5350
<PackageVersion Include="NUnit" Version="4.2.2" />
5451
<PackageVersion Include="NUnit.Analyzers" Version="4.3.0" />
5552
<PackageVersion Include="NUnit3TestAdapter" Version="4.6.0" />
5653
<PackageVersion Include="Particular.Approvals" Version="2.0.0" />
5754
<PackageVersion Include="Particular.Licensing.Sources" Version="5.1.0" />
5855
<PackageVersion Include="Particular.LicensingComponent.Report" Version="1.0.0" />
59-
<PackageVersion Include="Polly.Core" Version="8.4.2" />
56+
<PackageVersion Include="Polly.Core" Version="8.5.0" />
6057
<PackageVersion Include="PropertyChanged.Fody" Version="4.1.0" />
6158
<PackageVersion Include="PropertyChanging.Fody" Version="1.30.3" />
6259
<PackageVersion Include="PublicApiGenerator" Version="11.1.0" />
6360
<PackageVersion Include="RavenDB.Embedded" Version="6.2.0" />
64-
<PackageVersion Include="ReactiveUI.WPF" Version="20.1.1" />
61+
<PackageVersion Include="ReactiveUI.WPF" Version="20.1.63" />
6562
<PackageVersion Include="ServiceControl.Contracts" Version="5.0.0" />
6663
<PackageVersion Include="System.Configuration.ConfigurationManager" Version="8.0.1" />
6764
<PackageVersion Include="System.Diagnostics.PerformanceCounter" Version="8.0.1" />
6865
<PackageVersion Include="System.DirectoryServices.AccountManagement" Version="8.0.1" />
6966
<PackageVersion Include="System.Linq.Async" Version="6.0.1" />
7067
<PackageVersion Include="System.Management" Version="8.0.0" />
71-
<PackageVersion Include="System.Management.Automation" Version="7.2.21" />
68+
<PackageVersion Include="System.Management.Automation" Version="7.4.6" />
7269
<PackageVersion Include="System.Reactive.Linq" Version="6.0.1" />
7370
<PackageVersion Include="System.Reflection.MetadataLoadContext" Version="8.0.1" />
7471
<PackageVersion Include="System.ServiceProcess.ServiceController" Version="8.0.1" />
7572
<PackageVersion Include="Validar.Fody" Version="1.9.0" />
7673
<PackageVersion Include="Yarp.ReverseProxy" Version="2.2.0" />
7774
</ItemGroup>
78-
7975
<ItemGroup Label="Versions to pin transitive references">
8076
<PackageVersion Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.2" />
8177
<PackageVersion Include="Microsoft.Extensions.Diagnostics" Version="8.0.1" />
@@ -89,11 +85,9 @@
8985
<PackageVersion Include="System.Text.Json" Version="8.0.5" />
9086
<PackageVersion Include="System.Text.RegularExpressions" Version="4.3.1" />
9187
</ItemGroup>
92-
9388
<ItemGroup>
94-
<GlobalPackageReference Include="Microsoft.Build.Artifacts" Version="6.1.45" />
89+
<GlobalPackageReference Include="Microsoft.Build.Artifacts" Version="6.1.48" />
9590
<GlobalPackageReference Include="Microsoft.Build.CopyOnWrite" Version="1.0.330" />
9691
<GlobalPackageReference Include="Particular.Packaging" Version="4.2.0" />
9792
</ItemGroup>
98-
99-
</Project>
93+
</Project>

src/ServiceControl.LicenseManagement/LicenseDetails.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public static LicenseDetails TrialFromEndDate(DateOnly endDate)
3333
LicenseType = "Trial",
3434
ExpirationDate = endDate.ToDateTime(TimeOnly.MinValue),
3535
IsExtendedTrial = false,
36-
ValidApplications = new List<string> { "All" }
36+
ValidApplications = ["All"]
3737
});
3838
}
3939

@@ -44,7 +44,7 @@ public static LicenseDetails TrialExpired()
4444
LicenseType = "Trial",
4545
ExpirationDate = DateTime.UtcNow.Date.AddDays(-2), //HasLicenseDateExpired uses a grace period of 1 day
4646
IsExtendedTrial = false,
47-
ValidApplications = new List<string> { "All" }
47+
ValidApplications = ["All"]
4848
});
4949
}
5050

0 commit comments

Comments
 (0)