{"action":"created","issue":{"url":"https://api.github.com/repos/naparuba/shinken/issues/1967","repository_url":"https://api.github.com/repos/naparuba/shinken","labels_url":"https://api.github.com/repos/naparuba/shinken/issues/1967/labels{/name}","comments_url":"https://api.github.com/repos/naparuba/shinken/issues/1967/comments","events_url":"https://api.github.com/repos/naparuba/shinken/issues/1967/events","html_url":"https://github.com/naparuba/shinken/pull/1967","id":351130646,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA4ODAxMzc3","number":1967,"title":"Fixes --profile parameter","user":{"login":"danirod","id":1568690,"node_id":"MDQ6VXNlcjE1Njg2OTA=","avatar_url":"https://avatars2.githubusercontent.com/u/1568690?v=4","gravatar_id":"","url":"https://api.github.com/users/danirod","html_url":"https://github.com/danirod","followers_url":"https://api.github.com/users/danirod/followers","following_url":"https://api.github.com/users/danirod/following{/other_user}","gists_url":"https://api.github.com/users/danirod/gists{/gist_id}","starred_url":"https://api.github.com/users/danirod/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danirod/subscriptions","organizations_url":"https://api.github.com/users/danirod/orgs","repos_url":"https://api.github.com/users/danirod/repos","events_url":"https://api.github.com/users/danirod/events{/privacy}","received_events_url":"https://api.github.com/users/danirod/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-16T09:42:36Z","updated_at":"2018-08-16T09:54:21Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/naparuba/shinken/pulls/1967","html_url":"https://github.com/naparuba/shinken/pull/1967","diff_url":"https://github.com/naparuba/shinken/pull/1967.diff","patch_url":"https://github.com/naparuba/shinken/pull/1967.patch"},"body":"While attempting to debug some issue we found in our environment, I tried to make use of the --profile flag of shinken-broker. Unfortunately, this feature is broken because the context in which shinken runs doesn't have access to local or global variables, so this error is spit out:\r\n\r\n```\r\nTraceback (most recent call last):                                                  \r\n  File \"bin/shinken-poller\", line 99, in <module>\r\n    main()                                                                          \r\n  File \"bin/shinken-poller\", line 95, in main\r\n    cProfile.run('''daemon.main()''', opts.profile)                                                                                                                                              \r\n  File \"/usr/lib/python2.7/cProfile.py\", line 29, in run                                                                                                                                         \r\n    prof = prof.run(statement)                       \r\n  File \"/usr/lib/python2.7/cProfile.py\", line 135, in run\r\n    return self.runctx(cmd, dict, dict)\r\n  File \"/usr/lib/python2.7/cProfile.py\", line 140, in runctx\r\n    exec cmd in globals, locals\r\n  File \"<string>\", line 1, in <module>\r\nNameError: name 'daemon' is not defined\r\n```\r\n\r\nThis PR uses cProfile.runctx instead of cProfile.run in order to provide cProfile our locals and our globals so that it finds the daemon and is able to spawn a profile environment. It fixes this error."},"comment":{"url":"https://api.github.com/repos/naparuba/shinken/issues/comments/413490234","html_url":"https://github.com/naparuba/shinken/pull/1967#issuecomment-413490234","issue_url":"https://api.github.com/repos/naparuba/shinken/issues/1967","id":413490234,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMzQ5MDIzNA==","user":{"login":"coveralls","id":2354108,"node_id":"MDQ6VXNlcjIzNTQxMDg=","avatar_url":"https://avatars1.githubusercontent.com/u/2354108?v=4","gravatar_id":"","url":"https://api.github.com/users/coveralls","html_url":"https://github.com/coveralls","followers_url":"https://api.github.com/users/coveralls/followers","following_url":"https://api.github.com/users/coveralls/following{/other_user}","gists_url":"https://api.github.com/users/coveralls/gists{/gist_id}","starred_url":"https://api.github.com/users/coveralls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coveralls/subscriptions","organizations_url":"https://api.github.com/users/coveralls/orgs","repos_url":"https://api.github.com/users/coveralls/repos","events_url":"https://api.github.com/users/coveralls/events{/privacy}","received_events_url":"https://api.github.com/users/coveralls/received_events","type":"User","site_admin":false},"created_at":"2018-08-16T09:54:21Z","updated_at":"2018-08-16T09:54:21Z","author_association":"NONE","body":"\n[![Coverage Status](https://coveralls.io/builds/18513895/badge)](https://coveralls.io/builds/18513895)\n\nCoverage decreased (-0.005%) to 27.725% when pulling **968c1caf9b315dd03c86cf9fa95d8407c625bab2 on danirod:fixes-cprofile** into **a8c8ec9d7fdeffa2dfda60cb675c7e65423fccfe on naparuba:master**.\n"}}
{"actor":{"display_login":"coveralls"}}