{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/6596","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/6596/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/6596/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/6596/events","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/issues/6596","id":67228048,"number":6596,"title":"Deodorize ObjectReference and SelfLink","user":{"login":"pmorie","id":366488,"avatar_url":"https://avatars.githubusercontent.com/u/366488?v=3","gravatar_id":"","url":"https://api.github.com/users/pmorie","html_url":"https://github.com/pmorie","followers_url":"https://api.github.com/users/pmorie/followers","following_url":"https://api.github.com/users/pmorie/following{/other_user}","gists_url":"https://api.github.com/users/pmorie/gists{/gist_id}","starred_url":"https://api.github.com/users/pmorie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmorie/subscriptions","organizations_url":"https://api.github.com/users/pmorie/orgs","repos_url":"https://api.github.com/users/pmorie/repos","events_url":"https://api.github.com/users/pmorie/events{/privacy}","received_events_url":"https://api.github.com/users/pmorie/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels/priority/P3","name":"priority/P3","color":"fef2c0"},{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels/team/master","name":"team/master","color":"d2b48c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-04-08T21:52:19Z","updated_at":"2015-04-23T22:24:57Z","closed_at":null,"body":"Currently, an object must have a `selfLink` in order to obtain an  `ObjectReference` for it unless the `ForTesting_ReferencesAllowBlankSelfLinks` flag is set in the api.\r\n\r\nA couple smelly things about this:\r\n\r\n1.  Some test code sets the `ForTesting_ReferencesAllowBlankSelfLinks`, some code doesn't\r\n2.  There are some legitimate use-cases for which self links aren't available (ie, pod definitions that come from a json file on disk) -- to get around this there's a hard-coding in the internal API conversions to default a selfLink when converting a Pod that doesn't have one.\r\n\r\nI think we should:\r\n\r\n1.  Make a `selfLink` required for objects that should have one\r\n2.  Have an officially sanctioned way to indicate that an object necessarily does not have a `selfLink` or to assign a dummy one -- possibly as a sibling to `testapi.SelfLink`\r\n3.  Remove the `ForTesting_ReferencesAllowBlankSelfLinks` flag from the API package\r\n4.  Make all tests set `selfLinks` correctly using `testapi.SelfLink`\r\n\r\nAny thoughts?\r\n\r\n@thockin @erictune @smarterclayton @bgrant0607 @derekwaynecarr @markturansky \r\n"},"comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/comments/95734897","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/issues/6596#issuecomment-95734897","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/6596","id":95734897,"user":{"login":"satnam6502","id":6164339,"avatar_url":"https://avatars.githubusercontent.com/u/6164339?v=3","gravatar_id":"","url":"https://api.github.com/users/satnam6502","html_url":"https://github.com/satnam6502","followers_url":"https://api.github.com/users/satnam6502/followers","following_url":"https://api.github.com/users/satnam6502/following{/other_user}","gists_url":"https://api.github.com/users/satnam6502/gists{/gist_id}","starred_url":"https://api.github.com/users/satnam6502/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/satnam6502/subscriptions","organizations_url":"https://api.github.com/users/satnam6502/orgs","repos_url":"https://api.github.com/users/satnam6502/repos","events_url":"https://api.github.com/users/satnam6502/events{/privacy}","received_events_url":"https://api.github.com/users/satnam6502/received_events","type":"User","site_admin":false},"created_at":"2015-04-23T22:24:57Z","updated_at":"2015-04-23T22:24:57Z","body":"Once I can create a cluster again I shall tell you :-)\r\n"}}