{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/pulls/comments/237306814","pull_request_review_id":179573098,"id":237306814,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzNzMwNjgxNA==","diff_hunk":"@@ -0,0 +1,61 @@\n+import unittest\n+\n+from parameterized import parameterized\n+from integration_tests.dataproc_test_case import DataprocTestCase\n+\n+\n+class GangliaTestCase(DataprocTestCase):\n+    COMPONENT = 'ganglia'\n+    INIT_ACTION = 'gs://dataproc-initialization-actions/ganglia/ganglia.sh'\n+    TEST_SCRIPT_FILE_NAME = 'verify_ganglia_running.py'\n+\n+    def verify_instance(self, name):\n+        self.upload_test_file(name)\n+        self.__run_command_on_cluster(name,'yes | sudo apt-get install python3-pip')\n+        self.__run_command_on_cluster(name,'sudo pip3 install requests-html')\n+        self.__run_test_file(name)\n+        self.remove_test_script(name)\n+\n+    def __run_test_file(self, name):\n+        cmd = 'gcloud compute ssh {} -- \"python3 {} \"'.format(\n+            name,\n+            self.TEST_SCRIPT_FILE_NAME\n+        )\n+        ret_code, stdout, stderr = self.run_command(cmd)\n+        self.assertEqual(ret_code, 0, \"Failed to run test file. Error: {}\".format(stderr))\n+\n+    def __run_command_on_cluster(self, name, command):","path":"ganglia/test_ganglia.py","position":27,"original_position":27,"commit_id":"41a21414ab61f3405f16ac6e2f43d8bcca3831d6","original_commit_id":"41a21414ab61f3405f16ac6e2f43d8bcca3831d6","user":{"login":"karth295","id":5653442,"node_id":"MDQ6VXNlcjU2NTM0NDI=","avatar_url":"https://avatars3.githubusercontent.com/u/5653442?v=4","gravatar_id":"","url":"https://api.github.com/users/karth295","html_url":"https://github.com/karth295","followers_url":"https://api.github.com/users/karth295/followers","following_url":"https://api.github.com/users/karth295/following{/other_user}","gists_url":"https://api.github.com/users/karth295/gists{/gist_id}","starred_url":"https://api.github.com/users/karth295/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karth295/subscriptions","organizations_url":"https://api.github.com/users/karth295/orgs","repos_url":"https://api.github.com/users/karth295/repos","events_url":"https://api.github.com/users/karth295/events{/privacy}","received_events_url":"https://api.github.com/users/karth295/received_events","type":"User","site_admin":false},"body":"Ah gotcha -- after all the tests are merged, we should think about refactoring these utilities into a common library. Pyspark jobs do let you bring additional libraries, fwiw.\r\n\r\nBut for now I'll go ahead and merge this PR.","created_at":"2018-11-28T23:50:17Z","updated_at":"2018-11-28T23:50:17Z","html_url":"https://github.com/GoogleCloudPlatform/dataproc-initialization-actions/pull/380#discussion_r237306814","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/pulls/380","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/pulls/comments/237306814"},"html":{"href":"https://github.com/GoogleCloudPlatform/dataproc-initialization-actions/pull/380#discussion_r237306814"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/pulls/380"}},"in_reply_to_id":237004675},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/pulls/380","id":228615120,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI4NjE1MTIw","html_url":"https://github.com/GoogleCloudPlatform/dataproc-initialization-actions/pull/380","diff_url":"https://github.com/GoogleCloudPlatform/dataproc-initialization-actions/pull/380.diff","patch_url":"https://github.com/GoogleCloudPlatform/dataproc-initialization-actions/pull/380.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/issues/380","number":380,"state":"open","locked":false,"title":"Ganglia integration tests","user":{"login":"adam-stasiak","id":25153919,"node_id":"MDQ6VXNlcjI1MTUzOTE5","avatar_url":"https://avatars0.githubusercontent.com/u/25153919?v=4","gravatar_id":"","url":"https://api.github.com/users/adam-stasiak","html_url":"https://github.com/adam-stasiak","followers_url":"https://api.github.com/users/adam-stasiak/followers","following_url":"https://api.github.com/users/adam-stasiak/following{/other_user}","gists_url":"https://api.github.com/users/adam-stasiak/gists{/gist_id}","starred_url":"https://api.github.com/users/adam-stasiak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adam-stasiak/subscriptions","organizations_url":"https://api.github.com/users/adam-stasiak/orgs","repos_url":"https://api.github.com/users/adam-stasiak/repos","events_url":"https://api.github.com/users/adam-stasiak/events{/privacy}","received_events_url":"https://api.github.com/users/adam-stasiak/received_events","type":"User","site_admin":false},"body":"These scripts can be used for testing Ganglia init action on single, standard and ha configurations.\r\n\r\n","created_at":"2018-11-06T08:56:58Z","updated_at":"2018-11-28T23:50:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"865c737a313125d42b51e75c31ee746ed3772d6b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":272081215,"node_id":"MDU6TGFiZWwyNzIwODEyMTU=","url":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/labels/cla:%20yes","name":"cla: yes","color":"009800","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/pulls/380/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/pulls/380/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/issues/380/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/statuses/41a21414ab61f3405f16ac6e2f43d8bcca3831d6","head":{"label":"adam-stasiak:ganglia_tests","ref":"ganglia_tests","sha":"41a21414ab61f3405f16ac6e2f43d8bcca3831d6","user":{"login":"adam-stasiak","id":25153919,"node_id":"MDQ6VXNlcjI1MTUzOTE5","avatar_url":"https://avatars0.githubusercontent.com/u/25153919?v=4","gravatar_id":"","url":"https://api.github.com/users/adam-stasiak","html_url":"https://github.com/adam-stasiak","followers_url":"https://api.github.com/users/adam-stasiak/followers","following_url":"https://api.github.com/users/adam-stasiak/following{/other_user}","gists_url":"https://api.github.com/users/adam-stasiak/gists{/gist_id}","starred_url":"https://api.github.com/users/adam-stasiak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adam-stasiak/subscriptions","organizations_url":"https://api.github.com/users/adam-stasiak/orgs","repos_url":"https://api.github.com/users/adam-stasiak/repos","events_url":"https://api.github.com/users/adam-stasiak/events{/privacy}","received_events_url":"https://api.github.com/users/adam-stasiak/received_events","type":"User","site_admin":false},"repo":{"id":122451778,"node_id":"MDEwOlJlcG9zaXRvcnkxMjI0NTE3Nzg=","name":"dataproc-initialization-actions","full_name":"adam-stasiak/dataproc-initialization-actions","private":false,"owner":{"login":"adam-stasiak","id":25153919,"node_id":"MDQ6VXNlcjI1MTUzOTE5","avatar_url":"https://avatars0.githubusercontent.com/u/25153919?v=4","gravatar_id":"","url":"https://api.github.com/users/adam-stasiak","html_url":"https://github.com/adam-stasiak","followers_url":"https://api.github.com/users/adam-stasiak/followers","following_url":"https://api.github.com/users/adam-stasiak/following{/other_user}","gists_url":"https://api.github.com/users/adam-stasiak/gists{/gist_id}","starred_url":"https://api.github.com/users/adam-stasiak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adam-stasiak/subscriptions","organizations_url":"https://api.github.com/users/adam-stasiak/orgs","repos_url":"https://api.github.com/users/adam-stasiak/repos","events_url":"https://api.github.com/users/adam-stasiak/events{/privacy}","received_events_url":"https://api.github.com/users/adam-stasiak/received_events","type":"User","site_admin":false},"html_url":"https://github.com/adam-stasiak/dataproc-initialization-actions","description":"Run in all nodes of your cluster before the cluster starts - lets you customize your cluster","fork":true,"url":"https://api.github.com/repos/adam-stasiak/dataproc-initialization-actions","forks_url":"https://api.github.com/repos/adam-stasiak/dataproc-initialization-actions/forks","keys_url":"https://api.github.com/repos/adam-stasiak/dataproc-initialization-actions/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adam-stasiak/dataproc-initialization-actions/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adam-stasiak/dataproc-initialization-actions/teams","hooks_url":"https://api.github.com/repos/adam-stasiak/dataproc-initialization-actions/hooks","issue_events_url":"https://api.github.com/repos/adam-stasiak/dataproc-initialization-actions/issues/events{/number}","events_url":"https://api.github.com/repos/adam-stasiak/dataproc-initialization-actions/events","assignees_url":"https://api.github.com/repos/adam-stasiak/dataproc-initialization-actions/assignees{/user}","branches_url":"https://api.github.com/repos/adam-stasiak/dataproc-initialization-actions/branches{/branch}","tags_url":"https://api.github.com/repos/adam-stasiak/dataproc-initialization-actions/tags","blobs_url":"https://api.github.com/repos/adam-stasiak/dataproc-initialization-actions/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adam-stasiak/dataproc-initialization-actions/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adam-stasiak/dataproc-initialization-actions/git/refs{/sha}","trees_url":"https://api.github.com/repos/adam-stasiak/dataproc-initialization-actions/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adam-stasiak/dataproc-initialization-actions/statuses/{sha}","languages_url":"https://api.github.com/repos/adam-stasiak/dataproc-initialization-actions/languages","stargazers_url":"https://api.github.com/repos/adam-stasiak/dataproc-initialization-actions/stargazers","contributors_url":"https://api.github.com/repos/adam-stasiak/dataproc-initialization-actions/contributors","subscribers_url":"https://api.github.com/repos/adam-stasiak/dataproc-initialization-actions/subscribers","subscription_url":"https://api.github.com/repos/adam-stasiak/dataproc-initialization-actions/subscription","commits_url":"https://api.github.com/repos/adam-stasiak/dataproc-initialization-actions/commits{/sha}","git_commits_url":"https://api.github.com/repos/adam-stasiak/dataproc-initialization-actions/git/commits{/sha}","comments_url":"https://api.github.com/repos/adam-stasiak/dataproc-initialization-actions/comments{/number}","issue_comment_url":"https://api.github.com/repos/adam-stasiak/dataproc-initialization-actions/issues/comments{/number}","contents_url":"https://api.github.com/repos/adam-stasiak/dataproc-initialization-actions/contents/{+path}","compare_url":"https://api.github.com/repos/adam-stasiak/dataproc-initialization-actions/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adam-stasiak/dataproc-initialization-actions/merges","archive_url":"https://api.github.com/repos/adam-stasiak/dataproc-initialization-actions/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adam-stasiak/dataproc-initialization-actions/downloads","issues_url":"https://api.github.com/repos/adam-stasiak/dataproc-initialization-actions/issues{/number}","pulls_url":"https://api.github.com/repos/adam-stasiak/dataproc-initialization-actions/pulls{/number}","milestones_url":"https://api.github.com/repos/adam-stasiak/dataproc-initialization-actions/milestones{/number}","notifications_url":"https://api.github.com/repos/adam-stasiak/dataproc-initialization-actions/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adam-stasiak/dataproc-initialization-actions/labels{/name}","releases_url":"https://api.github.com/repos/adam-stasiak/dataproc-initialization-actions/releases{/id}","deployments_url":"https://api.github.com/repos/adam-stasiak/dataproc-initialization-actions/deployments","created_at":"2018-02-22T08:39:26Z","updated_at":"2018-02-22T08:39:27Z","pushed_at":"2018-11-27T16:57:37Z","git_url":"git://github.com/adam-stasiak/dataproc-initialization-actions.git","ssh_url":"git@github.com:adam-stasiak/dataproc-initialization-actions.git","clone_url":"https://github.com/adam-stasiak/dataproc-initialization-actions.git","svn_url":"https://github.com/adam-stasiak/dataproc-initialization-actions","homepage":"https://cloud.google.com/dataproc/init-actions","size":523,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"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":"GoogleCloudPlatform:master","ref":"master","sha":"197b150dfcb313f291732399d9f73cf5278bac96","user":{"login":"GoogleCloudPlatform","id":2810941,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4MTA5NDE=","avatar_url":"https://avatars0.githubusercontent.com/u/2810941?v=4","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":44124590,"node_id":"MDEwOlJlcG9zaXRvcnk0NDEyNDU5MA==","name":"dataproc-initialization-actions","full_name":"GoogleCloudPlatform/dataproc-initialization-actions","private":false,"owner":{"login":"GoogleCloudPlatform","id":2810941,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4MTA5NDE=","avatar_url":"https://avatars0.githubusercontent.com/u/2810941?v=4","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/GoogleCloudPlatform/dataproc-initialization-actions","description":"Run in all nodes of your cluster before the cluster starts - lets you customize your cluster","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/deployments","created_at":"2015-10-12T17:58:35Z","updated_at":"2018-11-28T23:36:18Z","pushed_at":"2018-11-28T23:36:14Z","git_url":"git://github.com/GoogleCloudPlatform/dataproc-initialization-actions.git","ssh_url":"git@github.com:GoogleCloudPlatform/dataproc-initialization-actions.git","clone_url":"https://github.com/GoogleCloudPlatform/dataproc-initialization-actions.git","svn_url":"https://github.com/GoogleCloudPlatform/dataproc-initialization-actions","homepage":"https://cloud.google.com/dataproc/init-actions","size":487,"stargazers_count":291,"watchers_count":291,"language":"Shell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":247,"mirror_url":null,"archived":false,"open_issues_count":35,"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":247,"open_issues":35,"watchers":291,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/pulls/380"},"html":{"href":"https://github.com/GoogleCloudPlatform/dataproc-initialization-actions/pull/380"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/issues/380"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/issues/380/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/pulls/380/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/pulls/380/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/dataproc-initialization-actions/statuses/41a21414ab61f3405f16ac6e2f43d8bcca3831d6"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"karth295"}}