Introduce a Lightweight Scaling Package for Multi Durable Backends #30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: DurableTask Scale Tests | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [ main, dev ] | |
| paths: | |
| - 'src/WebJobs.Extensions.DurableTask.Scale/**' | |
| - 'test/ScaleTests/**' | |
| - '.github/workflows/scale-tests.yml' | |
| pull_request: | |
| branches: [ main, dev ] | |
| paths: | |
| - 'src/WebJobs.Extensions.DurableTask.Scale/**' | |
| - 'test/ScaleTests/**' | |
| - '.github/workflows/scale-tests.yml' | |
| jobs: | |
| scale-tests-azurestorage: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET 8.0 | |
| uses: actions/setup-dotnet@v3 | |
| with: | |
| dotnet-version: 8.0.x | |
| - name: Set up Node.js (needed for Azurite) | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '18.x' | |
| - name: Install Azurite | |
| run: npm install -g azurite | |
| - name: Start Azurite | |
| run: azurite --silent --blobPort 10000 --queuePort 10001 --tablePort 10002 & | |
| - name: Restore and Build Scale Tests | |
| working-directory: test/ScaleTests | |
| run: dotnet build --configuration Release | |
| - name: Run Azure Storage Scale Tests | |
| working-directory: test/ScaleTests | |
| env: | |
| AzureWebJobsStorage: UseDevelopmentStorage=true | |
| run: dotnet test --configuration Release --no-build --verbosity normal --filter "FullyQualifiedName~AzureStorage&FullyQualifiedName!~Sql&FullyQualifiedName!~DurableTaskTriggersScaleProviderSqlServer" | |
| scale-tests-sql: | |
| runs-on: ubuntu-latest | |
| env: | |
| MSSQL_SA_PASSWORD: "Strong!Passw0rd123" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET 8.0 | |
| uses: actions/setup-dotnet@v3 | |
| with: | |
| dotnet-version: 8.0.x | |
| - name: Set up Node.js (needed for Azurite) | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '18.x' | |
| - name: Install Azurite | |
| run: npm install -g azurite | |
| - name: Start Azurite | |
| run: azurite --silent --blobPort 10000 --queuePort 10001 --tablePort 10002 & | |
| - name: Pull SQL Server Docker Image | |
| run: docker pull mcr.microsoft.com/mssql/server:2022-latest | |
| - name: Start SQL Server Container | |
| run: | | |
| docker run --name mssql-server \ | |
| -e ACCEPT_EULA=Y \ | |
| -e "MSSQL_SA_PASSWORD=${{ env.MSSQL_SA_PASSWORD }}" \ | |
| -e "MSSQL_PID=Express" \ | |
| -p 1433:1433 \ | |
| -d mcr.microsoft.com/mssql/server:2022-latest | |
| - name: Wait for SQL Server to be ready | |
| run: | | |
| echo "Waiting for SQL Server to be ready..." | |
| for i in {1..30}; do | |
| # Try to connect using sqlcmd (try multiple possible paths for different SQL Server versions) | |
| if docker exec mssql-server /opt/mssql-tools18/bin/sqlcmd -S . -U sa -P "${{ env.MSSQL_SA_PASSWORD }}" -Q "SELECT 1" -C > /dev/null 2>&1 || \ | |
| docker exec mssql-server /opt/mssql-tools/bin/sqlcmd -S . -U sa -P "${{ env.MSSQL_SA_PASSWORD }}" -Q "SELECT 1" -C > /dev/null 2>&1; then | |
| echo "SQL Server is ready!" | |
| break | |
| fi | |
| echo "Waiting for SQL Server... ($i/30)" | |
| sleep 2 | |
| done | |
| docker ps | |
| - name: Create database | |
| run: | | |
| echo "Creating TestDurableDB database..." | |
| # Try multiple possible sqlcmd paths for different SQL Server versions | |
| if docker exec mssql-server /opt/mssql-tools18/bin/sqlcmd -S . -U sa -P "${{ env.MSSQL_SA_PASSWORD }}" -Q "CREATE DATABASE [TestDurableDB] COLLATE Latin1_General_100_BIN2_UTF8" -C 2>/dev/null || \ | |
| docker exec mssql-server /opt/mssql-tools/bin/sqlcmd -S . -U sa -P "${{ env.MSSQL_SA_PASSWORD }}" -Q "CREATE DATABASE [TestDurableDB] COLLATE Latin1_General_100_BIN2_UTF8" -C; then | |
| echo "Database created successfully" | |
| else | |
| echo "Failed to create database" | |
| exit 1 | |
| fi | |
| - name: Restore and Build Scale Tests | |
| working-directory: test/ScaleTests | |
| run: dotnet build --configuration Release | |
| - name: Run SQL Server Scale Tests | |
| working-directory: test/ScaleTests | |
| env: | |
| AzureWebJobsStorage: UseDevelopmentStorage=true | |
| SQLDB_Connection: "Server=localhost,1433;Database=TestDurableDB;User Id=sa;Password=${{ env.MSSQL_SA_PASSWORD }};TrustServerCertificate=True;Encrypt=False;" | |
| run: dotnet test --configuration Release --no-build --verbosity normal --filter "FullyQualifiedName~Sql|FullyQualifiedName~DurableTaskTriggersScaleProviderSqlServer" | |
| scale-tests-azuremanaged: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET 8.0 | |
| uses: actions/setup-dotnet@v3 | |
| with: | |
| dotnet-version: 8.0.x | |
| - name: Set up Node.js (needed for Azurite) | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '18.x' | |
| - name: Install Azurite | |
| run: npm install -g azurite | |
| - name: Start Azurite | |
| run: azurite --silent --blobPort 10000 --queuePort 10001 --tablePort 10002 & | |
| - name: Pull DTS Emulator Docker Image | |
| run: docker pull mcr.microsoft.com/dts/dts-emulator:latest | |
| - name: Start DTS Container | |
| run: | | |
| docker run -i \ | |
| -p 8080:8080 \ | |
| -p 8082:8082 \ | |
| -d mcr.microsoft.com/dts/dts-emulator:latest | |
| - name: Wait for DTS to be ready | |
| run: | | |
| echo "Waiting for DTS to be ready..." | |
| sleep 30 | |
| docker ps | |
| - name: Restore and Build Scale Tests | |
| working-directory: test/ScaleTests | |
| run: dotnet build --configuration Release | |
| - name: Run Azure Managed Scale Tests | |
| working-directory: test/ScaleTests | |
| env: | |
| AzureWebJobsStorage: UseDevelopmentStorage=true | |
| DURABLE_TASK_SCHEDULER_CONNECTION_STRING: "Endpoint=http://localhost:8080;Authentication=None" | |
| run: dotnet test --configuration Release --no-build --verbosity normal --filter "FullyQualifiedName~AzureManaged&FullyQualifiedName!~Sql&FullyQualifiedName!~DurableTaskTriggersScaleProviderSqlServer" | |
| scale-tests-configuration: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup .NET 8.0 | |
| uses: actions/setup-dotnet@v3 | |
| with: | |
| dotnet-version: 8.0.x | |
| - name: Set up Node.js (needed for Azurite) | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '18.x' | |
| - name: Install Azurite | |
| run: npm install -g azurite | |
| - name: Start Azurite | |
| run: azurite --silent --blobPort 10000 --queuePort 10001 --tablePort 10002 & | |
| - name: Restore and Build Scale Tests | |
| working-directory: test/ScaleTests | |
| run: dotnet build --configuration Release | |
| - name: Run Configuration Extension Tests | |
| working-directory: test/ScaleTests | |
| env: | |
| AzureWebJobsStorage: UseDevelopmentStorage=true | |
| run: dotnet test --configuration Release --no-build --verbosity normal --filter "FullyQualifiedName~DurableTaskJobHostConfigurationExtensionsTests" | |