Skip to content

Conversation

@ivanovac
Copy link
Contributor

@ivanovac ivanovac commented Dec 8, 2025

What is this change?

This PR upgrades the nodejs-buildpack to use switchblade v0.9.2, which adds proper support for CF API v3 staging log capture.

Why was this change made?

When migrating to CF API v3, staging failure logs are no longer automatically captured in the logs buffer during test execution. Switchblade v0.9.2 addresses this by automatically fetching logs using cf logs --recent when staging fails, which is essential for tests that verify buildpack error messages (like the override buildpack test).

Changes included

Dependencies

  • switchblade: v0.9.1 → v0.9.2-0.20251205151235-f452557fbc4b

Test Updates

  • override_test.go: Simplified log assertions and removed complex matchers
    • Now uses direct string checks instead of ContainLines matchers
    • Added comment explaining automatic log fetching behavior
    • Validates that staging fails with expected error message

Tooling

  • tools.sh: Check for existing CF CLI before attempting installation
    • Allows use of system/Docker image CF v8 CLI
    • Removes forced CF v6 installation that's incompatible with modern CF deployments

Testing

Integration tests pass locally using fly execute with BBL environment:

  • Override test: ✅ Correctly captures staging failure logs
  • Proxy tests: ✅ Pass with CF API v3

Related Work

This change follows the same pattern used in r-buildpack PR for CF API v3 migration.

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