-
Notifications
You must be signed in to change notification settings - Fork 362
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
Unusable Buildpacks If Upload Fails #1625
Comments
We have created an issue in Pivotal Tracker to manage this: https://www.pivotaltracker.com/story/show/173038631 The labels on this github issue will be updated when the story is started. |
Hello @johha ! Thanks for bringing this to our attention. We (@matt-royal and I) are currently working on introducing an error message if a user attempts to push an app with an unavailable buildpack. We're also planning to introduce a filter to the |
we've fixed the error to be more specific:
|
^ we created this issue on the CLI to further improve unready buildpack visibility |
Hello @cwlbraa , thanks for taking care. Better error messages are good first step. But is it also possible to to handle cf create/update-buildpack in a sort-of transactional manner? This is especially important for cf update-buildpack because otherwise there is a risk of cf-push outages when e.g. the upload of a new version of the java-buildpack fails (which happens for us as part of an unattended landscape update). |
I think the way large file uploads are handled (by nginx and separate worker process) would make it very difficult to get those uploads inside of a DB transaction. We hopefully won't have this problem in cf-for-k8s, though, as we're decoupling the registry upload and the buildpacks list configuration change. Neither will be edited via the CF API, but in the container registry and k8s directly. |
The changes we made to cloud_controller_ng were causing database deadlock errors, so we reverted the original work. We should be able to revisit this next week and hopefully will be able to find a way to add the validation without causing deadlocks. |
This issue should be resolved in capi-release 1.96 |
Thanks for improving the error message! |
in the comments above: cloudfoundry/cli#1952 |
Issue
If a buildpack is uploaded (via CC API or CF-CLI) and the bits upload fails (e.g. due to network issues) the buildpack will be still listed by
cf buildpacks
and seems usable. However the buildpack is not usable and push operations will fail withUnsupported buildpack type
.This can also lead to issues when updating an existing buildpack. In that case the error can be even more confusing as the buildpack worked before.
Context
This is relevant for foundries in landscapes where there is only limited internet access and thus offline buildpacks are needed.
Steps to Reproduce
Create Buildpack with CF CLI (cancel while uploading bits)
$ cf create-buildpack test_buildpack bp.zip 100 Creating buildpack test_buildpack as provisioned_user_cf_admin... OK Uploading buildpack test_buildpack as provisioned_user_cf_admin... 1.56 MiB / 1.01 GiB [>----------------------------------------------------------------------------------------------------------------------------] 0.15%^C
Alternatively buildpack can be created with v3 API (v2 shows the same behavior).
Uploading of bits can be neglected as the error is the same.
Push app
Expected result
I would expect that the buildpack can't be used at all and is not shown under
cf-buildpacks
.Furthermore the error message does not indicate an issue with the buildpack but instead rather indicates an app issue.
Current result
Stager error: Unsupported buildpack type: 'test_buildpack'
Possible Fix
Correct/better behavior would be to make a buildpack first available for usage (
cf-buildpacks
) after the bits are uploaded/available.The text was updated successfully, but these errors were encountered: