Skip to content

Commit e32b300

Browse files
authored
Merge branch 'main' into chore/update-efcore-versions
2 parents 4097d2d + a81b219 commit e32b300

File tree

9 files changed

+261
-8
lines changed

9 files changed

+261
-8
lines changed
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Advanced Performance Tests
2+
3+
on:
4+
workflow_dispatch:
5+
6+
permissions:
7+
id-token: write # This is required for requesting the JWT
8+
contents: read # This is required for actions/checkout
9+
10+
jobs:
11+
run-advanced-perf-tests:
12+
name: Run Advanced Performance Tests
13+
runs-on: ubuntu-latest
14+
env:
15+
PERF_RESULTS_DIR: ${{ github.workspace }}
16+
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
dbEngine: ["mysql", "pg"]
21+
deployment: ["aurora"]
22+
steps:
23+
- name: 'Clone repository'
24+
uses: actions/checkout@v4
25+
- name: "Set up JDK 8"
26+
uses: actions/setup-java@v4
27+
with:
28+
distribution: "corretto"
29+
java-version: 8
30+
- name: Setup .NET 8.0
31+
uses: actions/setup-dotnet@v4
32+
with:
33+
dotnet-version: '8.0.407'
34+
- name: Configure AWS Credentials
35+
id: creds
36+
uses: aws-actions/configure-aws-credentials@v5.1.0
37+
with:
38+
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/${{ secrets.AWS_DEPLOY_ROLE }}
39+
role-session-name: dotnet_integration_test
40+
role-duration-seconds: 21600
41+
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
42+
output-credentials: true
43+
- name: Run Advanced Performance Tests
44+
run: |
45+
cd test/integration/host && ./gradlew --no-parallel --no-daemon test-${{ matrix.deployment }}-${{ matrix.dbEngine }}-advanced-performance --info
46+
env:
47+
RDS_DB_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
48+
AWS_ACCESS_KEY_ID: ${{ steps.creds.outputs.aws-access-key-id }}
49+
AWS_SECRET_ACCESS_KEY: ${{ steps.creds.outputs.aws-secret-access-key }}
50+
AWS_SESSION_TOKEN: ${{ steps.creds.outputs.aws-session-token }}
51+
MYSQL_VERSION: "default"
52+
PG_VERSION: "default"
53+
PERF_RESULTS_DIR: ${{ env.PERF_RESULTS_DIR }}
54+
LOG_LEVEL: None
55+
- name: Archive results
56+
if: always()
57+
uses: actions/upload-artifact@v4
58+
with:
59+
name: advanced-performance-report-${{ matrix.dbEngine }}
60+
path: ${{ env.PERF_RESULTS_DIR }}/**/*.xlsx
61+
retention-days: 5
62+
if-no-files-found: warn
63+
- name: Get Github Action IP
64+
if: always()
65+
id: ip
66+
uses: haythem/public-ip@v1.3
67+
- name: Remove Github Action IP
68+
if: always()
69+
run: |
70+
aws ec2 revoke-security-group-ingress --group-name default --protocol all --port 0-65535 --cidr ${{ steps.ip.outputs.ipv4 }}/32

.github/workflows/build-and-sign.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
dotnet restore AwsWrapperDataProvider.Plugin.FederatedAuth\AwsWrapperDataProvider.Plugin.FederatedAuth.csproj /p:_IsPacking=true
2727
dotnet restore AwsWrapperDataProvider.Plugin.Iam\AwsWrapperDataProvider.Plugin.Iam.csproj /p:_IsPacking=true
2828
dotnet restore AwsWrapperDataProvider.Plugin.SecretsManager\AwsWrapperDataProvider.Plugin.SecretsManager.csproj /p:_IsPacking=true
29+
dotnet restore AwsWrapperDataProvider.Plugin.CustomEndpoint\AwsWrapperDataProvider.Plugin.CustomEndpoint.csproj /p:_IsPacking=true
2930
dotnet restore AwsWrapperDataProvider.Dialect.MySqlClient\AwsWrapperDataProvider.Dialect.MySqlClient.csproj /p:_IsPacking=true
3031
dotnet restore AwsWrapperDataProvider.Dialect.MySqlConnector\AwsWrapperDataProvider.Dialect.MySqlConnector.csproj /p:_IsPacking=true
3132
dotnet restore AwsWrapperDataProvider.Dialect.Npgsql\AwsWrapperDataProvider.Dialect.Npgsql.csproj /p:_IsPacking=true
@@ -38,6 +39,7 @@ jobs:
3839
dotnet build AwsWrapperDataProvider.Plugin.FederatedAuth\AwsWrapperDataProvider.Plugin.FederatedAuth.csproj --configuration Release --no-restore
3940
dotnet build AwsWrapperDataProvider.Plugin.Iam\AwsWrapperDataProvider.Plugin.Iam.csproj --configuration Release --no-restore
4041
dotnet build AwsWrapperDataProvider.Plugin.SecretsManager\AwsWrapperDataProvider.Plugin.SecretsManager.csproj --configuration Release --no-restore
42+
dotnet build AwsWrapperDataProvider.Plugin.CustomEndpoint\AwsWrapperDataProvider.Plugin.CustomEndpoint.csproj --configuration Release --no-restore
4143
dotnet build AwsWrapperDataProvider.Dialect.MySqlClient\AwsWrapperDataProvider.Dialect.MySqlClient.csproj --configuration Release --no-restore
4244
dotnet build AwsWrapperDataProvider.Dialect.MySqlConnector\AwsWrapperDataProvider.Dialect.MySqlConnector.csproj --configuration Release --no-restore
4345
dotnet build AwsWrapperDataProvider.Dialect.Npgsql\AwsWrapperDataProvider.Dialect.Npgsql.csproj --configuration Release --no-restore
@@ -88,6 +90,7 @@ jobs:
8890
dotnet pack AwsWrapperDataProvider.Plugin.FederatedAuth\AwsWrapperDataProvider.Plugin.FederatedAuth.csproj --configuration Release --no-build /p:PackageVersion=${{ env.RELEASE_VERSION }} --output ./packages
8991
dotnet pack AwsWrapperDataProvider.Plugin.Iam\AwsWrapperDataProvider.Plugin.Iam.csproj --configuration Release --no-build /p:PackageVersion=${{ env.RELEASE_VERSION }} --output ./packages
9092
dotnet pack AwsWrapperDataProvider.Plugin.SecretsManager\AwsWrapperDataProvider.Plugin.SecretsManager.csproj --configuration Release --no-build /p:PackageVersion=${{ env.RELEASE_VERSION }} --output ./packages
93+
dotnet pack AwsWrapperDataProvider.Plugin.CustomEndpoint\AwsWrapperDataProvider.Plugin.CustomEndpoint.csproj --configuration Release --no-build /p:PackageVersion=${{ env.RELEASE_VERSION }} --output ./packages
9194
dotnet pack AwsWrapperDataProvider.Dialect.MySqlClient\AwsWrapperDataProvider.Dialect.MySqlClient.csproj --configuration Release --no-build /p:PackageVersion=${{ env.RELEASE_VERSION }} --output ./packages
9295
dotnet pack AwsWrapperDataProvider.Dialect.MySqlConnector\AwsWrapperDataProvider.Dialect.MySqlConnector.csproj --configuration Release --no-build /p:PackageVersion=${{ env.RELEASE_VERSION }} --output ./packages
9396
dotnet pack AwsWrapperDataProvider.Dialect.Npgsql\AwsWrapperDataProvider.Dialect.Npgsql.csproj --configuration Release --no-build /p:PackageVersion=${{ env.RELEASE_VERSION }} --output ./packages

.github/workflows/perf-test.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Performance Tests
2+
3+
on:
4+
workflow_dispatch:
5+
6+
permissions:
7+
id-token: write # This is required for requesting the JWT
8+
contents: read # This is required for actions/checkout
9+
10+
jobs:
11+
run-integration-tests:
12+
name: Run Performance Tests
13+
runs-on: ubuntu-latest
14+
env:
15+
PERF_RESULTS_DIR: ${{ github.workspace }}
16+
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
dbEngine: ["mysql", "pg"]
21+
deployment: ["aurora"]
22+
steps:
23+
- name: 'Clone repository'
24+
uses: actions/checkout@v4
25+
- name: "Set up JDK 8"
26+
uses: actions/setup-java@v4
27+
with:
28+
distribution: "corretto"
29+
java-version: 8
30+
- name: Setup .NET 8.0
31+
uses: actions/setup-dotnet@v4
32+
with:
33+
dotnet-version: '8.0.407'
34+
- name: Configure AWS Credentials
35+
id: creds
36+
uses: aws-actions/configure-aws-credentials@v5.1.0
37+
with:
38+
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/${{ secrets.AWS_DEPLOY_ROLE }}
39+
role-session-name: dotnet_integration_test
40+
role-duration-seconds: 21600
41+
aws-region: ${{ secrets.AWS_DEFAULT_REGION }}
42+
output-credentials: true
43+
- name: Run Performance Tests
44+
run: |
45+
cd test/integration/host && ./gradlew --no-parallel --no-daemon test-${{ matrix.deployment }}-${{ matrix.dbEngine }}-performance --info
46+
env:
47+
RDS_DB_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
48+
AWS_ACCESS_KEY_ID: ${{ steps.creds.outputs.aws-access-key-id }}
49+
AWS_SECRET_ACCESS_KEY: ${{ steps.creds.outputs.aws-secret-access-key }}
50+
AWS_SESSION_TOKEN: ${{ steps.creds.outputs.aws-session-token }}
51+
MYSQL_VERSION: "default"
52+
PG_VERSION: "default"
53+
PERF_RESULTS_DIR: ${{ env.PERF_RESULTS_DIR }}
54+
LOG_LEVEL: None
55+
- name: Archive results
56+
if: always()
57+
uses: actions/upload-artifact@v4
58+
with:
59+
name: performance-report-${{ matrix.dbEngine }}
60+
path: ${{ env.PERF_RESULTS_DIR }}/**/*.xlsx
61+
retention-days: 5
62+
if-no-files-found: warn
63+
- name: Get Github Action IP
64+
if: always()
65+
id: ip
66+
uses: haythem/public-ip@v1.3
67+
- name: Remove Github Action IP
68+
if: always()
69+
run: |
70+
aws ec2 revoke-security-group-ingress --group-name default --protocol all --port 0-65535 --cidr ${{ steps.ip.outputs.ipv4 }}/32

AwsWrapperDataProvider.Performance.Tests/AdvancedPerformanceTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -445,9 +445,9 @@ private static Task GetTask_DNS(
445445

446446
[Fact]
447447
[Trait("Category", "Integration")]
448-
[Trait("Category", "Manual")]
449448
[Trait("Category", "Performance")]
450-
[Trait("Database", "pg")]
449+
[Trait("Database", "mysql-advanced-perf")]
450+
[Trait("Database", "pg-advanced-perf")]
451451
[Trait("Engine", "aurora")]
452452
public async Task AdvancedPerformanceTest()
453453
{

AwsWrapperDataProvider.Performance.Tests/PerformanceTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,9 @@ private static IEnumerable<int[]> GenerateFailureDetectionTimeParameters()
120120

121121
[Fact]
122122
[Trait("Category", "Integration")]
123-
[Trait("Category", "Manual")]
124123
[Trait("Category", "Performance")]
125-
[Trait("Database", "pg")]
124+
[Trait("Database", "mysql-perf")]
125+
[Trait("Database", "pg-perf")]
126126
[Trait("Engine", "aurora")]
127127
protected async Task FailureDetectionTimeTest_EnhancedMonitoringEnabled_Efm()
128128
{
@@ -192,9 +192,9 @@ private async Task Execute_FailureDetectionTimeTest_EnhancedMonitoringEnabled(
192192

193193
[Fact]
194194
[Trait("Category", "Integration")]
195-
[Trait("Category", "Manual")]
196195
[Trait("Category", "Performance")]
197-
[Trait("Database", "pg")]
196+
[Trait("Database", "mysql-perf")]
197+
[Trait("Database", "pg-perf")]
198198
[Trait("Engine", "aurora")]
199199
public async Task FailureDetectionTimeTest_FailoverAndEnhancedMonitoringEnabled()
200200
{

AwsWrapperDataProvider.Performance.Tests/SheetsWriter.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
using System.Collections.Concurrent;
1616
using AwsWrapperDataProvider.Performance.Tests.PerformanceStatistics;
17-
using NPOI.SS.UserModel;
1817
using NPOI.XSSF.UserModel;
1918

2019
namespace AwsWrapperDataProvider.Performance.Tests;

AwsWrapperDataProvider/Driver/Plugins/Efm/HostMonitorService.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
// limitations under the License.
1414

1515
using System.Data.Common;
16-
using System.Resources;
1716
using AwsWrapperDataProvider.Driver.HostInfo;
1817
using AwsWrapperDataProvider.Driver.Utils;
1918
using AwsWrapperDataProvider.Properties;

test/integration/host/build.gradle.kts

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,86 @@ tasks.register<Test>("test-aurora-pg-rw-splitting-performance") {
441441
}
442442
}
443443

444+
tasks.register<Test>("test-aurora-mysql-performance") {
445+
group = "verification"
446+
filter.includeTestsMatching("integration.host.TestRunner.runMySQLPerfTests")
447+
doFirst {
448+
systemProperty("test-no-docker", "true")
449+
systemProperty("test-no-multi-az-cluster", "true")
450+
systemProperty("test-no-multi-az-instance", "true")
451+
systemProperty("test-no-aurora-limitless", "true")
452+
systemProperty("test-no-iam", "true")
453+
systemProperty("test-no-secrets-manager", "true")
454+
systemProperty("test-no-pg-driver", "true")
455+
systemProperty("test-no-pg-engine", "true")
456+
systemProperty("test-no-mariadb-driver", "true")
457+
systemProperty("test-no-mariadb-engine", "true")
458+
systemProperty("test-no-instances-1", "true")
459+
systemProperty("test-no-instances-2", "true")
460+
systemProperty("test-no-bg", "true")
461+
}
462+
}
463+
464+
tasks.register<Test>("test-aurora-pg-performance") {
465+
group = "verification"
466+
filter.includeTestsMatching("integration.host.TestRunner.runPGPerfTests")
467+
doFirst {
468+
systemProperty("test-no-docker", "true")
469+
systemProperty("test-no-multi-az-cluster", "true")
470+
systemProperty("test-no-multi-az-instance", "true")
471+
systemProperty("test-no-aurora-limitless", "true")
472+
systemProperty("test-no-iam", "true")
473+
systemProperty("test-no-secrets-manager", "true")
474+
systemProperty("test-no-mysql-driver", "true")
475+
systemProperty("test-no-mysql-engine", "true")
476+
systemProperty("test-no-mariadb-driver", "true")
477+
systemProperty("test-no-mariadb-engine", "true")
478+
systemProperty("test-no-instances-1", "true")
479+
systemProperty("test-no-instances-2", "true")
480+
systemProperty("test-no-bg", "true")
481+
}
482+
}
483+
484+
tasks.register<Test>("test-aurora-mysql-advanced-performance") {
485+
group = "verification"
486+
filter.includeTestsMatching("integration.host.TestRunner.runMySQLAdvancedPerfTests")
487+
doFirst {
488+
systemProperty("test-no-docker", "true")
489+
systemProperty("test-no-multi-az-cluster", "true")
490+
systemProperty("test-no-multi-az-instance", "true")
491+
systemProperty("test-no-aurora-limitless", "true")
492+
systemProperty("test-no-iam", "true")
493+
systemProperty("test-no-secrets-manager", "true")
494+
systemProperty("test-no-pg-driver", "true")
495+
systemProperty("test-no-pg-engine", "true")
496+
systemProperty("test-no-mariadb-driver", "true")
497+
systemProperty("test-no-mariadb-engine", "true")
498+
systemProperty("test-no-instances-1", "true")
499+
systemProperty("test-no-instances-2", "true")
500+
systemProperty("test-no-bg", "true")
501+
}
502+
}
503+
504+
tasks.register<Test>("test-aurora-pg-advanced-performance") {
505+
group = "verification"
506+
filter.includeTestsMatching("integration.host.TestRunner.runPGAdvancedPerfTests")
507+
doFirst {
508+
systemProperty("test-no-docker", "true")
509+
systemProperty("test-no-multi-az-cluster", "true")
510+
systemProperty("test-no-multi-az-instance", "true")
511+
systemProperty("test-no-aurora-limitless", "true")
512+
systemProperty("test-no-iam", "true")
513+
systemProperty("test-no-secrets-manager", "true")
514+
systemProperty("test-no-mysql-driver", "true")
515+
systemProperty("test-no-mysql-engine", "true")
516+
systemProperty("test-no-mariadb-driver", "true")
517+
systemProperty("test-no-mariadb-engine", "true")
518+
systemProperty("test-no-instances-1", "true")
519+
systemProperty("test-no-instances-2", "true")
520+
systemProperty("test-no-bg", "true")
521+
}
522+
}
523+
444524
tasks.register<Test>("in-container") {
445525
filter.excludeTestsMatching("software.*") // exclude unit tests
446526

test/integration/host/src/test/java/integration/host/TestRunner.java

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,38 @@ public void runPGNHMultiAzInstanceTests(TestEnvironmentRequest testEnvironmentRe
152152
}
153153
}
154154

155+
@TestTemplate
156+
public void runMySQLPerfTests(TestEnvironmentRequest testEnvironmentRequest) throws Exception {
157+
158+
try (final TestEnvironmentConfig env = TestEnvironmentConfig.build(testEnvironmentRequest)) {
159+
env.runTests("mysql-perf", "aurora");
160+
}
161+
}
162+
163+
@TestTemplate
164+
public void runPGPerfTests(TestEnvironmentRequest testEnvironmentRequest) throws Exception {
165+
166+
try (final TestEnvironmentConfig env = TestEnvironmentConfig.build(testEnvironmentRequest)) {
167+
env.runTests("pg-perf", "aurora");
168+
}
169+
}
170+
171+
@TestTemplate
172+
public void runMySQLAdvancedPerfTests(TestEnvironmentRequest testEnvironmentRequest) throws Exception {
173+
174+
try (final TestEnvironmentConfig env = TestEnvironmentConfig.build(testEnvironmentRequest)) {
175+
env.runTests("mysql-advanced-perf", "aurora");
176+
}
177+
}
178+
179+
@TestTemplate
180+
public void runPGAdvancedPerfTests(TestEnvironmentRequest testEnvironmentRequest) throws Exception {
181+
182+
try (final TestEnvironmentConfig env = TestEnvironmentConfig.build(testEnvironmentRequest)) {
183+
env.runTests("pg-advanced-perf", "aurora");
184+
}
185+
}
186+
155187
@TestTemplate
156188
public void runMySQLRWSplittingPerfTests(TestEnvironmentRequest testEnvironmentRequest) throws Exception {
157189

0 commit comments

Comments
 (0)