cloud_controller_ng
cloud_controller_ng copied to clipboard
Uploading packages should return a Location header with a link to a job resource
Package upload already uses a delayed job to handle the upload:
https://github.com/cloudfoundry/cloud_controller_ng/blob/a07e31411712d3ee196f26032f087ab84949cd53/app/controllers/v3/packages_controller.rb#L63-L68
Clients likely already have mechanisms for polling job resources returned from other async endpoints. It would make their lives easier if the CC returned a Location header pointing to a job resources that they can poll to see when the upload completes (instead of having to write a custom poller for packages). This will also match the proposed behavior for v3 buildpack uploads: https://www.pivotaltracker.com/story/show/162669794
One thing that might complicate this is the Bits Service. If clients are uploading the package directly to the Bits Services, then they will currently not get a job on the CC to poll.
We have created an issue in Pivotal Tracker to manage this:
https://www.pivotaltracker.com/story/show/163202531
The labels on this github issue will be updated when the story is started.
@Gerg now that the bits service is kaput, is this now less complicated to do?
@selzoc Yea, I'd imagine this is now the same behavior as POST /v3/buildpacks/:guid/upload