{"action":"closed","number":730,"pull_request":{"url":"https://api.github.com/repos/openshift/installer/pulls/730","id":233710943,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMzNzEwOTQz","html_url":"https://github.com/openshift/installer/pull/730","diff_url":"https://github.com/openshift/installer/pull/730.diff","patch_url":"https://github.com/openshift/installer/pull/730.patch","issue_url":"https://api.github.com/repos/openshift/installer/issues/730","number":730,"state":"closed","locked":false,"title":"pkg/lineprinter: Add a wrapper for Write -> Print","user":{"login":"wking","id":209920,"node_id":"MDQ6VXNlcjIwOTkyMA==","avatar_url":"https://avatars1.githubusercontent.com/u/209920?v=4","gravatar_id":"","url":"https://api.github.com/users/wking","html_url":"https://github.com/wking","followers_url":"https://api.github.com/users/wking/followers","following_url":"https://api.github.com/users/wking/following{/other_user}","gists_url":"https://api.github.com/users/wking/gists{/gist_id}","starred_url":"https://api.github.com/users/wking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wking/subscriptions","organizations_url":"https://api.github.com/users/wking/orgs","repos_url":"https://api.github.com/users/wking/repos","events_url":"https://api.github.com/users/wking/events{/privacy}","received_events_url":"https://api.github.com/users/wking/received_events","type":"User","site_admin":false},"body":"06c5fd36 (#689), the global logrus level has been `TraceLevel`.  Decisions about logging to a particular target are now made when adding the hook for that target.  This broke our Terraform debug approach, which had been based on the level for the global logger.  Since 06c5fd36, `logrus.GetLevel() == logrus.DebugLevel` will never be true.\n\nWith this commit, I've replaced that switch and now just push all Terraform stdout into the default logger at the debug level.  A new `LinePrinter` provides a shim between Terraform's stdout stream and the line-based log calls.\n\nI've added a local buffer for stderr, because [`Run`][1] doesn't collect it automatically like [`Output`][2] does.\n\n`LinePrinter.Lock` protects us from parallel writes, [because][3]:\n\n> The slice is valid for use only until the next buffer modification (that is, only until the next call to a method like `Read`, `Write`, `Reset`, or `Truncate`).\n\nThe docs aren't clear about whether that limitation applies to [`ReadString`][4] or not, but [the backing implementation][5] has no internal lock to protect from changes made before the internal reference is copied into a new slice.  We're unlikely to actually have parallel writes for our Terraform use-case, but I'd rather be conservative now and not have to track down a race if someone decides to use LinePrinter for something concurrent later.\n\n[1]: https://golang.org/pkg/os/exec/#Cmd.Run\n[2]: https://golang.org/pkg/os/exec/#Cmd.Output\n[3]: https://golang.org/pkg/bytes/#Buffer.Bytes\n[4]: https://golang.org/pkg/bytes/#Buffer.ReadString\n[5]: https://github.com/golang/go/blob/go1.11.2/src/bytes/buffer.go#L416-L439","created_at":"2018-11-26T22:00:50Z","updated_at":"2018-12-01T19:34:46Z","closed_at":"2018-12-01T19:34:46Z","merged_at":"2018-12-01T19:34:45Z","merge_commit_sha":"6757fcdd3ffd26dfad82e9e8ec9b2361622c8f72","assignee":{"login":"crawford","id":368848,"node_id":"MDQ6VXNlcjM2ODg0OA==","avatar_url":"https://avatars3.githubusercontent.com/u/368848?v=4","gravatar_id":"","url":"https://api.github.com/users/crawford","html_url":"https://github.com/crawford","followers_url":"https://api.github.com/users/crawford/followers","following_url":"https://api.github.com/users/crawford/following{/other_user}","gists_url":"https://api.github.com/users/crawford/gists{/gist_id}","starred_url":"https://api.github.com/users/crawford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crawford/subscriptions","organizations_url":"https://api.github.com/users/crawford/orgs","repos_url":"https://api.github.com/users/crawford/repos","events_url":"https://api.github.com/users/crawford/events{/privacy}","received_events_url":"https://api.github.com/users/crawford/received_events","type":"User","site_admin":false},"assignees":[{"login":"crawford","id":368848,"node_id":"MDQ6VXNlcjM2ODg0OA==","avatar_url":"https://avatars3.githubusercontent.com/u/368848?v=4","gravatar_id":"","url":"https://api.github.com/users/crawford","html_url":"https://github.com/crawford","followers_url":"https://api.github.com/users/crawford/followers","following_url":"https://api.github.com/users/crawford/following{/other_user}","gists_url":"https://api.github.com/users/crawford/gists{/gist_id}","starred_url":"https://api.github.com/users/crawford/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crawford/subscriptions","organizations_url":"https://api.github.com/users/crawford/orgs","repos_url":"https://api.github.com/users/crawford/repos","events_url":"https://api.github.com/users/crawford/events{/privacy}","received_events_url":"https://api.github.com/users/crawford/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"russellb","id":309258,"node_id":"MDQ6VXNlcjMwOTI1OA==","avatar_url":"https://avatars0.githubusercontent.com/u/309258?v=4","gravatar_id":"","url":"https://api.github.com/users/russellb","html_url":"https://github.com/russellb","followers_url":"https://api.github.com/users/russellb/followers","following_url":"https://api.github.com/users/russellb/following{/other_user}","gists_url":"https://api.github.com/users/russellb/gists{/gist_id}","starred_url":"https://api.github.com/users/russellb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/russellb/subscriptions","organizations_url":"https://api.github.com/users/russellb/orgs","repos_url":"https://api.github.com/users/russellb/repos","events_url":"https://api.github.com/users/russellb/events{/privacy}","received_events_url":"https://api.github.com/users/russellb/received_events","type":"User","site_admin":false},{"login":"rajatchopra","id":982221,"node_id":"MDQ6VXNlcjk4MjIyMQ==","avatar_url":"https://avatars2.githubusercontent.com/u/982221?v=4","gravatar_id":"","url":"https://api.github.com/users/rajatchopra","html_url":"https://github.com/rajatchopra","followers_url":"https://api.github.com/users/rajatchopra/followers","following_url":"https://api.github.com/users/rajatchopra/following{/other_user}","gists_url":"https://api.github.com/users/rajatchopra/gists{/gist_id}","starred_url":"https://api.github.com/users/rajatchopra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rajatchopra/subscriptions","organizations_url":"https://api.github.com/users/rajatchopra/orgs","repos_url":"https://api.github.com/users/rajatchopra/repos","events_url":"https://api.github.com/users/rajatchopra/events{/privacy}","received_events_url":"https://api.github.com/users/rajatchopra/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":959732229,"node_id":"MDU6TGFiZWw5NTk3MzIyMjk=","url":"https://api.github.com/repos/openshift/installer/labels/approved","name":"approved","color":"0ffa16","default":false},{"id":959732398,"node_id":"MDU6TGFiZWw5NTk3MzIzOTg=","url":"https://api.github.com/repos/openshift/installer/labels/lgtm","name":"lgtm","color":"15dd18","default":false},{"id":959732835,"node_id":"MDU6TGFiZWw5NTk3MzI4MzU=","url":"https://api.github.com/repos/openshift/installer/labels/size/L","name":"size/L","color":"ee9900","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/openshift/installer/pulls/730/commits","review_comments_url":"https://api.github.com/repos/openshift/installer/pulls/730/comments","review_comment_url":"https://api.github.com/repos/openshift/installer/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openshift/installer/issues/730/comments","statuses_url":"https://api.github.com/repos/openshift/installer/statuses/2dd9230e2455df1d8cb6be4dbac67d7932169052","head":{"label":"wking:terraform-to-logger","ref":"terraform-to-logger","sha":"2dd9230e2455df1d8cb6be4dbac67d7932169052","user":{"login":"wking","id":209920,"node_id":"MDQ6VXNlcjIwOTkyMA==","avatar_url":"https://avatars1.githubusercontent.com/u/209920?v=4","gravatar_id":"","url":"https://api.github.com/users/wking","html_url":"https://github.com/wking","followers_url":"https://api.github.com/users/wking/followers","following_url":"https://api.github.com/users/wking/following{/other_user}","gists_url":"https://api.github.com/users/wking/gists{/gist_id}","starred_url":"https://api.github.com/users/wking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wking/subscriptions","organizations_url":"https://api.github.com/users/wking/orgs","repos_url":"https://api.github.com/users/wking/repos","events_url":"https://api.github.com/users/wking/events{/privacy}","received_events_url":"https://api.github.com/users/wking/received_events","type":"User","site_admin":false},"repo":{"id":140026813,"node_id":"MDEwOlJlcG9zaXRvcnkxNDAwMjY4MTM=","name":"openshift-installer","full_name":"wking/openshift-installer","private":false,"owner":{"login":"wking","id":209920,"node_id":"MDQ6VXNlcjIwOTkyMA==","avatar_url":"https://avatars1.githubusercontent.com/u/209920?v=4","gravatar_id":"","url":"https://api.github.com/users/wking","html_url":"https://github.com/wking","followers_url":"https://api.github.com/users/wking/followers","following_url":"https://api.github.com/users/wking/following{/other_user}","gists_url":"https://api.github.com/users/wking/gists{/gist_id}","starred_url":"https://api.github.com/users/wking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wking/subscriptions","organizations_url":"https://api.github.com/users/wking/orgs","repos_url":"https://api.github.com/users/wking/repos","events_url":"https://api.github.com/users/wking/events{/privacy}","received_events_url":"https://api.github.com/users/wking/received_events","type":"User","site_admin":false},"html_url":"https://github.com/wking/openshift-installer","description":"Install an OpenShift cluster","fork":true,"url":"https://api.github.com/repos/wking/openshift-installer","forks_url":"https://api.github.com/repos/wking/openshift-installer/forks","keys_url":"https://api.github.com/repos/wking/openshift-installer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wking/openshift-installer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wking/openshift-installer/teams","hooks_url":"https://api.github.com/repos/wking/openshift-installer/hooks","issue_events_url":"https://api.github.com/repos/wking/openshift-installer/issues/events{/number}","events_url":"https://api.github.com/repos/wking/openshift-installer/events","assignees_url":"https://api.github.com/repos/wking/openshift-installer/assignees{/user}","branches_url":"https://api.github.com/repos/wking/openshift-installer/branches{/branch}","tags_url":"https://api.github.com/repos/wking/openshift-installer/tags","blobs_url":"https://api.github.com/repos/wking/openshift-installer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wking/openshift-installer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wking/openshift-installer/git/refs{/sha}","trees_url":"https://api.github.com/repos/wking/openshift-installer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wking/openshift-installer/statuses/{sha}","languages_url":"https://api.github.com/repos/wking/openshift-installer/languages","stargazers_url":"https://api.github.com/repos/wking/openshift-installer/stargazers","contributors_url":"https://api.github.com/repos/wking/openshift-installer/contributors","subscribers_url":"https://api.github.com/repos/wking/openshift-installer/subscribers","subscription_url":"https://api.github.com/repos/wking/openshift-installer/subscription","commits_url":"https://api.github.com/repos/wking/openshift-installer/commits{/sha}","git_commits_url":"https://api.github.com/repos/wking/openshift-installer/git/commits{/sha}","comments_url":"https://api.github.com/repos/wking/openshift-installer/comments{/number}","issue_comment_url":"https://api.github.com/repos/wking/openshift-installer/issues/comments{/number}","contents_url":"https://api.github.com/repos/wking/openshift-installer/contents/{+path}","compare_url":"https://api.github.com/repos/wking/openshift-installer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wking/openshift-installer/merges","archive_url":"https://api.github.com/repos/wking/openshift-installer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wking/openshift-installer/downloads","issues_url":"https://api.github.com/repos/wking/openshift-installer/issues{/number}","pulls_url":"https://api.github.com/repos/wking/openshift-installer/pulls{/number}","milestones_url":"https://api.github.com/repos/wking/openshift-installer/milestones{/number}","notifications_url":"https://api.github.com/repos/wking/openshift-installer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wking/openshift-installer/labels{/name}","releases_url":"https://api.github.com/repos/wking/openshift-installer/releases{/id}","deployments_url":"https://api.github.com/repos/wking/openshift-installer/deployments","created_at":"2018-07-06T20:26:48Z","updated_at":"2018-12-01T17:29:42Z","pushed_at":"2018-12-01T17:29:40Z","git_url":"git://github.com/wking/openshift-installer.git","ssh_url":"git@github.com:wking/openshift-installer.git","clone_url":"https://github.com/wking/openshift-installer.git","svn_url":"https://github.com/wking/openshift-installer","homepage":"","size":45463,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"openshift:master","ref":"master","sha":"b8c292e6b94682223ec90c0f6814dded913d2c00","user":{"login":"openshift","id":792337,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc5MjMzNw==","avatar_url":"https://avatars3.githubusercontent.com/u/792337?v=4","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"repo":{"id":136633680,"node_id":"MDEwOlJlcG9zaXRvcnkxMzY2MzM2ODA=","name":"installer","full_name":"openshift/installer","private":false,"owner":{"login":"openshift","id":792337,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc5MjMzNw==","avatar_url":"https://avatars3.githubusercontent.com/u/792337?v=4","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/openshift/installer","description":"Install an OpenShift cluster","fork":false,"url":"https://api.github.com/repos/openshift/installer","forks_url":"https://api.github.com/repos/openshift/installer/forks","keys_url":"https://api.github.com/repos/openshift/installer/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openshift/installer/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openshift/installer/teams","hooks_url":"https://api.github.com/repos/openshift/installer/hooks","issue_events_url":"https://api.github.com/repos/openshift/installer/issues/events{/number}","events_url":"https://api.github.com/repos/openshift/installer/events","assignees_url":"https://api.github.com/repos/openshift/installer/assignees{/user}","branches_url":"https://api.github.com/repos/openshift/installer/branches{/branch}","tags_url":"https://api.github.com/repos/openshift/installer/tags","blobs_url":"https://api.github.com/repos/openshift/installer/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openshift/installer/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openshift/installer/git/refs{/sha}","trees_url":"https://api.github.com/repos/openshift/installer/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openshift/installer/statuses/{sha}","languages_url":"https://api.github.com/repos/openshift/installer/languages","stargazers_url":"https://api.github.com/repos/openshift/installer/stargazers","contributors_url":"https://api.github.com/repos/openshift/installer/contributors","subscribers_url":"https://api.github.com/repos/openshift/installer/subscribers","subscription_url":"https://api.github.com/repos/openshift/installer/subscription","commits_url":"https://api.github.com/repos/openshift/installer/commits{/sha}","git_commits_url":"https://api.github.com/repos/openshift/installer/git/commits{/sha}","comments_url":"https://api.github.com/repos/openshift/installer/comments{/number}","issue_comment_url":"https://api.github.com/repos/openshift/installer/issues/comments{/number}","contents_url":"https://api.github.com/repos/openshift/installer/contents/{+path}","compare_url":"https://api.github.com/repos/openshift/installer/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openshift/installer/merges","archive_url":"https://api.github.com/repos/openshift/installer/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openshift/installer/downloads","issues_url":"https://api.github.com/repos/openshift/installer/issues{/number}","pulls_url":"https://api.github.com/repos/openshift/installer/pulls{/number}","milestones_url":"https://api.github.com/repos/openshift/installer/milestones{/number}","notifications_url":"https://api.github.com/repos/openshift/installer/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openshift/installer/labels{/name}","releases_url":"https://api.github.com/repos/openshift/installer/releases{/id}","deployments_url":"https://api.github.com/repos/openshift/installer/deployments","created_at":"2018-06-08T15:04:41Z","updated_at":"2018-12-01T16:25:17Z","pushed_at":"2018-12-01T19:34:45Z","git_url":"git://github.com/openshift/installer.git","ssh_url":"git@github.com:openshift/installer.git","clone_url":"https://github.com/openshift/installer.git","svn_url":"https://github.com/openshift/installer","homepage":"","size":44067,"stargazers_count":97,"watchers_count":97,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":115,"mirror_url":null,"archived":false,"open_issues_count":95,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":115,"open_issues":95,"watchers":97,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openshift/installer/pulls/730"},"html":{"href":"https://github.com/openshift/installer/pull/730"},"issue":{"href":"https://api.github.com/repos/openshift/installer/issues/730"},"comments":{"href":"https://api.github.com/repos/openshift/installer/issues/730/comments"},"review_comments":{"href":"https://api.github.com/repos/openshift/installer/pulls/730/comments"},"review_comment":{"href":"https://api.github.com/repos/openshift/installer/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openshift/installer/pulls/730/commits"},"statuses":{"href":"https://api.github.com/repos/openshift/installer/statuses/2dd9230e2455df1d8cb6be4dbac67d7932169052"}},"author_association":"MEMBER","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"openshift-merge-robot","id":30189218,"node_id":"MDQ6VXNlcjMwMTg5MjE4","avatar_url":"https://avatars0.githubusercontent.com/u/30189218?v=4","gravatar_id":"","url":"https://api.github.com/users/openshift-merge-robot","html_url":"https://github.com/openshift-merge-robot","followers_url":"https://api.github.com/users/openshift-merge-robot/followers","following_url":"https://api.github.com/users/openshift-merge-robot/following{/other_user}","gists_url":"https://api.github.com/users/openshift-merge-robot/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift-merge-robot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift-merge-robot/subscriptions","organizations_url":"https://api.github.com/users/openshift-merge-robot/orgs","repos_url":"https://api.github.com/users/openshift-merge-robot/repos","events_url":"https://api.github.com/users/openshift-merge-robot/events{/privacy}","received_events_url":"https://api.github.com/users/openshift-merge-robot/received_events","type":"User","site_admin":false},"comments":23,"review_comments":19,"maintainer_can_modify":false,"commits":1,"additions":193,"deletions":12,"changed_files":5}}
{"actor":{"display_login":"openshift-merge-robot"}}