{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/24331","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/24331/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/24331/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/24331/events","html_url":"https://github.com/kubernetes/kubernetes/pull/24331","id":148680776,"number":24331,"title":"RFC: Refactor persistent volume controller","user":{"login":"jsafrane","id":1745006,"avatar_url":"https://avatars.githubusercontent.com/u/1745006?v=3","gravatar_id":"","url":"https://api.github.com/users/jsafrane","html_url":"https://github.com/jsafrane","followers_url":"https://api.github.com/users/jsafrane/followers","following_url":"https://api.github.com/users/jsafrane/following{/other_user}","gists_url":"https://api.github.com/users/jsafrane/gists{/gist_id}","starred_url":"https://api.github.com/users/jsafrane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsafrane/subscriptions","organizations_url":"https://api.github.com/users/jsafrane/orgs","repos_url":"https://api.github.com/users/jsafrane/repos","events_url":"https://api.github.com/users/jsafrane/events{/privacy}","received_events_url":"https://api.github.com/users/jsafrane/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/cla:%20yes","name":"cla: yes","color":"bfe5bf"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/kind/api-change","name":"kind/api-change","color":"c7def8"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/release-note-label-needed","name":"release-note-label-needed","color":"db5a64"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/size/XXL","name":"size/XXL","color":"ee0000"}],"state":"open","locked":false,"assignee":{"login":"saad-ali","id":10052848,"avatar_url":"https://avatars.githubusercontent.com/u/10052848?v=3","gravatar_id":"","url":"https://api.github.com/users/saad-ali","html_url":"https://github.com/saad-ali","followers_url":"https://api.github.com/users/saad-ali/followers","following_url":"https://api.github.com/users/saad-ali/following{/other_user}","gists_url":"https://api.github.com/users/saad-ali/gists{/gist_id}","starred_url":"https://api.github.com/users/saad-ali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saad-ali/subscriptions","organizations_url":"https://api.github.com/users/saad-ali/orgs","repos_url":"https://api.github.com/users/saad-ali/repos","events_url":"https://api.github.com/users/saad-ali/events{/privacy}","received_events_url":"https://api.github.com/users/saad-ali/received_events","type":"User","site_admin":false},"milestone":null,"comments":12,"created_at":"2016-04-15T14:49:19Z","updated_at":"2016-04-22T07:42:30Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/24331","html_url":"https://github.com/kubernetes/kubernetes/pull/24331","diff_url":"https://github.com/kubernetes/kubernetes/pull/24331.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/24331.patch"},"body":"Here is first reviewable chunk of my persistent volume refactoring. Complete volume binding is implemented according to https://github.com/pmorie/pv-haxxz/blob/master/controller.go and unit tested.\r\n\r\nTesting\r\n--\r\nThe unit test framework is quite complicated, still it was necessary to reach reasonable coverage (78% in `persistentvolume_controller.go`). The untested part are error cases, which are quite hard to test in reasonable way - sure, I can inject a VersionConflictError on any object update and check the error bubbles up to appropriate places, but the real test would be to run `syncClaim`/`syncVolume` again and check it recovers appropriately from the error in the next periodic sync. That's the hard part.\r\n\r\nOrganization\r\n---\r\nThe PR starts with `rm -rf kubernetes/pkg/controller/persistentvolume`. I find it easier to read when I see only the new controller without old pieces scattered around.\r\n[`types.go` from the old controller is reused to speed up matching a bit, the code looks solid and has 95% unit test coverage].\r\n\r\nI tried to split the PR into smaller patches, let me know what you think.\r\n\r\nTODO\r\n--\r\nMissing: provisioning, recycling. Appropriate e2e tests will fail. Please mark as do-not-merge, I don't have power for that!\r\n\r\n@kubernetes/sig-storage "},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/213306726","html_url":"https://github.com/kubernetes/kubernetes/pull/24331#issuecomment-213306726","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/24331","id":213306726,"user":{"login":"jsafrane","id":1745006,"avatar_url":"https://avatars.githubusercontent.com/u/1745006?v=3","gravatar_id":"","url":"https://api.github.com/users/jsafrane","html_url":"https://github.com/jsafrane","followers_url":"https://api.github.com/users/jsafrane/followers","following_url":"https://api.github.com/users/jsafrane/following{/other_user}","gists_url":"https://api.github.com/users/jsafrane/gists{/gist_id}","starred_url":"https://api.github.com/users/jsafrane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsafrane/subscriptions","organizations_url":"https://api.github.com/users/jsafrane/orgs","repos_url":"https://api.github.com/users/jsafrane/repos","events_url":"https://api.github.com/users/jsafrane/events{/privacy}","received_events_url":"https://api.github.com/users/jsafrane/received_events","type":"User","site_admin":false},"created_at":"2016-04-22T07:42:30Z","updated_at":"2016-04-22T07:42:30Z","body":"@pmorie Of course it is. Binder, recycler and deleter is ready to review, I expect only bugfixes there."}}