cloudfoundry / cloud_controller_ng

Cloud Foundry Cloud Controller
Apache License 2.0
191 stars 357 forks source link

It's difficult to determine what package was staged for a given droplet (without parsing URLs) #1531

Open Gerg opened 4 years ago

Gerg commented 4 years ago

The droplet resource has link to its package, but there isn't an easy way to recover the package guid (other than parsing it from the link). For example, the package guid would be useful if you want to rebuild a droplet.

{
   "guid": "64b6c98e-1e20-4056-a444-395241b4f7d5",
   "state": "STAGED",
   "...": "...",
   "links": {
      "...": "...",
      "package": {
         "href": "https://api.moor-swisher.lite.cli.fun/v3/packages/e0cb69a6-663f-4e73-8529-ef660f644c61"
      }
   }
}

Possible enhancements:

  1. Adding a package field to droplets, similar to the package field on builds
  2. Adding a droplet_guids filter to builds. You could then filter builds on the droplet guid, and trace it back to the package.

Relevant slack discussion: https://cloudfoundry.slack.com/archives/CCRLX88DD/p1578522987041800

cf-gitbot commented 4 years ago

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/170630931

The labels on this github issue will be updated when the story is started.