{"action":"created","comment":{"url":"https://api.github.com/repos/sosreport/sos/pulls/comments/59698369","id":59698369,"diff_hunk":"@@ -234,8 +246,10 @@ def do_file_sub(self, srcpath, regexp, subst):\n                             % (subst, regexp, path))\n             if not path:\n                 return 0\n+            flags = re.IGNORECASE if ignore_case else 0\n             readable = self.archive.open_file(path)\n-            result, replacements = re.subn(regexp, subst, readable.read())\n+            result, replacements = re.subn(regexp, subst,\n+                                           readable.read(), flags=flags)","path":"sos/plugins/__init__.py","position":71,"original_position":71,"commit_id":"623b8f78073757db70b948b43af77e1a02e18431","original_commit_id":"623b8f78073757db70b948b43af77e1a02e18431","user":{"login":"bmr-cymru","id":910549,"avatar_url":"https://avatars.githubusercontent.com/u/910549?v=3","gravatar_id":"","url":"https://api.github.com/users/bmr-cymru","html_url":"https://github.com/bmr-cymru","followers_url":"https://api.github.com/users/bmr-cymru/followers","following_url":"https://api.github.com/users/bmr-cymru/following{/other_user}","gists_url":"https://api.github.com/users/bmr-cymru/gists{/gist_id}","starred_url":"https://api.github.com/users/bmr-cymru/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmr-cymru/subscriptions","organizations_url":"https://api.github.com/users/bmr-cymru/orgs","repos_url":"https://api.github.com/users/bmr-cymru/repos","events_url":"https://api.github.com/users/bmr-cymru/events{/privacy}","received_events_url":"https://api.github.com/users/bmr-cymru/received_events","type":"User","site_admin":false},"body":"Has this been tested in the case that `regexp` is a compiled `re` object? I'm assuming any flags passed to `re.subn()` are given priority over existing flags in the `re` but I have no idea if that's actually the case and this has potential for confusing behaviour (we would need to document the real behaviour if we were to go in this direction).\r\n\r\nThis is actually the expected way for plugins to use these interfaces when their regex needs are more complex than the simple pattern and `re.subn()` the function implements: a caller then has complete control over the `re` object used for the substitution. This would still require some explanation in the plugin comments or commit to justify the additional complexity but it is how the interfaces were designed to be used (we really don't want to carry a bunch of one-off kwargs that aren't generally needed).","created_at":"2016-04-14T11:02:22Z","updated_at":"2016-04-14T11:02:22Z","html_url":"https://github.com/sosreport/sos/pull/718#discussion_r59698369","pull_request_url":"https://api.github.com/repos/sosreport/sos/pulls/718","_links":{"self":{"href":"https://api.github.com/repos/sosreport/sos/pulls/comments/59698369"},"html":{"href":"https://github.com/sosreport/sos/pull/718#discussion_r59698369"},"pull_request":{"href":"https://api.github.com/repos/sosreport/sos/pulls/718"}}},"pull_request":{"url":"https://api.github.com/repos/sosreport/sos/pulls/718","id":55688350,"html_url":"https://github.com/sosreport/sos/pull/718","diff_url":"https://github.com/sosreport/sos/pull/718.diff","patch_url":"https://github.com/sosreport/sos/pull/718.patch","issue_url":"https://api.github.com/repos/sosreport/sos/issues/718","number":718,"state":"open","locked":false,"title":"[kubernetes] Collect more data, and expand plugin options","user":{"login":"TurboTurtle","id":1704155,"avatar_url":"https://avatars.githubusercontent.com/u/1704155?v=3","gravatar_id":"","url":"https://api.github.com/users/TurboTurtle","html_url":"https://github.com/TurboTurtle","followers_url":"https://api.github.com/users/TurboTurtle/followers","following_url":"https://api.github.com/users/TurboTurtle/following{/other_user}","gists_url":"https://api.github.com/users/TurboTurtle/gists{/gist_id}","starred_url":"https://api.github.com/users/TurboTurtle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TurboTurtle/subscriptions","organizations_url":"https://api.github.com/users/TurboTurtle/orgs","repos_url":"https://api.github.com/users/TurboTurtle/repos","events_url":"https://api.github.com/users/TurboTurtle/events{/privacy}","received_events_url":"https://api.github.com/users/TurboTurtle/received_events","type":"User","site_admin":false},"body":"This patch updates the default data collected by the plugin and adds additional\r\nplugin options.\r\n\r\nBy default, json output for limitranges, persistentVolumes,\r\npersistentVolumeClaims, and resourcequotas is now collected in addition to pods,\r\nnodes, services, events and replicationControllers.\r\n\r\nConfig output from 'kubectl config view' is now collected.\r\n\r\nAdditionally, there are now options for each of the above resources which when\r\nenabled will collect 'kubectl describe' output for each object of the resource.\r\n\r\nThe 'podslog' option has been renamed to 'podlogs'.\r\n\r\nThe 'all' option will enable 'podlogs' and collect 'kubectl describe' output for\r\nall resources.\r\n\r\nThe 'serviceaccount' and 'secrets' resources are not collected due to the risk\r\nof exposing secure information.\r\n\r\nSigned-off-by: Jake Hunsaker <jhunsake@redhat.com>","created_at":"2016-01-11T22:33:43Z","updated_at":"2016-04-14T11:02:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8cab96b3b34e48c6d2b2ce3f68f5fad3537a927f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sosreport/sos/pulls/718/commits","review_comments_url":"https://api.github.com/repos/sosreport/sos/pulls/718/comments","review_comment_url":"https://api.github.com/repos/sosreport/sos/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sosreport/sos/issues/718/comments","statuses_url":"https://api.github.com/repos/sosreport/sos/statuses/623b8f78073757db70b948b43af77e1a02e18431","head":{"label":"TurboTurtle:kube-plugin","ref":"kube-plugin","sha":"623b8f78073757db70b948b43af77e1a02e18431","user":{"login":"TurboTurtle","id":1704155,"avatar_url":"https://avatars.githubusercontent.com/u/1704155?v=3","gravatar_id":"","url":"https://api.github.com/users/TurboTurtle","html_url":"https://github.com/TurboTurtle","followers_url":"https://api.github.com/users/TurboTurtle/followers","following_url":"https://api.github.com/users/TurboTurtle/following{/other_user}","gists_url":"https://api.github.com/users/TurboTurtle/gists{/gist_id}","starred_url":"https://api.github.com/users/TurboTurtle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TurboTurtle/subscriptions","organizations_url":"https://api.github.com/users/TurboTurtle/orgs","repos_url":"https://api.github.com/users/TurboTurtle/repos","events_url":"https://api.github.com/users/TurboTurtle/events{/privacy}","received_events_url":"https://api.github.com/users/TurboTurtle/received_events","type":"User","site_admin":false},"repo":{"id":28094737,"name":"sos","full_name":"TurboTurtle/sos","owner":{"login":"TurboTurtle","id":1704155,"avatar_url":"https://avatars.githubusercontent.com/u/1704155?v=3","gravatar_id":"","url":"https://api.github.com/users/TurboTurtle","html_url":"https://github.com/TurboTurtle","followers_url":"https://api.github.com/users/TurboTurtle/followers","following_url":"https://api.github.com/users/TurboTurtle/following{/other_user}","gists_url":"https://api.github.com/users/TurboTurtle/gists{/gist_id}","starred_url":"https://api.github.com/users/TurboTurtle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TurboTurtle/subscriptions","organizations_url":"https://api.github.com/users/TurboTurtle/orgs","repos_url":"https://api.github.com/users/TurboTurtle/repos","events_url":"https://api.github.com/users/TurboTurtle/events{/privacy}","received_events_url":"https://api.github.com/users/TurboTurtle/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/TurboTurtle/sos","description":"A unified tool for collecting system logs and other debug information","fork":true,"url":"https://api.github.com/repos/TurboTurtle/sos","forks_url":"https://api.github.com/repos/TurboTurtle/sos/forks","keys_url":"https://api.github.com/repos/TurboTurtle/sos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TurboTurtle/sos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TurboTurtle/sos/teams","hooks_url":"https://api.github.com/repos/TurboTurtle/sos/hooks","issue_events_url":"https://api.github.com/repos/TurboTurtle/sos/issues/events{/number}","events_url":"https://api.github.com/repos/TurboTurtle/sos/events","assignees_url":"https://api.github.com/repos/TurboTurtle/sos/assignees{/user}","branches_url":"https://api.github.com/repos/TurboTurtle/sos/branches{/branch}","tags_url":"https://api.github.com/repos/TurboTurtle/sos/tags","blobs_url":"https://api.github.com/repos/TurboTurtle/sos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TurboTurtle/sos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TurboTurtle/sos/git/refs{/sha}","trees_url":"https://api.github.com/repos/TurboTurtle/sos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TurboTurtle/sos/statuses/{sha}","languages_url":"https://api.github.com/repos/TurboTurtle/sos/languages","stargazers_url":"https://api.github.com/repos/TurboTurtle/sos/stargazers","contributors_url":"https://api.github.com/repos/TurboTurtle/sos/contributors","subscribers_url":"https://api.github.com/repos/TurboTurtle/sos/subscribers","subscription_url":"https://api.github.com/repos/TurboTurtle/sos/subscription","commits_url":"https://api.github.com/repos/TurboTurtle/sos/commits{/sha}","git_commits_url":"https://api.github.com/repos/TurboTurtle/sos/git/commits{/sha}","comments_url":"https://api.github.com/repos/TurboTurtle/sos/comments{/number}","issue_comment_url":"https://api.github.com/repos/TurboTurtle/sos/issues/comments{/number}","contents_url":"https://api.github.com/repos/TurboTurtle/sos/contents/{+path}","compare_url":"https://api.github.com/repos/TurboTurtle/sos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TurboTurtle/sos/merges","archive_url":"https://api.github.com/repos/TurboTurtle/sos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TurboTurtle/sos/downloads","issues_url":"https://api.github.com/repos/TurboTurtle/sos/issues{/number}","pulls_url":"https://api.github.com/repos/TurboTurtle/sos/pulls{/number}","milestones_url":"https://api.github.com/repos/TurboTurtle/sos/milestones{/number}","notifications_url":"https://api.github.com/repos/TurboTurtle/sos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TurboTurtle/sos/labels{/name}","releases_url":"https://api.github.com/repos/TurboTurtle/sos/releases{/id}","deployments_url":"https://api.github.com/repos/TurboTurtle/sos/deployments","created_at":"2014-12-16T16:07:59Z","updated_at":"2014-12-16T16:32:06Z","pushed_at":"2016-04-13T21:48:19Z","git_url":"git://github.com/TurboTurtle/sos.git","ssh_url":"git@github.com:TurboTurtle/sos.git","clone_url":"https://github.com/TurboTurtle/sos.git","svn_url":"https://github.com/TurboTurtle/sos","homepage":"http://sos.rtfd.org","size":5019,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"sosreport:master","ref":"master","sha":"9f00ac4773e35db4e139b0b8d46a297ef9f08bf9","user":{"login":"sosreport","id":908256,"avatar_url":"https://avatars.githubusercontent.com/u/908256?v=3","gravatar_id":"","url":"https://api.github.com/users/sosreport","html_url":"https://github.com/sosreport","followers_url":"https://api.github.com/users/sosreport/followers","following_url":"https://api.github.com/users/sosreport/following{/other_user}","gists_url":"https://api.github.com/users/sosreport/gists{/gist_id}","starred_url":"https://api.github.com/users/sosreport/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sosreport/subscriptions","organizations_url":"https://api.github.com/users/sosreport/orgs","repos_url":"https://api.github.com/users/sosreport/repos","events_url":"https://api.github.com/users/sosreport/events{/privacy}","received_events_url":"https://api.github.com/users/sosreport/received_events","type":"Organization","site_admin":false},"repo":{"id":2031428,"name":"sos","full_name":"sosreport/sos","owner":{"login":"sosreport","id":908256,"avatar_url":"https://avatars.githubusercontent.com/u/908256?v=3","gravatar_id":"","url":"https://api.github.com/users/sosreport","html_url":"https://github.com/sosreport","followers_url":"https://api.github.com/users/sosreport/followers","following_url":"https://api.github.com/users/sosreport/following{/other_user}","gists_url":"https://api.github.com/users/sosreport/gists{/gist_id}","starred_url":"https://api.github.com/users/sosreport/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sosreport/subscriptions","organizations_url":"https://api.github.com/users/sosreport/orgs","repos_url":"https://api.github.com/users/sosreport/repos","events_url":"https://api.github.com/users/sosreport/events{/privacy}","received_events_url":"https://api.github.com/users/sosreport/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sosreport/sos","description":"A unified tool for collecting system logs and other debug information","fork":false,"url":"https://api.github.com/repos/sosreport/sos","forks_url":"https://api.github.com/repos/sosreport/sos/forks","keys_url":"https://api.github.com/repos/sosreport/sos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sosreport/sos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sosreport/sos/teams","hooks_url":"https://api.github.com/repos/sosreport/sos/hooks","issue_events_url":"https://api.github.com/repos/sosreport/sos/issues/events{/number}","events_url":"https://api.github.com/repos/sosreport/sos/events","assignees_url":"https://api.github.com/repos/sosreport/sos/assignees{/user}","branches_url":"https://api.github.com/repos/sosreport/sos/branches{/branch}","tags_url":"https://api.github.com/repos/sosreport/sos/tags","blobs_url":"https://api.github.com/repos/sosreport/sos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sosreport/sos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sosreport/sos/git/refs{/sha}","trees_url":"https://api.github.com/repos/sosreport/sos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sosreport/sos/statuses/{sha}","languages_url":"https://api.github.com/repos/sosreport/sos/languages","stargazers_url":"https://api.github.com/repos/sosreport/sos/stargazers","contributors_url":"https://api.github.com/repos/sosreport/sos/contributors","subscribers_url":"https://api.github.com/repos/sosreport/sos/subscribers","subscription_url":"https://api.github.com/repos/sosreport/sos/subscription","commits_url":"https://api.github.com/repos/sosreport/sos/commits{/sha}","git_commits_url":"https://api.github.com/repos/sosreport/sos/git/commits{/sha}","comments_url":"https://api.github.com/repos/sosreport/sos/comments{/number}","issue_comment_url":"https://api.github.com/repos/sosreport/sos/issues/comments{/number}","contents_url":"https://api.github.com/repos/sosreport/sos/contents/{+path}","compare_url":"https://api.github.com/repos/sosreport/sos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sosreport/sos/merges","archive_url":"https://api.github.com/repos/sosreport/sos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sosreport/sos/downloads","issues_url":"https://api.github.com/repos/sosreport/sos/issues{/number}","pulls_url":"https://api.github.com/repos/sosreport/sos/pulls{/number}","milestones_url":"https://api.github.com/repos/sosreport/sos/milestones{/number}","notifications_url":"https://api.github.com/repos/sosreport/sos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sosreport/sos/labels{/name}","releases_url":"https://api.github.com/repos/sosreport/sos/releases{/id}","deployments_url":"https://api.github.com/repos/sosreport/sos/deployments","created_at":"2011-07-11T16:58:15Z","updated_at":"2016-04-10T17:20:16Z","pushed_at":"2016-04-13T21:48:20Z","git_url":"git://github.com/sosreport/sos.git","ssh_url":"git@github.com:sosreport/sos.git","clone_url":"https://github.com/sosreport/sos.git","svn_url":"https://github.com/sosreport/sos","homepage":"http://sos.rtfd.org","size":7608,"stargazers_count":110,"watchers_count":110,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":122,"mirror_url":null,"open_issues_count":161,"forks":122,"open_issues":161,"watchers":110,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sosreport/sos/pulls/718"},"html":{"href":"https://github.com/sosreport/sos/pull/718"},"issue":{"href":"https://api.github.com/repos/sosreport/sos/issues/718"},"comments":{"href":"https://api.github.com/repos/sosreport/sos/issues/718/comments"},"review_comments":{"href":"https://api.github.com/repos/sosreport/sos/pulls/718/comments"},"review_comment":{"href":"https://api.github.com/repos/sosreport/sos/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sosreport/sos/pulls/718/commits"},"statuses":{"href":"https://api.github.com/repos/sosreport/sos/statuses/623b8f78073757db70b948b43af77e1a02e18431"}}}}