cloudfoundry / cloudfoundry/cloud_controller_ng
In BitsExpiration#expire_droplets!, app.droplet_guid is empty
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 207
- Forks
- 373
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 56
Description
See https://cloudfoundry.slack.com/archives/C07C04W4Q/p1546603546043100 for context on #capi:
TLDR: add these lines to the api cloud_controller.yml and restart:
packages:
max_valid_packages_stored: 2
droplets:
max_staged_droplets_stored: 2
Create an app, get its GUID, and in two windows run the following commands while repeatedly cf push APP:
watch "cf curl /v3/apps/$GUID/packages | jq -c '.resources[] | [.guid, .state, .created_at]'"
watch "cf curl /v3/apps/$GUID/droplets | jq -c '.resources[] | [.guid, .state, .created_at]'"
Notice that we always have 2 non-expired droplets but the expected 3 non-expired packages. This is because there's a current package that is excluded from expiring, but no current droplet.
In v2/push, prepare_to_stage(app) does app.update(droplet_guid: nil)
That might be why the expirer doesn't exclude that app from its calculations
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with BitsExpiration#expire_droplets! and the v2/push prepare_to_stage(app) path mentioned in the report. Reproduce with the packages and droplets retention settings in cloud_controller.yml, repeatedly push an app, and inspect the package and droplet lists with the provided cf curl commands. Done means the expirer correctly handles the current package and droplet state.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100