{"action":"created","issue":{"url":"https://api.github.com/repos/RedHatSatellite/katello-attach-subscription/issues/14","repository_url":"https://api.github.com/repos/RedHatSatellite/katello-attach-subscription","labels_url":"https://api.github.com/repos/RedHatSatellite/katello-attach-subscription/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/RedHatSatellite/katello-attach-subscription/issues/14/comments","events_url":"https://api.github.com/repos/RedHatSatellite/katello-attach-subscription/issues/14/events","html_url":"https://github.com/RedHatSatellite/katello-attach-subscription/issues/14","id":175127399,"number":14,"title":"Check subs before start","user":{"login":"Rocco83","id":1143502,"avatar_url":"https://avatars.githubusercontent.com/u/1143502?v=3","gravatar_id":"","url":"https://api.github.com/users/Rocco83","html_url":"https://github.com/Rocco83","followers_url":"https://api.github.com/users/Rocco83/followers","following_url":"https://api.github.com/users/Rocco83/following{/other_user}","gists_url":"https://api.github.com/users/Rocco83/gists{/gist_id}","starred_url":"https://api.github.com/users/Rocco83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rocco83/subscriptions","organizations_url":"https://api.github.com/users/Rocco83/orgs","repos_url":"https://api.github.com/users/Rocco83/repos","events_url":"https://api.github.com/users/Rocco83/events{/privacy}","received_events_url":"https://api.github.com/users/Rocco83/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-05T21:06:37Z","updated_at":"2016-09-08T13:34:34Z","closed_at":null,"body":"The script should check the subs validity before start."},"comment":{"url":"https://api.github.com/repos/RedHatSatellite/katello-attach-subscription/issues/comments/245598666","html_url":"https://github.com/RedHatSatellite/katello-attach-subscription/issues/14#issuecomment-245598666","issue_url":"https://api.github.com/repos/RedHatSatellite/katello-attach-subscription/issues/14","id":245598666,"user":{"login":"Rocco83","id":1143502,"avatar_url":"https://avatars.githubusercontent.com/u/1143502?v=3","gravatar_id":"","url":"https://api.github.com/users/Rocco83","html_url":"https://github.com/Rocco83","followers_url":"https://api.github.com/users/Rocco83/followers","following_url":"https://api.github.com/users/Rocco83/following{/other_user}","gists_url":"https://api.github.com/users/Rocco83/gists{/gist_id}","starred_url":"https://api.github.com/users/Rocco83/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Rocco83/subscriptions","organizations_url":"https://api.github.com/users/Rocco83/orgs","repos_url":"https://api.github.com/users/Rocco83/repos","events_url":"https://api.github.com/users/Rocco83/events{/privacy}","received_events_url":"https://api.github.com/users/Rocco83/received_events","type":"User","site_admin":false},"created_at":"2016-09-08T13:34:34Z","updated_at":"2016-09-08T13:34:34Z","body":"I agree.\r\n\r\nMoving on a little bit,\r\nBased on https://github.com/RedHatSatellite/katello-attach-subscription/pull/7\r\n\r\nThis is the current code that populate subs: \r\nhttps://github.com/Rocco83/katello-attach-subscription/blob/203ba5e286ed3f297ddd59849cd8ebd3b3ed7a2b/katello-attach-subscription#L287\r\n\r\nShort TODO:\r\n\r\n1. from YAML take only the key we need (subkey of sub: key https://github.com/Rocco83/katello-attach-subscription/blob/master/katello-attach-subscription.yaml-example#L12)\r\n2. flatten the data of YAML, removing duplicated subscriptions\r\n3. iterate the flatten data\r\n\r\nFailing condition:\r\n-  sub retrieval fail. This should be splitted in which condition we have (missing sub, general error, ...). But 400 general error is returned as now. \r\n\r\nCurrent proposal:\r\n\r\n1. iterate across all of subscription and track the failed one. do not fail immediately in case of sub retrival failure.\r\n2. if only one sub fail, report all failed subscription suggesting to check the sub\r\n\r\nReverting to you, what do you think?"}}
{"actor":{"display_login":"Rocco83"}}