-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Buildpack API >= 0.6 requires layer to define default process type #67
Comments
Workaround for now: In
Edit: this still doesn't work because of the change to:
|
@samatcd Thank you for filing this, and sorry for missing this breaking change during #66. I hadn't realised that this buildpack even read the procfile, since in the Heroku builders we use the actual heroku/procfile CNB. So it seems a bit unfortunate that cnb-shim duplicates the Procfile CNB: Lines 25 to 45 in 90c6e67
https://github.com/heroku/procfile-cnb/blob/cd7f0b49f5c907955f2275d9b7f2ad808e43409e/src/launch.rs#L5-L35 To resolve the default process type issue, we'd need to duplicate yet more of the implementation from the Procfile CNB. Whilst it wouldn't take long to do that, I wonder whether longer term we'd be better off removing cnb-shim's own procfile handling, and instead either:
|
Ahh yes, interesting. It definitely doesn't make sense to maintain this in two places. My initial thought would be to implement option 2: Have cnb-shim add |
So looking closer, even if we removed the part of cnb-shim that duplicates the procfile CNB, we'd still need some processes handling in CNB shim, since it needs to support the (Which is implemented here: Lines 20 to 33 in 90c6e67
Another issue I found is that cnb-shim uses
This all means the time investment to resolve this issue has now increased to the point where it's not something I have time to fix now, so instead will be rolling back #66 and accepting that cnb-shim will cause deprecation warnings again (when used with Longer term, we'll need to decide what the future of cnb-shim should be. The codebase is in a not so great state, it doesn't have integration tests, it allows users to customise the API version but yet doesn't have the architecture to support multiple API versions at once, the server is not properly productionised etc. One option would be for us to write a newer, simpler implementation that leverages our existing investment in libcnb.rs. |
This reverts commit 90c6e67 to resolve #67. For more details, see: #67 (comment) GUS-W-13054347.
This has been resolved by reverting the change in default buildpack API version in #68. I've filed #69 for tracking resolving the deprecation warnings (that were the reason for the update in default Buildpack API version in the first place) longer term. In the meantime, if anyone wants to use the newer buildpack API version (with the understanding that it's not fully supported yet, per the OP here), they can override the default by using |
The
cnb-shim
was updated from buildpack API version 0.4 to version 0.8 as part of this commit:90c6e67
As part of the API upgrade notes from 0.5 -> 0.6, it's noted that the API will no longer set the default process type to
web
, and that buildpacks should contribute a default type themselves inlaunch.toml
.https://buildpacks.io/docs/reference/spec/migration/buildpack-api-0.5-0.6/#buildpacks-contribute-default-process-type
We use GitLab
auto-build-image
withcnb-shim
to build PHP applications using the heroku php buildpack — the shim doesn't seem to set the default process type inlaunch.toml
and unfortunatelyauto-build-image
doesn't allow us to pass a--default-process
argument to thepack
command, so we're a little stuck.Is there any way to update the
cnb-shim
to set the default process?The text was updated successfully, but these errors were encountered: