Closed stephanme closed 3 years ago
We have created an issue in Pivotal Tracker to manage this:
https://www.pivotaltracker.com/story/show/175393047
The labels on this github issue will be updated when the story is started.
I followed up with the buildpacks team and it sounds like it's expected that some buildpacks will not return process types or start commands. Based on that, CC should handle this case more gracefully, especially if there is already a start command provided on via the API/manifest.
It is interesting to note the problem is fixed by simply specifying the process type in the Procfile as follows without any commands
web:
In this case the command
in the manifest is honored. Probably better to do it this way to ensure you don't have one set of commands in the manifest overwrite the one in Procfile (or other way around).
This issue was addressed in capi-release 1.105. Thank you for raising this issue!
Issue
Pushing a simple Python app fails with cf7 when specifying the start command in manifest or on cmd line. In contrast to the documentation https://docs.cloudfoundry.org/buildpacks/python/index.html#start-command, a Procfile seems to be required.
Context
Simple python-hello app (attached):
PORT = 8080
Handler = http.server.SimpleHTTPRequestHandler
with socketserver.TCPServer(("", PORT), Handler) as httpd: print("serving at port", PORT) httpd.serve_forever()
applications:
Same example works with cf6.
Colleagues report the same problem for nodejs apps. Therefore, I don't think that it is a buildpack issue but more related to CC v3.
https://docs.cloudfoundry.org/buildpacks/python/index.html#start-command refers to https://www.pivotaltracker.com/n/projects/966314/stories/132190561 which states:
(https://github.com/cloudfoundry/cloud_controller_ng/commit/a0fc3c36bc0d34c7cdd7c2e17a872e60af12d029)
Steps to Reproduce
cf7 login
cf7 push
-> failes with "StagingError - Staging error: No process types returned from stager" (see logs below)cf7 push --no-manifest -c 'python3 server.py' --random-route -m 128M -b python_buildpack python-hello
-> fails as wellcf6 push
succeedsWhen adding a Procfile to the app,
cf7 push
succeeds as well:Expected result
cf7 push succeeds without Procfile. I.e. same behavior as for cf6.
Current result