{"action":"opened","issue":{"url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/issues/123","repository_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api","labels_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/issues/123/labels{/name}","comments_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/issues/123/comments","events_url":"https://api.github.com/repos/department-of-veterans-affairs/vets-api/issues/123/events","html_url":"https://github.com/department-of-veterans-affairs/vets-api/issues/123","id":177828939,"number":123,"title":"Ensure No External Requests in Initializers","user":{"login":"saneshark","id":591737,"avatar_url":"https://avatars.githubusercontent.com/u/591737?v=3","gravatar_id":"","url":"https://api.github.com/users/saneshark","html_url":"https://github.com/saneshark","followers_url":"https://api.github.com/users/saneshark/followers","following_url":"https://api.github.com/users/saneshark/following{/other_user}","gists_url":"https://api.github.com/users/saneshark/gists{/gist_id}","starred_url":"https://api.github.com/users/saneshark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saneshark/subscriptions","organizations_url":"https://api.github.com/users/saneshark/orgs","repos_url":"https://api.github.com/users/saneshark/repos","events_url":"https://api.github.com/users/saneshark/events{/privacy}","received_events_url":"https://api.github.com/users/saneshark/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"shauni","id":76270,"avatar_url":"https://avatars.githubusercontent.com/u/76270?v=3","gravatar_id":"","url":"https://api.github.com/users/shauni","html_url":"https://github.com/shauni","followers_url":"https://api.github.com/users/shauni/followers","following_url":"https://api.github.com/users/shauni/following{/other_user}","gists_url":"https://api.github.com/users/shauni/gists{/gist_id}","starred_url":"https://api.github.com/users/shauni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shauni/subscriptions","organizations_url":"https://api.github.com/users/shauni/orgs","repos_url":"https://api.github.com/users/shauni/repos","events_url":"https://api.github.com/users/shauni/events{/privacy}","received_events_url":"https://api.github.com/users/shauni/received_events","type":"User","site_admin":false},"assignees":[{"login":"shauni","id":76270,"avatar_url":"https://avatars.githubusercontent.com/u/76270?v=3","gravatar_id":"","url":"https://api.github.com/users/shauni","html_url":"https://github.com/shauni","followers_url":"https://api.github.com/users/shauni/followers","following_url":"https://api.github.com/users/shauni/following{/other_user}","gists_url":"https://api.github.com/users/shauni/gists{/gist_id}","starred_url":"https://api.github.com/users/shauni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shauni/subscriptions","organizations_url":"https://api.github.com/users/shauni/orgs","repos_url":"https://api.github.com/users/shauni/repos","events_url":"https://api.github.com/users/shauni/events{/privacy}","received_events_url":"https://api.github.com/users/shauni/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2016-09-19T16:16:20Z","updated_at":"2016-09-19T16:16:20Z","closed_at":null,"body":"Normally webmock would catch any external requests, but if they occur in an initializer prior to webmock.disable_external_request! they will actually be made.\r\n\r\nsaml_settings.rb is one such example. \r\n\r\nIf the IDP is down, this will result in a build breaking or test environments failing, we need to have a more robust mechanism for handling these issues and we should always make sure there happen at an application runtime level, not at initialization.\r\n\r\nOne solution would be to move the saml_settings into a service class, and have it be redis backed -- the metadata would be loaded from redis first, if it is not available it will make the request and cache it to redis for future requests. We should set the timeout window to something short -- like 5-10 seconds, and we should rescue exception with our own custom exception class to ensure that the error is logged, JSON is returned informing of the issue. In this case, it would likely be a 500 level error."}}
{"actor":{"display_login":"saneshark"}}