cyberark / cloudfoundry-conjur-buildpack

Buildpack for the Conjur / Cloud Foundry integration
Apache License 2.0
0 stars 3 forks source link

Online buildpack failing with error "does not support multi-buildpack apps" #102

Closed izgeri closed 3 years ago

izgeri commented 3 years ago

Summary

Using the online buildpack fails with the error:

 ERR Error: one of the buildpacks chosen to supply dependencies does not support multi-buildpack apps

Steps to Reproduce

  1. Clone this project and change to the tests/integration/apps/ruby directory.

  2. Add a file manifest.yml which contains

    ---
    applications:
    - name: ruby-app
      env:
        CONJUR_BUILDPACK_BYPASS_SERVICE_CHECK: true
      buildpacks:
      - https://github.com/cyberark/cloudfoundry-conjur-buildpack
      - ruby_buildpack
  3. cf push from the Ruby app directory

Expected Results

The app should successfully push and when you visit the app in the browser you should see:

      <h1>Visit us @ www.conjur.org!</h1>

      <h3>Space-wide Secrets</h3>
      <p>Database Username: space_username</p>
      <p>Database Password: space_password</p>

Actual Results (including error logs, if applicable)

The app fails to be staged on cf push:

$ cf push
Pushing from manifest to org geri-org / space geri-space as admin...
Using manifest file /Users/gjennings/Documents/repos/pcf/buildpack/tests/integration/apps/ruby/manifest.yml
Getting app info...
Creating app with these attributes...
+ name:         ruby-app
  path:         /Users/gjennings/Documents/repos/pcf/buildpack/tests/integration/apps/ruby
  buildpacks:
+   https://github.com/cyberark/cloudfoundry-conjur-buildpack
+   ruby_buildpack
  env:
+   CONJUR_BUILDPACK_BYPASS_SERVICE_CHECK
  routes:
+   ruby-app.apps.pcf.itd.conjur.net

Creating app ruby-app...
Mapping routes...
Comparing local files to remote cache...
Packaging files to upload...
Uploading files...
 2.19 KiB / 2.19 KiB [==============================================] 100.00% 1s

Waiting for API to complete processing files...

Staging app and tracing logs...
   Downloading ruby_buildpack...
   Downloaded ruby_buildpack
   Cell f285e943-6329-44c3-a703-4c6cf25cf19b creating container for instance cff4f7e6-9269-4a54-b07e-5db1278d7dd0
   Cell f285e943-6329-44c3-a703-4c6cf25cf19b successfully created container for instance cff4f7e6-9269-4a54-b07e-5db1278d7dd0
   Downloading app package...
   Downloaded app package (2.2K)
Error staging application: Staging error: staging failed
FAILED

When you look at the app logs, you see:

ruby$ cf logs ruby-app
Retrieving logs for app ruby-app in org geri-org / space geri-space as admin...

   2020-12-21T10:50:45.14-0500 [STG/0] OUT Downloaded app package (2.2K)
   2020-12-21T10:50:45.68-0500 [STG/0] ERR Error: one of the buildpacks chosen to supply dependencies does not support multi-buildpack apps
   2020-12-21T10:50:45.70-0500 [STG/0] OUT Exit status 225
   2020-12-21T10:50:45.83-0500 [STG/0] OUT Cell f285e943-6329-44c3-a703-4c6cf25cf19b stopping instance cff4f7e6-9269-4a54-b07e-5db1278d7dd0
   2020-12-21T10:50:45.83-0500 [STG/0] OUT Cell f285e943-6329-44c3-a703-4c6cf25cf19b destroying container for instance cff4f7e6-9269-4a54-b07e-5db1278d7dd0
   2020-12-21T10:50:45.93-0500 [API/0] ERR Failed to stage build: staging failed
   2020-12-21T10:50:46.12-0500 [STG/0] OUT Cell f285e943-6329-44c3-a703-4c6cf25cf19b successfully destroyed container for instance cff4f7e6-9269-4a54-b07e-5db1278d7dd0

In preparation for #101 there is a copy of the latest release in the latest branch; if you update the manifest to refer to https://github.com/cyberark/cloudfoundry-conjur-buildpack#latest, it works as expected.

Reproducible

Version/Tag number

The online buildpack uses the latest code on master.

Environment setup

This test case was run in TAS 2.10, but should function the same on other earlier TAS versions.

Additional Information

Add any other context about the problem here.

izgeri commented 3 years ago

To address this, we need to update the code on master so that it works with the online version of the buildpack. We also need to add some test cases against the online buildpack to ensure it continues to function as expected.

izgeri commented 3 years ago

See #101 for our plans to maintain a stable latest branch consistent with our releases of this project for online buildpack usage.