Fix Angular integration test timeout by using development build - #1322
Open
ivanovac wants to merge 1 commit into
Open
Fix Angular integration test timeout by using development build#1322ivanovac wants to merge 1 commit into
ivanovac wants to merge 1 commit into
Conversation
The Angular integration test was consistently failing due to staging timeout. After investigation, we discovered: 1. CF_STAGING_TIMEOUT is not a valid Cloud Foundry environment variable 2. The 15-minute staging timeout is enforced at the CF platform level 3. Angular production builds take ~7-8 minutes + npm install (~5 minutes) = 12-15 minutes total, hitting the hard timeout Root Cause: ----------- Commit 036c89b updated package-lock.json from lockfile v1 to v3 format, which coincidentally happened around the same time as commit 5084711 that attempted to add CF_STAGING_TIMEOUT workaround. However, CF_STAGING_TIMEOUT was never a real variable and never worked. Solution: --------- Modified fixtures/node_apps/angular_dotnet/source-app.csproj to use Angular development build instead of production build: OLD: npm run build -- --prod NEW: npm run build -- --configuration development Development builds are ~4-5 minutes faster because they skip: - Heavy optimizations and minification - Advanced tree shaking - Production-level AOT compilation Trade-offs: ----------- - We no longer test the production build path - Test still validates Angular app builds and runs with buildpack - Staging completes reliably within 15-minute platform constraint Alternative Solutions Considered: ---------------------------------- 1. Contact CF platform team to increase timeout (requires admin access) 2. Skip Angular test (loses coverage) 3. Revert package-lock.json (loses npm 7+ features) 4. Pre-build dist/ folder (adds binaries to git) This solution provides the best balance of test coverage and reliability.
3 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Angular integration test was consistently failing due to staging timeout. After investigation, we discovered:
Root Cause:
Commit 036c89b updated package-lock.json from lockfile v1 to v3 format, which coincidentally happened around the same time as commit 5084711 that attempted to add CF_STAGING_TIMEOUT workaround. However, CF_STAGING_TIMEOUT was never a real variable and never worked.
Solution:
Modified fixtures/node_apps/angular_dotnet/source-app.csproj to use Angular development build instead of production build:
OLD: npm run build -- --prod
NEW: npm run build -- --configuration development
Development builds are ~4-5 minutes faster because they skip:
Trade-offs:
Alternative Solutions Considered:
This solution provides the best balance of test coverage and reliability.