fix: isolate AppHost preview validation job#274
Conversation
Root cause: PR #273 split test execution into separate commands but kept them in one job. AppHost.Tests needs isolated runner environment for Aspire orchestrator to start reliably. Solution: - Split squad-preview.yml into 4 jobs: build, test-fast, test-integration, test-apphost - Match squad-test.yml isolation pattern with separate jobs - Add critical env vars (ASPIRE_ALLOW_UNSECURED_TRANSPORT, ConnectionStrings__mongodb) to test-apphost job - AppHost job runs independently with 45min timeout, preventing startup conflicts This matches the working isolation in PR CI and should resolve dev workflow timeout at https://localhost:7043/. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
🏗️ PR Added to Squad Triage QueueThis PR has been labeled with Next steps:
|
There was a problem hiding this comment.
Pull request overview
This PR restructures the dev branch preview validation workflow to isolate Aspire/AppHost E2E (Playwright) execution into its own job, aligning the preview path more closely with the proven squad-test.yml environment setup to prevent AppHost readiness timeouts.
Changes:
- Split
squad-preview.ymlinto separatebuild,test-fast,test-integration, andtest-apphostjobs. - Added Aspire/AppHost-specific environment variables to the isolated AppHost test job.
- Switched preview test execution to per-test-project
dotnet testcommands (instead of solution-wide test execution).
| - name: Build | ||
| run: dotnet build IssueTrackerApp.slnx --configuration Release --no-restore | ||
|
|
||
| - name: Run fast unit tests | ||
| run: | | ||
| dotnet test tests/Architecture.Tests/Architecture.Tests.csproj --configuration Release --no-build --verbosity minimal | ||
| dotnet test tests/Domain.Tests/Domain.Tests.csproj --configuration Release --no-build --verbosity minimal | ||
| dotnet test tests/Web.Tests.Bunit/Web.Tests.Bunit.csproj --configuration Release --no-build --verbosity minimal | ||
| dotnet test tests/Persistence.MongoDb.Tests/Persistence.MongoDb.Tests.csproj --configuration Release --no-build --verbosity minimal | ||
| dotnet test tests/Web.Tests/Web.Tests.csproj --configuration Release --no-build --verbosity minimal | ||
| dotnet test tests/Persistence.AzureStorage.Tests/Persistence.AzureStorage.Tests.csproj --configuration Release --no-build --verbosity minimal |
| run: dotnet restore IssueTrackerApp.slnx | ||
|
|
||
| - name: Build | ||
| run: dotnet build IssueTrackerApp.slnx --configuration Release --no-restore |
| run: dotnet restore IssueTrackerApp.slnx | ||
|
|
||
| - name: Build | ||
| run: dotnet build IssueTrackerApp.slnx --configuration Release --no-restore |
- Orchestration logs: Boromir (PR review #275, #276), Aragorn (PR triage #274) - Session log: Ralph Go Round One summary - Decision inbox merged: 7 decision files consolidated into decisions.md - Agent history updated: Boromir and Aragorn session outcomes recorded All .squad/ changes committed per Scribe charter. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Merged latest dev (916a607) which updated dotnet-sdk version in global.json. Resolved squad-preview.yml conflict by keeping PR #274's 4-job isolation: - build job (shared by all) - test-fast (unit tests) - test-integration (integration tests) - test-apphost (AppHost.Tests with Aspire env vars) The dev branch had reverted to monolithic test execution, but the 4-job architecture is the correct solution per PR #274 analysis. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
| - name: Restore | ||
| run: dotnet restore IssueTrackerApp.slnx | ||
|
|
||
| - name: Build | ||
| run: dotnet build IssueTrackerApp.slnx --configuration Release --no-restore |
| - name: Restore | ||
| run: dotnet restore IssueTrackerApp.slnx | ||
|
|
||
| - name: Build | ||
| run: dotnet build IssueTrackerApp.slnx --configuration Release --no-restore |
| run: dotnet restore IssueTrackerApp.slnx | ||
|
|
||
| - name: Build | ||
| run: dotnet build IssueTrackerApp.slnx --configuration Release --no-restore |
| **AppHost.Tests MUST run in isolation** — it cannot share a test step with other projects. | ||
|
|
||
| **Recommendation:** Skip AppHost.Tests in preview workflow: | ||
|
|
||
| ```yaml | ||
| - name: Run unit tests | ||
| run: dotnet test IssueTrackerApp.slnx --configuration Release --no-build --verbosity normal --filter "FullyQualifiedName!~AppHost.Tests" | ||
| ``` | ||
|
|
||
| ### Rationale | ||
| - AppHost.Tests already validated in PR checks (dedicated job with 45-min timeout) | ||
| - Running twice (PR + preview) is redundant and wastes CI resources | ||
| - Preview workflow should be fast for quick feedback on dev-branch pushes |
| ### PR #276 Test Failure Investigation (2026-05-04, by mpaulosky request) | ||
| - **Task:** Diagnose failing `Persistence.AzureStorage.Tests.Integration` check in PR #276 (dependency bump PR) | ||
| - **PR:** Bump the all-actions group with 3 updates | ||
| - Azure.Storage.Blobs: 12.20.0 → 12.27.0 ⚠️ | ||
| - Azure.Monitor.OpenTelemetry.AspNetCore: 1.4.0 → 1.5.0 | ||
| - Aspire.Hosting.Redis: 13.2.1 → 13.2.4 | ||
| - **Root Cause:** **API Version Mismatch** — Azure.Storage.Blobs 12.27.0 sends API version `2026-02-06` in Blob Storage requests. Testcontainers.Azurite 4.11.0 bundles Azurite 3.35.0, which doesn't support this new API version. | ||
| - **Error Details:** | ||
| ``` | ||
| Azure.RequestFailedException: The API version 2026-02-06 is not supported by Azurite. | ||
| Please upgrade Azurite to latest version and retry. | ||
| ErrorCode: InvalidHeaderValue | ||
| Status: 400 | ||
| ``` | ||
| - **Culprit:** **Azure.Storage.Blobs 12.27.0 bump** — Direct cause of test failures; other bumps are unrelated | ||
| - **Test Impact:** All 25 integration tests fail at `BlobContainerClient.CreateIfNotExistsAsync()` when SDK attempts to contact Azurite | ||
| - **Tests Pass on dev:** ✅ Confirmed — Testcontainers.Azurite 4.11.0 + Azure.Storage.Blobs 12.20.0 compatible | ||
| - **Tests Fail on PR #276:** ❌ Confirmed — Testcontainers.Azurite 4.11.0 + Azure.Storage.Blobs 12.27.0 incompatible | ||
| - **Verdict:** **BLOCKER** — PR #276 cannot merge until Testcontainers.Azurite is upgraded to support Azure Storage Blob API v2026-02-06 | ||
| - **Next Steps for Owner (Boromir/Aragorn):** | ||
| 1. Upgrade `Testcontainers.Azurite` in `Directory.Packages.props` to a version that bundles Azurite supporting API v2026-02-06 (likely v4.12.0+) | ||
| 2. Re-run integration tests to confirm all 25 tests pass | ||
| 3. Ensure no other Azure Storage API changes break existing test patterns | ||
| - **Key Lesson:** Dependency bumps in Azure SDK versions must be accompanied by corresponding test infrastructure (Testcontainers/Azurite) upgrades; monitor Azure Storage API versioning in release notes |
| ### 2026-05-04 — PR Review: #275 & #276 | ||
|
|
||
| **Session:** Ralph Go Round One | ||
| **Outcome:** | ||
| - PR #275 — Ready for Aragorn review. All criteria met. | ||
| - PR #276 — Blocked by dependency-driven failure in Persistence.AzureStorage.Tests.Integration. Root cause likely tied to NuGet bumps rather than SDK bump. Awaiting triage. |
| - `build`: Compile solution once | ||
| - `test-fast`: Quick unit tests | ||
| - `test-integration`: Integration tests | ||
| - `test-apphost`: Aspire + Playwright E2E tests |
| test-apphost: | ||
| name: AppHost Tests (Aspire + Playwright) | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 45 |
Test Results Summary2 365 tests ±0 2 341 ✅ ±0 11m 47s ⏱️ -11s For more details on these failures, see this check. Results for commit 9658e5c. ± Comparison against base commit 07642ab. ♻️ This comment has been updated with latest results. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #274 +/- ##
=======================================
Coverage 77.77% 77.77%
=======================================
Files 228 228
Lines 8469 8469
Branches 1172 1172
=======================================
Hits 6587 6587
Misses 1337 1337
Partials 545 545 🚀 New features to boost your workflow:
|
Boromir fixed the Persistence.AzureStorage.Tests.Integration failure caused by Azure.Storage.Blobs 12.27.0 requiring API version 2026-02-06, which Azurite 3.35.0 doesn't yet support. Added --skipApiVersionCheck flag to bypass validation until Azurite adds native support. Updated: - .squad/agents/boromir/history.md - .squad/decisions/boromir-fix-pr-276-azurite-api-version.md Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…cellation - Remove redundant build job and per-job solution rebuilds - Each test job now builds only the specific test projects it needs - Add concurrency cancellation to allow newer pushes to cancel running jobs - Align with efficient per-project build pattern from squad-test.yml Fixes Aragorn's PR #274 review blockers #1 and #4. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
| - name: Build test projects | ||
| run: | | ||
| dotnet build tests/Architecture.Tests --configuration Release --no-restore | ||
| dotnet build tests/Domain.Tests --configuration Release --no-restore | ||
| dotnet build tests/Web.Tests.Bunit --configuration Release --no-restore | ||
| dotnet build tests/Persistence.MongoDb.Tests --configuration Release --no-restore | ||
| dotnet build tests/Web.Tests --configuration Release --no-restore | ||
| dotnet build tests/Persistence.AzureStorage.Tests --configuration Release --no-restore |
| dotnet build tests/Architecture.Tests --configuration Release --no-restore | ||
| dotnet build tests/Domain.Tests --configuration Release --no-restore | ||
| dotnet build tests/Web.Tests.Bunit --configuration Release --no-restore | ||
| dotnet build tests/Persistence.MongoDb.Tests --configuration Release --no-restore | ||
| dotnet build tests/Web.Tests --configuration Release --no-restore | ||
| dotnet build tests/Persistence.AzureStorage.Tests --configuration Release --no-restore |
| --- | ||
| date: 2026-05-04 | ||
| author: boromir | ||
| status: active | ||
| --- |
| - **Problem:** Dependabot bumped Azure.Storage.Blobs from 12.20.0 to 12.27.0 in PR #276 | ||
| - **Impact:** Persistence.AzureStorage.Tests.Integration failed with: `The API version 2026-02-06 is not supported by Azurite` | ||
| - **Root Cause:** Azure.Storage.Blobs 12.27.0 uses API version 2026-02-06, but Testcontainers.Azurite 4.11.0 bundles Azurite 3.35.0 which only supports up to 2024-11-04 | ||
| - **Azurite Lag:** Azurite emulator typically lags behind Azure Storage service API versions by several months (tracked in Azure/Azurite#2623) |
🚨 Review Blockers - Changes Requested❌ Squad hygiene violation: .squad/ files on feature branch The PR includes changes to:
Per team convention, Fix required: git checkout origin/dev -- .squad/
git commit -m "fix: revert .squad/ pollution"
git pushTechnical Review (✅ Approved after fix)✅ Job Isolation
✅ TreatWarningsAsErrors
✅ CI StatusAll 20 checks passing including Aspire + Playwright E2E ✅ Performance
Once .squad/ files are reverted, this is ready to merge. — Aragorn (Lead) |
Summary
squad-preview.ymlinto dedicated build, fast-test, integration-test, and AppHost jobsAppHost.Testsin its own isolated job with the Aspire environment variables already proven in PR CIsquad-test.ymlstructureRoot cause
After merging #273, the
devpreview workflow still failed inAppHost.TestswithSystem.TimeoutException: Web app at https://localhost:7043/ was not ready after 120s. The prior change isolated AppHost into a separate command, but it still ran inside the same job without the AppHost-specific environment that the working PR CI path uses. This PR moves AppHost preview validation to its own job and adds the required Aspire environment variables.Testing
tests/AppHost.Tests/AppHost.Tests.csprojCo-authored-by: Copilot 223556219+Copilot@users.noreply.github.com