cloudfoundry / cloudfoundry/cloud_controller_ng

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

Open
#1,279 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

needs_capi_investigation unscheduled
Dominant language
Ruby
Stars
207
Forks
373
Avg merge
2d 12h
Merged PRs (30d)
56

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with app/controllers/v3/packages_controller.rb at lines 63-68 and trace both the delayed upload path and the direct Bits Service path. Compare how other asynchronous endpoints expose job resources and determine the expected behavior when the Bits Service is involved. Done means package uploads return a usable Location header when a Cloud Controller job exists, with the Bits Service case explicitly handled.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.