cloud_controller_ng icon indicating copy to clipboard operation
cloud_controller_ng copied to clipboard

Uploading packages should return a Location header with a link to a job resource

Open Gerg opened this issue 6 years ago • 3 comments

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.

Gerg avatar Jan 14 '19 18:01 Gerg

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.

cf-gitbot avatar Jan 14 '19 18:01 cf-gitbot

@Gerg now that the bits service is kaput, is this now less complicated to do?

selzoc avatar Jul 30 '20 18:07 selzoc

@selzoc Yea, I'd imagine this is now the same behavior as POST /v3/buildpacks/:guid/upload

Gerg avatar Jul 30 '20 21:07 Gerg