{"action":"opened","issue":{"url":"https://api.github.com/repos/cf-tm-bot/diego/issues/608","repository_url":"https://api.github.com/repos/cf-tm-bot/diego","labels_url":"https://api.github.com/repos/cf-tm-bot/diego/issues/608/labels{/name}","comments_url":"https://api.github.com/repos/cf-tm-bot/diego/issues/608/comments","events_url":"https://api.github.com/repos/cf-tm-bot/diego/issues/608/events","html_url":"https://github.com/cf-tm-bot/diego/issues/608","id":198146187,"number":608,"title":"Separate some of the cacheddownloader logic in its own package - Story Id: 136814699","user":{"login":"cf-tm-bot","id":20690070,"avatar_url":"https://avatars.githubusercontent.com/u/20690070?v=3","gravatar_id":"","url":"https://api.github.com/users/cf-tm-bot","html_url":"https://github.com/cf-tm-bot","followers_url":"https://api.github.com/users/cf-tm-bot/followers","following_url":"https://api.github.com/users/cf-tm-bot/following{/other_user}","gists_url":"https://api.github.com/users/cf-tm-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/cf-tm-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cf-tm-bot/subscriptions","organizations_url":"https://api.github.com/users/cf-tm-bot/orgs","repos_url":"https://api.github.com/users/cf-tm-bot/repos","events_url":"https://api.github.com/users/cf-tm-bot/events{/privacy}","received_events_url":"https://api.github.com/users/cf-tm-bot/received_events","type":"User","site_admin":false},"labels":[{"id":443588042,"url":"https://api.github.com/repos/cf-tm-bot/diego/labels/chore","name":"chore","color":"ededed","default":false},{"id":443588362,"url":"https://api.github.com/repos/cf-tm-bot/diego/labels/unscheduled","name":"unscheduled","color":"c8cbd0","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-30T13:14:49Z","updated_at":"2016-12-30T13:14:50Z","closed_at":null,"body":"These two pieces of logic:\n\n1. https://github.com/cloudfoundry/cacheddownloader/blob/master/file_cache.go#L138-L141\n2. https://github.com/cloudfoundry/cacheddownloader/blob/master/file_cache.go#L386-L459\n\nhad bugs that were too subtle to discover and little weird to test in an integration fashion. The reason is that the cacheddownloader only hit that code path depending on the file and directory use count. Which resulted in those weird tests that are too specific to the implementation of the cacheddownloader and may become irrelevant if the implementation changed:\n\n1. https://github.com/cloudfoundry/cacheddownloader/blob/master/file_cache_test.go#L735-L757\n2. https://github.com/cloudfoundry/cacheddownloader/blob/master/file_cache_test.go#L728-L732\n\nA sepearate package will make unit tests easier and avoid having those weird contexts in the file_cache_test.go\n\n---\n\nMirrors: [story 136814699](https://www.pivotaltracker.com/story/show/136814699) submitted on Dec 30, 2016 UTC\n- **Requester**: John Shahid\n- **Estimate**: 0.0"}}
{"actor":{"display_login":"cf-tm-bot"}}