Skip to content

Fix manifest.yml variable substitution error in Rails72 multibuildpack test - #1180

Merged
tnikolova82 merged 1 commit into
masterfrom
add-manifest-for-rails72-timeout
Oct 11, 2026
Merged

tnikolova82 merged 1 commit into
masterfrom
add-manifest-for-rails72-timeout

Conversation

@tnikolova82

Copy link
Copy Markdown
Contributor

Summary

Fixes the manifest variable substitution error that caused build #25 to fail immediately with "Expected to find variables: name".

This is a follow-up fix to PR #1179 which added the manifest.yml file but incorrectly used name: ((name)) variable syntax.

Problem

Build #25 failed with:

Expected to find variables: name
FAILED

The manifest.yml file contained:

---
applications:
- name: ((name))
  memory: 1G
  timeout: 180
  health-check-type: port

The name: ((name)) syntax tells cf push to expect a variable called name to be defined, but switchblade doesn't use CF's variable substitution mechanism.

Root Cause

Switchblade provides the app name via command-line arguments, not manifest variables:

// vendor/github.com/cloudfoundry/switchblade/internal/cloudfoundry/setup.go
args = append(args, "-n", appName)  // Name provided via CLI flag
args = append(args, "-f", filepath.Join(source, "manifest.yml"))  // Manifest for other settings

When CF sees name: ((name)) in the manifest, it expects a variable definition that doesn't exist, causing the push to fail.

Solution

Remove the name attribute from the manifest entirely:

---
applications:
- memory: 1G
  timeout: 180
  health-check-type: port

Let switchblade provide the app name via the -n flag as it already does.

Why This Matters

This fix is required for the timeout fix in PR #1179 to work. The manifest.yml exists to set the timeout: 180 value (extending CF's app start timeout from 60s to 180s), but the variable substitution error prevented cf push from even starting.

Testing

The manifest now:

  • ✅ Sets timeout: 180 to allow Rails 7.2 + Webpacker app to boot (takes >60s)
  • ✅ Sets memory: 1G for explicit memory allocation
  • ✅ Sets health-check-type: port for CF health checking
  • ✅ Omits name attribute, letting switchblade provide it via CLI
  • ✅ No variable substitution errors

Complete Fix

This PR combines with PR #1178 and PR #1179 to fully fix the multibuildpack test failures:

  1. PR Fix multibuildpack integration test timeouts (builds #19-22 failures) #1178 (merged): Extended Gomega Eventually timeout to 90s
  2. PR Add manifest.yml with increased timeout for Rails72 multibuildpack test fixture #1179 (merged): Added manifest.yml with timeout: 180
  3. This PR: Fixed manifest.yml variable substitution error

All three are needed:

Verification

Build #26 is running with this fix. Expected outcome:

  1. cf push succeeds without variable errors ✅
  2. App stages in 4-5 minutes ✅
  3. CF waits up to 180s for app to start ✅
  4. App boots and binds port ✅
  5. Test checks pass within 90s ✅
  6. Test succeeds ✅

Related

Timeline

Build Status Issue
#19-22 ❌ Failed Insufficient timeouts
#23 ❌ Failed Only test timeout fixed
#24 🔴 Errored Docker Hub outage
#25 ❌ Failed Manifest variable error
#26 🔄 Running All three fixes applied

Build #25 failed with "Expected to find variables: name" because the
manifest.yml used ((name)) variable syntax which cf push doesn't
automatically substitute.

Switchblade provides the app name via the -n flag when calling cf push,
so the manifest should not specify a name attribute at all.

This fixes the "failed to push: exit status 1" error that was failing
all nodejs multibuildpack tests in 12-20 seconds.
@tnikolova82
tnikolova82 merged commit 960bb9f into master Oct 11, 2026
1 check passed
@tnikolova82
tnikolova82 deleted the add-manifest-for-rails72-timeout branch October 11, 2026 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant