cloudfoundry / cloudfoundry/cloud_controller_ng

[BUG] Generate manifest api schema inconsistency for services

Open
#3,683 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Issue

Generate manifest schema inconsistency for services

Context

On call to "/v3/apps/$GUID/manifest" api returns the services as array of strings when expected was array of objects.
This inconsistency creates problem for strongly typed clients.

Steps to Reproduce

cf push

applications:
- name: http-bin
  docker:
    image: kennethreitz/httpbin
  services:
  - name: xsuaa-tf
  processes:
  - type: web
    disk_quota: 1024M
    health-check-type: http
    health-check-http-endpoint: /get
    instances: 1
    memory: 256M
    readiness-health-check-type: http
    readiness-health-check-http-endpoint: /get

export GUID=$(cf app http-bin --guid)
cf curl "/v3/apps/$GUID/manifest"

---
applications:
- name: http-bin
  docker:
    image: kennethreitz/httpbin
  services:
  - xsuaa-tf
  processes:
  - type: web
    instances: 1
    memory: 256M
    disk_quota: 1024M
    log-rate-limit-per-second: -1
    health-check-type: http
    health-check-http-endpoint: "/get"
    readiness-health-check-type: http
    readiness-health-check-http-endpoint: "/get"

Expected result

I would expect the returned schema to have services as

  services:
  - name: xsuaa-tf

Current result

Currently we are getting array of strings even when we are pushing it as an array of objects.

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

Reproduce the inconsistency with cf push and cf curl "/v3/apps/$GUID/manifest" using the manifest in the issue. Trace the /v3/apps/$GUID/manifest response handling and related schema or serialization code; done means services are returned as objects with a name field rather than strings, with coverage for this case.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.