{"action":"created","comment":{"url":"https://api.github.com/repos/DataDog/integrations-core/pulls/comments/125320452","pull_request_review_id":47696580,"id":125320452,"diff_hunk":"@@ -20,28 +24,53 @@ namespace :ci do\n \n     task :install do\n       Rake::Task['ci:common:install'].invoke('couch')\n-      sh %(docker run -p #{container_port}:#{container_port} --name #{container_name} -d couchdb:#{couch_version})\n+      docker_args = if couch_2?\n+                      %(--with-admin-party-please --with-haproxy -n 1)\n+                    else\n+                      %()\n+                    end\n+      sh %(docker run -p #{container_port}:#{container_port} --name #{container_name} -d #{couch_version} ) + docker_args\n     end\n \n     task before_script: ['ci:common:before_script'] do\n+      if couch_2?\n+        ENV['NOSE_FILTER'] = if ENV['NOSE_FILTER']\n+                               ENV['NOSE_FILTER'] + ' and not couch1_only'\n+                             else\n+                               'not couch1_only'\n+                             end\n+      end\n+\n       Wait.for container_port\n       count = 0\n       logs = `docker logs dd-test-couch 2>&1`\n       puts 'Waiting for couchdb to come up'\n-      until count == 20 || logs.include?('CouchDB has started')\n+      couch_up_msg = couch_2? ? 'cluster is set up' : 'CouchDB has started'\n+      until count == 20 || logs.include?(couch_up_msg)\n         sleep_for 2\n         logs = `docker logs dd-test-couch 2>&1`\n         count += 1\n       end\n-      puts 'couchdb is up!' if logs.include? 'CouchDB has started'\n-      # Create a test database\n-      sh %(curl -X PUT http://localhost:5984/kennel)\n+      puts 'couchdb is up!' if logs.include? couch_up_msg\n+\n+      if couch_2?\n+        # couch 2 takes a little longer to be available, but doesn't have more\n+        # logs we can look for","path":"couch/ci/couch.rake","position":53,"original_position":53,"commit_id":"86a1872494031c60116ddc1844d78c723a27f638","original_commit_id":"86a1872494031c60116ddc1844d78c723a27f638","user":{"login":"gmmeyer","id":3253673,"avatar_url":"https://avatars2.githubusercontent.com/u/3253673?v=3","gravatar_id":"","url":"https://api.github.com/users/gmmeyer","html_url":"https://github.com/gmmeyer","followers_url":"https://api.github.com/users/gmmeyer/followers","following_url":"https://api.github.com/users/gmmeyer/following{/other_user}","gists_url":"https://api.github.com/users/gmmeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/gmmeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmmeyer/subscriptions","organizations_url":"https://api.github.com/users/gmmeyer/orgs","repos_url":"https://api.github.com/users/gmmeyer/repos","events_url":"https://api.github.com/users/gmmeyer/events{/privacy}","received_events_url":"https://api.github.com/users/gmmeyer/received_events","type":"User","site_admin":false},"body":"In some other tests we try pinging endpoints until it comes up. Would that work for couch2?","created_at":"2017-07-03T15:56:33Z","updated_at":"2017-07-03T15:58:07Z","html_url":"https://github.com/DataDog/integrations-core/pull/469#discussion_r125320452","pull_request_url":"https://api.github.com/repos/DataDog/integrations-core/pulls/469","_links":{"self":{"href":"https://api.github.com/repos/DataDog/integrations-core/pulls/comments/125320452"},"html":{"href":"https://github.com/DataDog/integrations-core/pull/469#discussion_r125320452"},"pull_request":{"href":"https://api.github.com/repos/DataDog/integrations-core/pulls/469"}}},"pull_request":{"url":"https://api.github.com/repos/DataDog/integrations-core/pulls/469","id":124889164,"html_url":"https://github.com/DataDog/integrations-core/pull/469","diff_url":"https://github.com/DataDog/integrations-core/pull/469.diff","patch_url":"https://github.com/DataDog/integrations-core/pull/469.patch","issue_url":"https://api.github.com/repos/DataDog/integrations-core/issues/469","number":469,"state":"open","locked":false,"title":"Couch 2.0 metrics","user":{"login":"emord","id":1471773,"avatar_url":"https://avatars3.githubusercontent.com/u/1471773?v=3","gravatar_id":"","url":"https://api.github.com/users/emord","html_url":"https://github.com/emord","followers_url":"https://api.github.com/users/emord/followers","following_url":"https://api.github.com/users/emord/following{/other_user}","gists_url":"https://api.github.com/users/emord/gists{/gist_id}","starred_url":"https://api.github.com/users/emord/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emord/subscriptions","organizations_url":"https://api.github.com/users/emord/orgs","repos_url":"https://api.github.com/users/emord/repos","events_url":"https://api.github.com/users/emord/events{/privacy}","received_events_url":"https://api.github.com/users/emord/received_events","type":"User","site_admin":false},"body":"<!-- *Note: Please remember to review the Datadog [Contribution Guidelines](https://github.com/DataDog/dd-agent/blob/master/CONTRIBUTING.md)\r\nif you have not yet done so.* -->\r\n\r\n### What does this PR do? \r\n\r\nAdds support for couch 2.0 metrics. In couch 2.0, `_stats` exist at the node endpoint instead of the main couch endpoint.\r\n\r\nMy priority with this PR is to keep similar metrics between couch 1.6 and couch 2.0. This made the most sense to me, but happy to look into creating a separate integration for 2.0","created_at":"2017-06-09T15:10:39Z","updated_at":"2017-07-03T15:58:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"70688a87b45728222537219927bdca49f9de0a5a","assignee":{"login":"masci","id":7241,"avatar_url":"https://avatars0.githubusercontent.com/u/7241?v=3","gravatar_id":"","url":"https://api.github.com/users/masci","html_url":"https://github.com/masci","followers_url":"https://api.github.com/users/masci/followers","following_url":"https://api.github.com/users/masci/following{/other_user}","gists_url":"https://api.github.com/users/masci/gists{/gist_id}","starred_url":"https://api.github.com/users/masci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/masci/subscriptions","organizations_url":"https://api.github.com/users/masci/orgs","repos_url":"https://api.github.com/users/masci/repos","events_url":"https://api.github.com/users/masci/events{/privacy}","received_events_url":"https://api.github.com/users/masci/received_events","type":"User","site_admin":false},"assignees":[{"login":"masci","id":7241,"avatar_url":"https://avatars0.githubusercontent.com/u/7241?v=3","gravatar_id":"","url":"https://api.github.com/users/masci","html_url":"https://github.com/masci","followers_url":"https://api.github.com/users/masci/followers","following_url":"https://api.github.com/users/masci/following{/other_user}","gists_url":"https://api.github.com/users/masci/gists{/gist_id}","starred_url":"https://api.github.com/users/masci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/masci/subscriptions","organizations_url":"https://api.github.com/users/masci/orgs","repos_url":"https://api.github.com/users/masci/repos","events_url":"https://api.github.com/users/masci/events{/privacy}","received_events_url":"https://api.github.com/users/masci/received_events","type":"User","site_admin":false},{"login":"gmmeyer","id":3253673,"avatar_url":"https://avatars2.githubusercontent.com/u/3253673?v=3","gravatar_id":"","url":"https://api.github.com/users/gmmeyer","html_url":"https://github.com/gmmeyer","followers_url":"https://api.github.com/users/gmmeyer/followers","following_url":"https://api.github.com/users/gmmeyer/following{/other_user}","gists_url":"https://api.github.com/users/gmmeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/gmmeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmmeyer/subscriptions","organizations_url":"https://api.github.com/users/gmmeyer/orgs","repos_url":"https://api.github.com/users/gmmeyer/repos","events_url":"https://api.github.com/users/gmmeyer/events{/privacy}","received_events_url":"https://api.github.com/users/gmmeyer/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"milestone":{"url":"https://api.github.com/repos/DataDog/integrations-core/milestones/4","html_url":"https://github.com/DataDog/integrations-core/milestone/4","labels_url":"https://api.github.com/repos/DataDog/integrations-core/milestones/4/labels","id":2394635,"number":4,"title":"triage","description":null,"creator":{"login":"gmmeyer","id":3253673,"avatar_url":"https://avatars2.githubusercontent.com/u/3253673?v=3","gravatar_id":"","url":"https://api.github.com/users/gmmeyer","html_url":"https://github.com/gmmeyer","followers_url":"https://api.github.com/users/gmmeyer/followers","following_url":"https://api.github.com/users/gmmeyer/following{/other_user}","gists_url":"https://api.github.com/users/gmmeyer/gists{/gist_id}","starred_url":"https://api.github.com/users/gmmeyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmmeyer/subscriptions","organizations_url":"https://api.github.com/users/gmmeyer/orgs","repos_url":"https://api.github.com/users/gmmeyer/repos","events_url":"https://api.github.com/users/gmmeyer/events{/privacy}","received_events_url":"https://api.github.com/users/gmmeyer/received_events","type":"User","site_admin":false},"open_issues":21,"closed_issues":2,"state":"open","created_at":"2017-03-17T22:01:05Z","updated_at":"2017-06-30T18:49:46Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/DataDog/integrations-core/pulls/469/commits","review_comments_url":"https://api.github.com/repos/DataDog/integrations-core/pulls/469/comments","review_comment_url":"https://api.github.com/repos/DataDog/integrations-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DataDog/integrations-core/issues/469/comments","statuses_url":"https://api.github.com/repos/DataDog/integrations-core/statuses/86a1872494031c60116ddc1844d78c723a27f638","head":{"label":"emord:couch2","ref":"couch2","sha":"86a1872494031c60116ddc1844d78c723a27f638","user":{"login":"emord","id":1471773,"avatar_url":"https://avatars3.githubusercontent.com/u/1471773?v=3","gravatar_id":"","url":"https://api.github.com/users/emord","html_url":"https://github.com/emord","followers_url":"https://api.github.com/users/emord/followers","following_url":"https://api.github.com/users/emord/following{/other_user}","gists_url":"https://api.github.com/users/emord/gists{/gist_id}","starred_url":"https://api.github.com/users/emord/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emord/subscriptions","organizations_url":"https://api.github.com/users/emord/orgs","repos_url":"https://api.github.com/users/emord/repos","events_url":"https://api.github.com/users/emord/events{/privacy}","received_events_url":"https://api.github.com/users/emord/received_events","type":"User","site_admin":false},"repo":{"id":93790438,"name":"integrations-core","full_name":"emord/integrations-core","owner":{"login":"emord","id":1471773,"avatar_url":"https://avatars3.githubusercontent.com/u/1471773?v=3","gravatar_id":"","url":"https://api.github.com/users/emord","html_url":"https://github.com/emord","followers_url":"https://api.github.com/users/emord/followers","following_url":"https://api.github.com/users/emord/following{/other_user}","gists_url":"https://api.github.com/users/emord/gists{/gist_id}","starred_url":"https://api.github.com/users/emord/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/emord/subscriptions","organizations_url":"https://api.github.com/users/emord/orgs","repos_url":"https://api.github.com/users/emord/repos","events_url":"https://api.github.com/users/emord/events{/privacy}","received_events_url":"https://api.github.com/users/emord/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/emord/integrations-core","description":"Core integrations of the datadog agent","fork":true,"url":"https://api.github.com/repos/emord/integrations-core","forks_url":"https://api.github.com/repos/emord/integrations-core/forks","keys_url":"https://api.github.com/repos/emord/integrations-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/emord/integrations-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/emord/integrations-core/teams","hooks_url":"https://api.github.com/repos/emord/integrations-core/hooks","issue_events_url":"https://api.github.com/repos/emord/integrations-core/issues/events{/number}","events_url":"https://api.github.com/repos/emord/integrations-core/events","assignees_url":"https://api.github.com/repos/emord/integrations-core/assignees{/user}","branches_url":"https://api.github.com/repos/emord/integrations-core/branches{/branch}","tags_url":"https://api.github.com/repos/emord/integrations-core/tags","blobs_url":"https://api.github.com/repos/emord/integrations-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/emord/integrations-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/emord/integrations-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/emord/integrations-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/emord/integrations-core/statuses/{sha}","languages_url":"https://api.github.com/repos/emord/integrations-core/languages","stargazers_url":"https://api.github.com/repos/emord/integrations-core/stargazers","contributors_url":"https://api.github.com/repos/emord/integrations-core/contributors","subscribers_url":"https://api.github.com/repos/emord/integrations-core/subscribers","subscription_url":"https://api.github.com/repos/emord/integrations-core/subscription","commits_url":"https://api.github.com/repos/emord/integrations-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/emord/integrations-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/emord/integrations-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/emord/integrations-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/emord/integrations-core/contents/{+path}","compare_url":"https://api.github.com/repos/emord/integrations-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/emord/integrations-core/merges","archive_url":"https://api.github.com/repos/emord/integrations-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/emord/integrations-core/downloads","issues_url":"https://api.github.com/repos/emord/integrations-core/issues{/number}","pulls_url":"https://api.github.com/repos/emord/integrations-core/pulls{/number}","milestones_url":"https://api.github.com/repos/emord/integrations-core/milestones{/number}","notifications_url":"https://api.github.com/repos/emord/integrations-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/emord/integrations-core/labels{/name}","releases_url":"https://api.github.com/repos/emord/integrations-core/releases{/id}","deployments_url":"https://api.github.com/repos/emord/integrations-core/deployments","created_at":"2017-06-08T20:46:23Z","updated_at":"2017-06-08T20:46:26Z","pushed_at":"2017-06-29T19:47:06Z","git_url":"git://github.com/emord/integrations-core.git","ssh_url":"git@github.com:emord/integrations-core.git","clone_url":"https://github.com/emord/integrations-core.git","svn_url":"https://github.com/emord/integrations-core","homepage":null,"size":3621,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"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":"DataDog:master","ref":"master","sha":"dbc9faeca3cd40af7563c35d59e4935095fc8958","user":{"login":"DataDog","id":365230,"avatar_url":"https://avatars2.githubusercontent.com/u/365230?v=3","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":47203045,"name":"integrations-core","full_name":"DataDog/integrations-core","owner":{"login":"DataDog","id":365230,"avatar_url":"https://avatars2.githubusercontent.com/u/365230?v=3","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},"private":false,"html_url":"https://github.com/DataDog/integrations-core","description":"Core integrations of the datadog agent","fork":false,"url":"https://api.github.com/repos/DataDog/integrations-core","forks_url":"https://api.github.com/repos/DataDog/integrations-core/forks","keys_url":"https://api.github.com/repos/DataDog/integrations-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DataDog/integrations-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DataDog/integrations-core/teams","hooks_url":"https://api.github.com/repos/DataDog/integrations-core/hooks","issue_events_url":"https://api.github.com/repos/DataDog/integrations-core/issues/events{/number}","events_url":"https://api.github.com/repos/DataDog/integrations-core/events","assignees_url":"https://api.github.com/repos/DataDog/integrations-core/assignees{/user}","branches_url":"https://api.github.com/repos/DataDog/integrations-core/branches{/branch}","tags_url":"https://api.github.com/repos/DataDog/integrations-core/tags","blobs_url":"https://api.github.com/repos/DataDog/integrations-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DataDog/integrations-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DataDog/integrations-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/DataDog/integrations-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DataDog/integrations-core/statuses/{sha}","languages_url":"https://api.github.com/repos/DataDog/integrations-core/languages","stargazers_url":"https://api.github.com/repos/DataDog/integrations-core/stargazers","contributors_url":"https://api.github.com/repos/DataDog/integrations-core/contributors","subscribers_url":"https://api.github.com/repos/DataDog/integrations-core/subscribers","subscription_url":"https://api.github.com/repos/DataDog/integrations-core/subscription","commits_url":"https://api.github.com/repos/DataDog/integrations-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/DataDog/integrations-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/DataDog/integrations-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/DataDog/integrations-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/DataDog/integrations-core/contents/{+path}","compare_url":"https://api.github.com/repos/DataDog/integrations-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DataDog/integrations-core/merges","archive_url":"https://api.github.com/repos/DataDog/integrations-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DataDog/integrations-core/downloads","issues_url":"https://api.github.com/repos/DataDog/integrations-core/issues{/number}","pulls_url":"https://api.github.com/repos/DataDog/integrations-core/pulls{/number}","milestones_url":"https://api.github.com/repos/DataDog/integrations-core/milestones{/number}","notifications_url":"https://api.github.com/repos/DataDog/integrations-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DataDog/integrations-core/labels{/name}","releases_url":"https://api.github.com/repos/DataDog/integrations-core/releases{/id}","deployments_url":"https://api.github.com/repos/DataDog/integrations-core/deployments","created_at":"2015-12-01T16:41:45Z","updated_at":"2017-06-28T02:58:43Z","pushed_at":"2017-07-03T15:57:00Z","git_url":"git://github.com/DataDog/integrations-core.git","ssh_url":"git@github.com:DataDog/integrations-core.git","clone_url":"https://github.com/DataDog/integrations-core.git","svn_url":"https://github.com/DataDog/integrations-core","homepage":null,"size":3673,"stargazers_count":28,"watchers_count":28,"language":"Python","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":85,"mirror_url":null,"open_issues_count":59,"forks":85,"open_issues":59,"watchers":28,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DataDog/integrations-core/pulls/469"},"html":{"href":"https://github.com/DataDog/integrations-core/pull/469"},"issue":{"href":"https://api.github.com/repos/DataDog/integrations-core/issues/469"},"comments":{"href":"https://api.github.com/repos/DataDog/integrations-core/issues/469/comments"},"review_comments":{"href":"https://api.github.com/repos/DataDog/integrations-core/pulls/469/comments"},"review_comment":{"href":"https://api.github.com/repos/DataDog/integrations-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DataDog/integrations-core/pulls/469/commits"},"statuses":{"href":"https://api.github.com/repos/DataDog/integrations-core/statuses/86a1872494031c60116ddc1844d78c723a27f638"}}}}
{"actor":{"display_login":"gmmeyer"}}