Open j-windsor opened 4 years ago
Buildpacks need both a requirements.txt
that indicates that it's a Python project and a Procfile
that indicates the entrypoint. skaffold init
mimics that behaviour and requires those two files. That's not convenient but we can't really do better right now. We'd have to improve the buildpacks so that they sometimes guess the python entrypoint.
A behaviour that is better with Buildpacks alone is that if you run a build in a Python project that only has a requirements.txt
but no Procfile
, it should give you a clear error message. skaffold init
doesn't
I feel like we could at least put the requirements in documentation somewhere if it is not already.
I wonder if we could change the way skaffold init
works for Python projects and assume a project with only a requirements.txt
is a valid Python project. When the user first builds that project, it would fail if there's no Procfile
but at least, the message would clearly state what needs fixing.
It would maybe be more aligned with users' expectations.
@briandealwis wdyt?
It does feel like init
should provide a list of caveats + suggested remedies for prospective artifacts.
Expected behavior
Cloud Code python samples (k8s and Cloud Run) do not work out of the box with skaffold buildpack builders, and it is unclear how a python project needs to be architected to cause skaffold to detect buildpacks as a builder.
It looks like this is a more general GCP buildpacks issue as well. https://github.com/GoogleCloudPlatform/buildpacks/issues/45
Information