{"action":"created","comment":{"url":"https://api.github.com/repos/DataDog/datadog-agent/pulls/comments/243530037","pull_request_review_id":187324476,"id":243530037,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MzUzMDAzNw==","diff_hunk":"@@ -208,6 +212,10 @@ func (t *Tailer) read(buffer []byte, timeout time.Duration) (int, error) {\n \tvar err error\n \tdoneReading := make(chan struct{})\n \tgo func() {\n+\t\tif t.reader == nil {","path":"pkg/logs/input/docker/tailer.go","position":17,"original_position":17,"commit_id":"e91ccab0c09f1df1f61b3fd9818b99cccc6ac2fa","original_commit_id":"e91ccab0c09f1df1f61b3fd9818b99cccc6ac2fa","user":{"login":"ajacquemot","id":5777308,"node_id":"MDQ6VXNlcjU3NzczMDg=","avatar_url":"https://avatars0.githubusercontent.com/u/5777308?v=4","gravatar_id":"","url":"https://api.github.com/users/ajacquemot","html_url":"https://github.com/ajacquemot","followers_url":"https://api.github.com/users/ajacquemot/followers","following_url":"https://api.github.com/users/ajacquemot/following{/other_user}","gists_url":"https://api.github.com/users/ajacquemot/gists{/gist_id}","starred_url":"https://api.github.com/users/ajacquemot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajacquemot/subscriptions","organizations_url":"https://api.github.com/users/ajacquemot/orgs","repos_url":"https://api.github.com/users/ajacquemot/repos","events_url":"https://api.github.com/users/ajacquemot/events{/privacy}","received_events_url":"https://api.github.com/users/ajacquemot/received_events","type":"User","site_admin":false},"body":"Maybe we should perform this check upstream ? Before calling read ?","created_at":"2018-12-21T09:30:50Z","updated_at":"2018-12-21T09:30:51Z","html_url":"https://github.com/DataDog/datadog-agent/pull/2817#discussion_r243530037","pull_request_url":"https://api.github.com/repos/DataDog/datadog-agent/pulls/2817","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/DataDog/datadog-agent/pulls/comments/243530037"},"html":{"href":"https://github.com/DataDog/datadog-agent/pull/2817#discussion_r243530037"},"pull_request":{"href":"https://api.github.com/repos/DataDog/datadog-agent/pulls/2817"}}},"pull_request":{"url":"https://api.github.com/repos/DataDog/datadog-agent/pulls/2817","id":240254217,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQwMjU0MjE3","html_url":"https://github.com/DataDog/datadog-agent/pull/2817","diff_url":"https://github.com/DataDog/datadog-agent/pull/2817.diff","patch_url":"https://github.com/DataDog/datadog-agent/pull/2817.patch","issue_url":"https://api.github.com/repos/DataDog/datadog-agent/issues/2817","number":2817,"state":"open","locked":false,"title":"Fix null pointer exception in docker tailer","user":{"login":"achntrl","id":6985756,"node_id":"MDQ6VXNlcjY5ODU3NTY=","avatar_url":"https://avatars3.githubusercontent.com/u/6985756?v=4","gravatar_id":"","url":"https://api.github.com/users/achntrl","html_url":"https://github.com/achntrl","followers_url":"https://api.github.com/users/achntrl/followers","following_url":"https://api.github.com/users/achntrl/following{/other_user}","gists_url":"https://api.github.com/users/achntrl/gists{/gist_id}","starred_url":"https://api.github.com/users/achntrl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/achntrl/subscriptions","organizations_url":"https://api.github.com/users/achntrl/orgs","repos_url":"https://api.github.com/users/achntrl/repos","events_url":"https://api.github.com/users/achntrl/events{/privacy}","received_events_url":"https://api.github.com/users/achntrl/received_events","type":"User","site_admin":false},"body":"### What does this PR do?\r\n\r\nFix a bug where the docker tailer would NPE if the docker timestamp format wasn't properly parsed.\r\n\r\n### Motivation\r\n\r\nA customer received a timestamp with `+2018-12-20T03:22:50.195175539Z` that sent to the docker cli as a reference for the `Since` parameter. It failed and we set up a `nil` `Reader` that we eventually tried to close\r\n\r\nThis PR fixes the bug by avoiding improper timestamp in the Docker CLI. And if the CLI call fails for any other reason, we now also check that the reader is not nil before using it as our last defensive option\r\n\r\n### Additional Notes\r\n\r\nAnything else we should know when reviewing?\r\n","created_at":"2018-12-20T17:55:15Z","updated_at":"2018-12-21T09:30:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dbfcc9665ee62e5de43ac4c65ec5965867b92fb0","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":776720186,"node_id":"MDU6TGFiZWw3NzY3MjAxODY=","url":"https://api.github.com/repos/DataDog/datadog-agent/labels/component/logs","name":"component/logs","color":"0052cc","default":false},{"id":313604150,"node_id":"MDU6TGFiZWwzMTM2MDQxNTA=","url":"https://api.github.com/repos/DataDog/datadog-agent/labels/kind/bug","name":"kind/bug","color":"fc2929","default":false},{"id":899510481,"node_id":"MDU6TGFiZWw4OTk1MTA0ODE=","url":"https://api.github.com/repos/DataDog/datadog-agent/labels/severity/critical","name":"severity/critical","color":"b60205","default":false},{"id":695416522,"node_id":"MDU6TGFiZWw2OTU0MTY1MjI=","url":"https://api.github.com/repos/DataDog/datadog-agent/labels/team/logs","name":"team/logs","color":"d4c5f9","default":false}],"milestone":{"url":"https://api.github.com/repos/DataDog/datadog-agent/milestones/46","html_url":"https://github.com/DataDog/datadog-agent/milestone/46","labels_url":"https://api.github.com/repos/DataDog/datadog-agent/milestones/46/labels","id":3916166,"node_id":"MDk6TWlsZXN0b25lMzkxNjE2Ng==","number":46,"title":"6.8.3","description":null,"creator":{"login":"achntrl","id":6985756,"node_id":"MDQ6VXNlcjY5ODU3NTY=","avatar_url":"https://avatars3.githubusercontent.com/u/6985756?v=4","gravatar_id":"","url":"https://api.github.com/users/achntrl","html_url":"https://github.com/achntrl","followers_url":"https://api.github.com/users/achntrl/followers","following_url":"https://api.github.com/users/achntrl/following{/other_user}","gists_url":"https://api.github.com/users/achntrl/gists{/gist_id}","starred_url":"https://api.github.com/users/achntrl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/achntrl/subscriptions","organizations_url":"https://api.github.com/users/achntrl/orgs","repos_url":"https://api.github.com/users/achntrl/repos","events_url":"https://api.github.com/users/achntrl/events{/privacy}","received_events_url":"https://api.github.com/users/achntrl/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":0,"state":"open","created_at":"2018-12-20T18:02:38Z","updated_at":"2018-12-20T18:03:49Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/DataDog/datadog-agent/pulls/2817/commits","review_comments_url":"https://api.github.com/repos/DataDog/datadog-agent/pulls/2817/comments","review_comment_url":"https://api.github.com/repos/DataDog/datadog-agent/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DataDog/datadog-agent/issues/2817/comments","statuses_url":"https://api.github.com/repos/DataDog/datadog-agent/statuses/e91ccab0c09f1df1f61b3fd9818b99cccc6ac2fa","head":{"label":"DataDog:achntrl/fix-npe-docker-tailer","ref":"achntrl/fix-npe-docker-tailer","sha":"e91ccab0c09f1df1f61b3fd9818b99cccc6ac2fa","user":{"login":"DataDog","id":365230,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2NTIzMA==","avatar_url":"https://avatars1.githubusercontent.com/u/365230?v=4","gravatar_id":"","url":"https://api.github.com/users/DataDog","html_url":"https://github.com/DataDog","followers_url":"https://api.github.com/users/DataDog/followers","following_url":"https://api.github.com/users/DataDog/following{/other_user}","gists_url":"https://api.github.com/users/DataDog/gists{/gist_id}","starred_url":"https://api.github.com/users/DataDog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataDog/subscriptions","organizations_url":"https://api.github.com/users/DataDog/orgs","repos_url":"https://api.github.com/users/DataDog/repos","events_url":"https://api.github.com/users/DataDog/events{/privacy}","received_events_url":"https://api.github.com/users/DataDog/received_events","type":"Organization","site_admin":false},"repo":{"id":49970739,"node_id":"MDEwOlJlcG9zaXRvcnk0OTk3MDczOQ==","name":"datadog-agent","full_name":"DataDog/datadog-agent","private":false,"owner":{"login":"DataDog","id":365230,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2NTIzMA==","avatar_url":"https://avatars1.githubusercontent.com/u/365230?v=4","gravatar_id":"","url":"https://api.github.com/users/DataDog","html_url":"https://github.com/DataDog","followers_url":"https://api.github.com/users/DataDog/followers","following_url":"https://api.github.com/users/DataDog/following{/other_user}","gists_url":"https://api.github.com/users/DataDog/gists{/gist_id}","starred_url":"https://api.github.com/users/DataDog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataDog/subscriptions","organizations_url":"https://api.github.com/users/DataDog/orgs","repos_url":"https://api.github.com/users/DataDog/repos","events_url":"https://api.github.com/users/DataDog/events{/privacy}","received_events_url":"https://api.github.com/users/DataDog/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/DataDog/datadog-agent","description":"Datadog Agent ","fork":false,"url":"https://api.github.com/repos/DataDog/datadog-agent","forks_url":"https://api.github.com/repos/DataDog/datadog-agent/forks","keys_url":"https://api.github.com/repos/DataDog/datadog-agent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DataDog/datadog-agent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DataDog/datadog-agent/teams","hooks_url":"https://api.github.com/repos/DataDog/datadog-agent/hooks","issue_events_url":"https://api.github.com/repos/DataDog/datadog-agent/issues/events{/number}","events_url":"https://api.github.com/repos/DataDog/datadog-agent/events","assignees_url":"https://api.github.com/repos/DataDog/datadog-agent/assignees{/user}","branches_url":"https://api.github.com/repos/DataDog/datadog-agent/branches{/branch}","tags_url":"https://api.github.com/repos/DataDog/datadog-agent/tags","blobs_url":"https://api.github.com/repos/DataDog/datadog-agent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DataDog/datadog-agent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DataDog/datadog-agent/git/refs{/sha}","trees_url":"https://api.github.com/repos/DataDog/datadog-agent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DataDog/datadog-agent/statuses/{sha}","languages_url":"https://api.github.com/repos/DataDog/datadog-agent/languages","stargazers_url":"https://api.github.com/repos/DataDog/datadog-agent/stargazers","contributors_url":"https://api.github.com/repos/DataDog/datadog-agent/contributors","subscribers_url":"https://api.github.com/repos/DataDog/datadog-agent/subscribers","subscription_url":"https://api.github.com/repos/DataDog/datadog-agent/subscription","commits_url":"https://api.github.com/repos/DataDog/datadog-agent/commits{/sha}","git_commits_url":"https://api.github.com/repos/DataDog/datadog-agent/git/commits{/sha}","comments_url":"https://api.github.com/repos/DataDog/datadog-agent/comments{/number}","issue_comment_url":"https://api.github.com/repos/DataDog/datadog-agent/issues/comments{/number}","contents_url":"https://api.github.com/repos/DataDog/datadog-agent/contents/{+path}","compare_url":"https://api.github.com/repos/DataDog/datadog-agent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DataDog/datadog-agent/merges","archive_url":"https://api.github.com/repos/DataDog/datadog-agent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DataDog/datadog-agent/downloads","issues_url":"https://api.github.com/repos/DataDog/datadog-agent/issues{/number}","pulls_url":"https://api.github.com/repos/DataDog/datadog-agent/pulls{/number}","milestones_url":"https://api.github.com/repos/DataDog/datadog-agent/milestones{/number}","notifications_url":"https://api.github.com/repos/DataDog/datadog-agent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DataDog/datadog-agent/labels{/name}","releases_url":"https://api.github.com/repos/DataDog/datadog-agent/releases{/id}","deployments_url":"https://api.github.com/repos/DataDog/datadog-agent/deployments","created_at":"2016-01-19T17:40:41Z","updated_at":"2018-12-21T08:14:03Z","pushed_at":"2018-12-21T09:16:40Z","git_url":"git://github.com/DataDog/datadog-agent.git","ssh_url":"git@github.com:DataDog/datadog-agent.git","clone_url":"https://github.com/DataDog/datadog-agent.git","svn_url":"https://github.com/DataDog/datadog-agent","homepage":"https://docs.datadoghq.com/","size":19300,"stargazers_count":341,"watchers_count":341,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":162,"mirror_url":null,"archived":false,"open_issues_count":195,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":162,"open_issues":195,"watchers":341,"default_branch":"master"}},"base":{"label":"DataDog:achntrl/fix-bug-duplicate-logs","ref":"achntrl/fix-bug-duplicate-logs","sha":"e775d8b0159dbe62f6096cdeb202aba9ab56b1d8","user":{"login":"DataDog","id":365230,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2NTIzMA==","avatar_url":"https://avatars1.githubusercontent.com/u/365230?v=4","gravatar_id":"","url":"https://api.github.com/users/DataDog","html_url":"https://github.com/DataDog","followers_url":"https://api.github.com/users/DataDog/followers","following_url":"https://api.github.com/users/DataDog/following{/other_user}","gists_url":"https://api.github.com/users/DataDog/gists{/gist_id}","starred_url":"https://api.github.com/users/DataDog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataDog/subscriptions","organizations_url":"https://api.github.com/users/DataDog/orgs","repos_url":"https://api.github.com/users/DataDog/repos","events_url":"https://api.github.com/users/DataDog/events{/privacy}","received_events_url":"https://api.github.com/users/DataDog/received_events","type":"Organization","site_admin":false},"repo":{"id":49970739,"node_id":"MDEwOlJlcG9zaXRvcnk0OTk3MDczOQ==","name":"datadog-agent","full_name":"DataDog/datadog-agent","private":false,"owner":{"login":"DataDog","id":365230,"node_id":"MDEyOk9yZ2FuaXphdGlvbjM2NTIzMA==","avatar_url":"https://avatars1.githubusercontent.com/u/365230?v=4","gravatar_id":"","url":"https://api.github.com/users/DataDog","html_url":"https://github.com/DataDog","followers_url":"https://api.github.com/users/DataDog/followers","following_url":"https://api.github.com/users/DataDog/following{/other_user}","gists_url":"https://api.github.com/users/DataDog/gists{/gist_id}","starred_url":"https://api.github.com/users/DataDog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataDog/subscriptions","organizations_url":"https://api.github.com/users/DataDog/orgs","repos_url":"https://api.github.com/users/DataDog/repos","events_url":"https://api.github.com/users/DataDog/events{/privacy}","received_events_url":"https://api.github.com/users/DataDog/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/DataDog/datadog-agent","description":"Datadog Agent ","fork":false,"url":"https://api.github.com/repos/DataDog/datadog-agent","forks_url":"https://api.github.com/repos/DataDog/datadog-agent/forks","keys_url":"https://api.github.com/repos/DataDog/datadog-agent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DataDog/datadog-agent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DataDog/datadog-agent/teams","hooks_url":"https://api.github.com/repos/DataDog/datadog-agent/hooks","issue_events_url":"https://api.github.com/repos/DataDog/datadog-agent/issues/events{/number}","events_url":"https://api.github.com/repos/DataDog/datadog-agent/events","assignees_url":"https://api.github.com/repos/DataDog/datadog-agent/assignees{/user}","branches_url":"https://api.github.com/repos/DataDog/datadog-agent/branches{/branch}","tags_url":"https://api.github.com/repos/DataDog/datadog-agent/tags","blobs_url":"https://api.github.com/repos/DataDog/datadog-agent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DataDog/datadog-agent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DataDog/datadog-agent/git/refs{/sha}","trees_url":"https://api.github.com/repos/DataDog/datadog-agent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DataDog/datadog-agent/statuses/{sha}","languages_url":"https://api.github.com/repos/DataDog/datadog-agent/languages","stargazers_url":"https://api.github.com/repos/DataDog/datadog-agent/stargazers","contributors_url":"https://api.github.com/repos/DataDog/datadog-agent/contributors","subscribers_url":"https://api.github.com/repos/DataDog/datadog-agent/subscribers","subscription_url":"https://api.github.com/repos/DataDog/datadog-agent/subscription","commits_url":"https://api.github.com/repos/DataDog/datadog-agent/commits{/sha}","git_commits_url":"https://api.github.com/repos/DataDog/datadog-agent/git/commits{/sha}","comments_url":"https://api.github.com/repos/DataDog/datadog-agent/comments{/number}","issue_comment_url":"https://api.github.com/repos/DataDog/datadog-agent/issues/comments{/number}","contents_url":"https://api.github.com/repos/DataDog/datadog-agent/contents/{+path}","compare_url":"https://api.github.com/repos/DataDog/datadog-agent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DataDog/datadog-agent/merges","archive_url":"https://api.github.com/repos/DataDog/datadog-agent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DataDog/datadog-agent/downloads","issues_url":"https://api.github.com/repos/DataDog/datadog-agent/issues{/number}","pulls_url":"https://api.github.com/repos/DataDog/datadog-agent/pulls{/number}","milestones_url":"https://api.github.com/repos/DataDog/datadog-agent/milestones{/number}","notifications_url":"https://api.github.com/repos/DataDog/datadog-agent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DataDog/datadog-agent/labels{/name}","releases_url":"https://api.github.com/repos/DataDog/datadog-agent/releases{/id}","deployments_url":"https://api.github.com/repos/DataDog/datadog-agent/deployments","created_at":"2016-01-19T17:40:41Z","updated_at":"2018-12-21T08:14:03Z","pushed_at":"2018-12-21T09:16:40Z","git_url":"git://github.com/DataDog/datadog-agent.git","ssh_url":"git@github.com:DataDog/datadog-agent.git","clone_url":"https://github.com/DataDog/datadog-agent.git","svn_url":"https://github.com/DataDog/datadog-agent","homepage":"https://docs.datadoghq.com/","size":19300,"stargazers_count":341,"watchers_count":341,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":162,"mirror_url":null,"archived":false,"open_issues_count":195,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":162,"open_issues":195,"watchers":341,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DataDog/datadog-agent/pulls/2817"},"html":{"href":"https://github.com/DataDog/datadog-agent/pull/2817"},"issue":{"href":"https://api.github.com/repos/DataDog/datadog-agent/issues/2817"},"comments":{"href":"https://api.github.com/repos/DataDog/datadog-agent/issues/2817/comments"},"review_comments":{"href":"https://api.github.com/repos/DataDog/datadog-agent/pulls/2817/comments"},"review_comment":{"href":"https://api.github.com/repos/DataDog/datadog-agent/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DataDog/datadog-agent/pulls/2817/commits"},"statuses":{"href":"https://api.github.com/repos/DataDog/datadog-agent/statuses/e91ccab0c09f1df1f61b3fd9818b99cccc6ac2fa"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"ajacquemot"}}