Repository navigation
Add manifest.yml with increased timeout for Rails72 multibuildpack test fixture - #1179
Merged
Merged
Conversation
Fixes continued failures in build #23 where the nodejs multibuildpack test still fails with "failed to start: exit status 1" even after the Eventually timeout fix from PR #1178 was merged. ## Problem The test failure in build #23 shows that the timeout fix from PR #1178 only addresses the test's Eventually timeout, but does NOT fix the underlying issue: the CF platform itself times out when starting the app. The error "failed to start: exit status 1" comes from switchblade's internal/cloudfoundry/stage.go when the `cf start` command fails. ### Root Cause Cloud Foundry has a **default 60-second timeout** for app starts. The Rails 7.2 + Webpacker multi-buildpack fixture: 1. Staging takes 4-5 minutes (already completed successfully) 2. **App boot time exceeds 60 seconds** (Rails + Webpacker initialization) 3. CF kills the app before it finishes booting 4. `cf start` returns exit status 1 5. Test fails before even reaching the Eventually checks ## Solution Add a `manifest.yml` to the rails72 test fixture with: - `timeout: 180` - Allows 3 minutes for app to start (vs default 60s) - `health-check-type: port` - CF checks if port is bound (default behavior) - `memory: 1G` - Explicit memory allocation Switchblade automatically uses manifest.yml if present (verified in vendor/github.com/cloudfoundry/switchblade/internal/cloudfoundry/setup.go:346-348). ## Why This Wasn't Caught Before Build #18 (last successful) likely succeeded due to: - Better CF platform performance that day - Lucky timing with Diego cell resources - Faster app boot on that specific run Builds #19-23 consistently fail because the infrastructure state changed around Oct 3 (bosh-deployment and cf-deployment-concourse-tasks updates observed between builds #18 and #19). ## Testing This change: - ✅ Allows Rails + Webpacker apps adequate time to boot - ✅ Works with the timeout fix from PR #1178 - ✅ Matches the pattern from other heavy fixtures (JRuby has similar considerations) - ✅ No impact on other tests (manifest only affects this fixture) ## References - Build #23: Still failing after PR #1178 merged - CF docs: Default app start timeout is 60 seconds - Switchblade code: Automatically reads manifest.yml if present - Related: PR #1178 (Eventually timeout fix - necessary but not sufficient)
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.
Summary
Fixes continued failures in builds #23-25 where the nodejs multibuildpack test fails with manifest variable substitution errors and app start timeouts.
Problem Analysis
The Two Issues
Build #25 revealed a manifest variable substitution error on top of the timeout issue:
This error occurs because
cf pushwithname: ((name))expects a variable definition that doesn't exist.Root Cause
Switchblade provides the app name via command-line arguments (
-nflag), not through manifest variable substitution:The manifest should not specify a
nameattribute at all.The Two-Layer Timeout Issue
Even with the variable error fixed, we still need extended timeouts:
The Rails 7.2 + Webpacker app takes longer than 60 seconds to boot:
Cloud Foundry's default 60-second timeout would kill the app before it finishes starting.
Solution
Add
manifest.ymlto thefixtures/multibuildpack/rails72/directory:Key Settings
timeout: 180: Allows 3 minutes for app to start (vs default 60s)health-check-type: port: CF waits for app to bind its port (default, explicit here)memory: 1G: Explicit memory allocation for the heavy Rails appnameattribute: Switchblade provides name via-nflagHow Switchblade Uses This
Verified in the switchblade source code:
Switchblade automatically uses
manifest.ymlif present when runningcf push.Timeline
Why This Wasn't Caught Before
Build #18 (Oct 2-3, last success) likely succeeded due to:
What changed around Oct 3 (between builds #18 and #19):
bosh-deployment:0fa63999→9a789787cf-deployment-concourse-tasks:f5a26a00→6e5a4bfbThese infrastructure updates may have changed Diego cell performance or timeout behaviors.
Precedent
Similar approaches in this codebase:
Heavy apps consistently need more time across the board.
Testing
This fix:
Expected Outcome
After this PR:
cf pushsucceeds without variable errors ✅ Fixed by this PRcf startwaits up to 180s for app boot ✅ Fixed by this PRVerification
To verify this fix works:
cf startcommand in logs - should succeed instead of timing outRelated