diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3f9632f42a..fab82c7004 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,6 +92,7 @@ jobs: - name: Build id: build background: true + timeout-minutes: 5 run: dotnet build tests.proj --configuration Release -graph # there is an issue with az cli and python 3.14, so for now we need to pin it # once the issue is resolved it should be able to be re-floated @@ -119,19 +120,19 @@ jobs: # Cleanup of queues starting with `GHA-` handled by https://github.com/Particular/NServiceBus.AmazonSQS/blob/master/.github/workflows/tests-cleanup.yml $connectString = "AccessKeyId=${{ secrets.AWS_ACCESS_KEY_ID }};SecretAccessKey=${{ secrets.AWS_SECRET_ACCESS_KEY }};Region=${{ secrets.AWS_REGION }};QueueNamePrefix=GHA-${{ github.run_id }}" echo "ServiceControl_TransportTests_SQS_ConnectionString=$connectString" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append - # The Azure steps below create real cloud resources, so they sit behind the wait as well. - - name: Wait for build - wait: build # Provisions the WSL2 Docker host that the SQL Server, PostgreSQL, RabbitMQ and IBM MQ containers # run in on Windows. A no-op on Linux, but still run there so those actions see the same - # environment variables on both runners. It and the container setups run after the build on - # purpose: with the VM and the build competing for the runner's memory, jobs have died with "The - # hosted runner lost communication with the server". + # environment variables on both runners. It and the container setups overlap the build on + # purpose. Serialising them behind the wait (#5873) did not stop the runner hangs it was meant to + # prevent and cost the critical path about two minutes; the step timeouts turn a hang into a + # five minute failure instead of a thirty minute one. - name: Setup WSL if: contains(fromJSON('["RabbitMQ", "SqlServer", "PostgreSql", "IBMMQ"]'), matrix.test-category) uses: Particular/setup-wsl-action@v1.2.0 + timeout-minutes: 5 with: - # The action defaults to 4GB. The runner has 16GB, so give the VM real headroom. + # The action defaults to 4GB. The runner has 16GB and the build runs concurrently with the + # container starting up, so give the VM real headroom. memory: 8GB - name: Setup SQL Server uses: Particular/install-sql-server-action@v3.0.0 @@ -165,6 +166,9 @@ jobs: if: matrix.test-category == 'IBMMQ' with: connection-string-name: ServiceControl_TransportTests_IBMMQ_ConnectionString + # The Azure steps below create real cloud resources, so they sit behind the wait. + - name: Wait for build + wait: build - name: Azure login uses: azure/login@v3.1.0 if: matrix.test-category == 'AzureServiceBus' || matrix.test-category == 'AzureStorageQueues'