cloudfoundry / python-buildpack

Cloud Foundry buildpack for the Python Language
http://docs.cloudfoundry.org/buildpacks/
Apache License 2.0
121 stars 279 forks source link

Vendor Python Dependencies Not Working #157

Closed austinlele closed 4 years ago

austinlele commented 4 years ago

What version of Cloud Foundry and CF CLI are you using? (i.e. What is the output of running cf curl /v2/info && cf version? cf.exe version 6.47.2+d526c2cb3.2019-11-05

What version of the buildpack you are using? python-3.7.5

If you were attempting to accomplish a task, what was it you were attempting to do? Trying to cf push a simple Python app behind a corporate proxy. Attempted to use downloaded .tar.gz non binary dependencies (python modules)

What did you expect to happen? The dependencies to be installed via pip install ... or similar

What was the actual behavior? No module was installed during cf push

LOG:

Pushing from manifest to org PCF-Platform-Team-Org / space pcf-alerts as admin...
Using manifest file C:\Code\pivotal\platform-automation\maintenance-scripts\pcf-alerts\manifest.yml
Deprecation warning: Use of 'buildpack' attribute in manifest is deprecated in favor of 'buildpacks'. Please see https://docs.cloudfoundry.org/devguide/deploy-apps/manifest-attributes.html#deprecated for alternatives and other app manifest deprecations. This feature will be removed in the future.

Getting app info...
Updating app with these attributes...
  name:                pcf-alerts
  path:                C:\Code\pivotal\platform-automation\maintenance-scripts\pcf-alerts
  buildpacks:
    python_buildpack
  command:             python event_webhook.py
  disk quota:          512M
  health check type:   port
  instances:           1
  memory:              256M
  stack:               cflinuxfs3
  routes:
    pcf-alerts.cfapps.sandbox.pcf.theprincipal.net

Updating app pcf-alerts...
Mapping routes...
Comparing local files to remote cache...
Packaging files to upload...
Uploading files...
 71.82 KiB / 71.82 KiB [======================================================================================================================================================================================================] 100.00% 1s

Waiting for API to complete processing files...

Stopping app...

Staging app and tracing logs...
   Cell 29370240-d7fa-418b-a962-af17c490bbaf stopping instance 8d49abab-dfa0-411d-9437-615b9d58f515
   Exit status 143
   Cell 29370240-d7fa-418b-a962-af17c490bbaf destroying container for instance 8d49abab-dfa0-411d-9437-615b9d58f515
   Downloading python_buildpack...
   Downloaded python_buildpack
   Cell 29370240-d7fa-418b-a962-af17c490bbaf creating container for instance 7a69d8eb-1a0c-47c3-b327-c805893e281a
   Cell 29370240-d7fa-418b-a962-af17c490bbaf successfully created container for instance 7a69d8eb-1a0c-47c3-b327-c805893e281a
   Cell 29370240-d7fa-418b-a962-af17c490bbaf successfully destroyed container for instance 8d49abab-dfa0-411d-9437-615b9d58f515
   Downloading app package...
   Downloading build artifacts cache...
   Downloaded build artifacts cache (220B)
   Downloaded app package (2.1M)
   -----> Python Buildpack version 1.7.2
   -----> Supplying Python
   -----> Installing python 3.7.5
          Copy [/tmp/buildpacks/dd795db48db7c49c3b22867c53145220/dependencies/c10c0b6c4e405e7f80953c02e8c2663b/python-3.7.5-linux-x64-cflinuxfs3-4d634795.tgz]
   -----> Installing pip-pop 0.1.4
          Copy [/tmp/buildpacks/dd795db48db7c49c3b22867c53145220/dependencies/1cd0187e0e714e99bef932d4c22f6515/pip-pop-0.1.4-0a3b0f1b.tar.gz]
   -----> Running Pip Install
   No start command specified by buildpack or via Procfile.
   App will not start unless a command is provided at runtime.
   Exit status 0
   Uploading droplet, build artifacts cache...
   Uploading droplet...
   Uploading build artifacts cache...
   Uploaded build artifacts cache (222B)
   Uploaded droplet (53.2M)
   Uploading complete
   Cell 29370240-d7fa-418b-a962-af17c490bbaf stopping instance 7a69d8eb-1a0c-47c3-b327-c805893e281a
   Cell 29370240-d7fa-418b-a962-af17c490bbaf destroying container for instance 7a69d8eb-1a0c-47c3-b327-c805893e281a

Waiting for app to start...
Start unsuccessful

TIP: use 'cf.exe logs pcf-alerts --recent' for more information
FAILED

Please confirm where necessary:

cf-gitbot commented 4 years ago

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/170758916

The labels on this github issue will be updated when the story is started.

ForestEckhardt commented 4 years ago

@austinlele With the details you have provided it is hard for us to try and reproduce this error. We have fixture apps that give examples as to how a vendored app should look (for an example you can take a look at this app https://github.com/cloudfoundry/python-buildpack/tree/master/fixtures/flask). For the vendored dependencies to be discovered they must be located in a folder called vendor at the root of this app.

If you could fill us in with some more details, such as the structure of you app and the requirements.txt, that would help us in locating the source of your problem.

ryanmoran commented 4 years ago

Closing due to inactivity. Feel free to reopen this with more details.