cloudfoundry / cloudfoundry/cloud_controller_ng

V3 process scaling contradicts V3 documentation

Open
#2,464 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

open for contribution
Dominant language
Ruby
Stars
207
Forks
373
Avg merge
2d 12h
Merged PRs (30d)
56

Description

Thanks for submitting an issue to cloud_controller_ng. We are always trying to improve! To help us, please fill out the following template.

Issue

(There may be other places this happens)

Either Documentation for V3 async opertations is incorrect or POST v3/processes/:guid/actions/scale is not functioning as intended

Documentation says "Instead, endpoints that require asynchronous processing will return 202 Accepted with a Location header pointing to the job resource to poll."

But scaling an app using v3/processes/:guid/actions/scale returns a 202 Accepted with a body and NO Location header.

Context

REQUEST: [2021-08-13T10:50:26-07:00]
POST /v3/apps/a5f34799-4326-48a5-927e-b048d1cb6f2e/processes/web/actions/scale HTTP/1.1
Host: api.domain.com
Accept: application/json
Authorization: [PRIVATE DATA HIDDEN]
Content-Type: application/json
User-Agent: cf7.exe/7.2.0+be4a5ce2b.2020-12-10 (go1.13.15; amd64 windows)
{​​​​​
  "instances": 4
}​​​​​

RESPONSE: [2021-08-13T10:50:26-07:00]
HTTP/1.1 202 Accepted
Content-Type: application/json; charset=utf-8
Date: Fri, 13 Aug 2021 17:50:27 GMT
Referrer-Policy: strict-origin-when-cross-origin
Server: nginx
X-B3-Spanid: f6b8454df3e2c2a5
X-B3-Traceid: f6b8454df3e2c2a5
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Frame-Options: SAMEORIGIN
X-Permitted-Cross-Domain-Policies: none
X-Runtime: 0.189949
X-Vcap-Request-Id: 474b893c-cb0d-4039-415f-04b71b8f6876::c6c953ad-2c2e-44af-b9e7-cc06fab46559
X-Xss-Protection: 1; mode=block
{​​​​​
  "command": "$HOME/.bp/bin/start",
  "created_at": "2021-08-02T18:08:59Z",
  "disk_in_mb": 512,
  "guid": "a5f34799-4326-48a5-927e-b048d1cb6f2e",
  "health_check": {​​​​​
    "data": {​​​​​
      "invocation_timeout": null,
      "timeout": null
    }​​​​​,
    "type": "port"
  }​​​​​,
...
}​​​​​

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 by comparing the V3 asynchronous-operations documentation with the POST /v3/processes/:guid/actions/scale endpoint behavior described here. Trace the endpoint implementation and its tests to determine whether the missing Location header is intentional; done means the endpoint and documentation consistently describe and implement the 202 response.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.