{"action":"created","comment":{"url":"https://api.github.com/repos/lyft/incubator-airflow/pulls/comments/207323898","pull_request_review_id":142914398,"id":207323898,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNzMyMzg5OA==","diff_hunk":"@@ -2609,7 +2611,10 @@ def get_extra_links(self, dttm, link_name):\n             one of the options specified in `extra_links`\n         :return: A URL\n         \"\"\"\n-        pass\n+\n+        if link_name in type(self).extra_link_functions:\n+            call_func = type(self).extra_link_functions[link_name]\n+            return call_func(self, dttm)","path":"airflow/models.py","position":null,"original_position":17,"commit_id":"bf9ba3a4b943dde123eef7df3db8c20b3896f690","original_commit_id":"cc5048042c7e8080e888d5fdb27b47a25ff3e499","user":{"login":"milton0825","id":6065051,"node_id":"MDQ6VXNlcjYwNjUwNTE=","avatar_url":"https://avatars1.githubusercontent.com/u/6065051?v=4","gravatar_id":"","url":"https://api.github.com/users/milton0825","html_url":"https://github.com/milton0825","followers_url":"https://api.github.com/users/milton0825/followers","following_url":"https://api.github.com/users/milton0825/following{/other_user}","gists_url":"https://api.github.com/users/milton0825/gists{/gist_id}","starred_url":"https://api.github.com/users/milton0825/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milton0825/subscriptions","organizations_url":"https://api.github.com/users/milton0825/orgs","repos_url":"https://api.github.com/users/milton0825/repos","events_url":"https://api.github.com/users/milton0825/events{/privacy}","received_events_url":"https://api.github.com/users/milton0825/received_events","type":"User","site_admin":false},"body":"I agree.","created_at":"2018-08-02T18:12:42Z","updated_at":"2018-08-02T18:12:42Z","html_url":"https://github.com/lyft/incubator-airflow/pull/97#discussion_r207323898","pull_request_url":"https://api.github.com/repos/lyft/incubator-airflow/pulls/97","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/lyft/incubator-airflow/pulls/comments/207323898"},"html":{"href":"https://github.com/lyft/incubator-airflow/pull/97#discussion_r207323898"},"pull_request":{"href":"https://api.github.com/repos/lyft/incubator-airflow/pulls/97"}},"in_reply_to_id":207060430},"pull_request":{"url":"https://api.github.com/repos/lyft/incubator-airflow/pulls/97","id":205258454,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA1MjU4NDU0","html_url":"https://github.com/lyft/incubator-airflow/pull/97","diff_url":"https://github.com/lyft/incubator-airflow/pull/97.diff","patch_url":"https://github.com/lyft/incubator-airflow/pull/97.patch","issue_url":"https://api.github.com/repos/lyft/incubator-airflow/issues/97","number":97,"state":"open","locked":false,"title":"Configure global extra links for every operator through plugin","user":{"login":"milton0825","id":6065051,"node_id":"MDQ6VXNlcjYwNjUwNTE=","avatar_url":"https://avatars1.githubusercontent.com/u/6065051?v=4","gravatar_id":"","url":"https://api.github.com/users/milton0825","html_url":"https://github.com/milton0825","followers_url":"https://api.github.com/users/milton0825/followers","following_url":"https://api.github.com/users/milton0825/following{/other_user}","gists_url":"https://api.github.com/users/milton0825/gists{/gist_id}","starred_url":"https://api.github.com/users/milton0825/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milton0825/subscriptions","organizations_url":"https://api.github.com/users/milton0825/orgs","repos_url":"https://api.github.com/users/milton0825/repos","events_url":"https://api.github.com/users/milton0825/events{/privacy}","received_events_url":"https://api.github.com/users/milton0825/received_events","type":"User","site_admin":false},"body":"Put extra links in plugin\r\n```\r\ndef get_kibana_discover_url(query, days_ago):\r\n    return 'url'\r\n\r\nclass MyFirstPlugin(AirflowPlugin):\r\n    name = \"my_first_plugin\"\r\n    extra_links = {\r\n        'Kibana Logs': get_kibana_discover_url_for_task,\r\n    }\r\n```\r\n\r\nand `Kibana Logs` button will be available for all operators.\r\n\r\nTo register button for individual operator:\r\n```\r\nclass MyFirstOperator(BaseOperator):\r\n\r\n    @apply_defaults\r\n    def __init__(self, my_operator_param, *args, **kwargs):\r\n        self.operator_param = my_operator_param\r\n        super(MyFirstOperator, self).__init__(*args, **kwargs)\r\n\r\n    def execute(self, context):\r\n        log.info(\"Hello World!\")\r\n        log.info('operator_param: %s', self.operator_param)\r\n\r\n    extra_links = ['Qubole logs']\r\n    \r\n    extra_link_functions = {\r\n        'Qubole logs': lambda task, dttm: \"qubole!\"\r\n    }\r\n```\r\n\r\nand `Kibana logs` and `Qubole logs` will be available for `MyFirstOperator`\r\n","created_at":"2018-07-31T22:18:35Z","updated_at":"2018-08-02T18:12:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8f035404a1ea558131373dd23361164adbab63e3","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/lyft/incubator-airflow/pulls/97/commits","review_comments_url":"https://api.github.com/repos/lyft/incubator-airflow/pulls/97/comments","review_comment_url":"https://api.github.com/repos/lyft/incubator-airflow/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lyft/incubator-airflow/issues/97/comments","statuses_url":"https://api.github.com/repos/lyft/incubator-airflow/statuses/bf9ba3a4b943dde123eef7df3db8c20b3896f690","head":{"label":"lyft:kibana-for-all-operators","ref":"kibana-for-all-operators","sha":"bf9ba3a4b943dde123eef7df3db8c20b3896f690","user":{"login":"lyft","id":4269340,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQyNjkzNDA=","avatar_url":"https://avatars2.githubusercontent.com/u/4269340?v=4","gravatar_id":"","url":"https://api.github.com/users/lyft","html_url":"https://github.com/lyft","followers_url":"https://api.github.com/users/lyft/followers","following_url":"https://api.github.com/users/lyft/following{/other_user}","gists_url":"https://api.github.com/users/lyft/gists{/gist_id}","starred_url":"https://api.github.com/users/lyft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lyft/subscriptions","organizations_url":"https://api.github.com/users/lyft/orgs","repos_url":"https://api.github.com/users/lyft/repos","events_url":"https://api.github.com/users/lyft/events{/privacy}","received_events_url":"https://api.github.com/users/lyft/received_events","type":"Organization","site_admin":false},"repo":{"id":58762364,"node_id":"MDEwOlJlcG9zaXRvcnk1ODc2MjM2NA==","name":"incubator-airflow","full_name":"lyft/incubator-airflow","owner":{"login":"lyft","id":4269340,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQyNjkzNDA=","avatar_url":"https://avatars2.githubusercontent.com/u/4269340?v=4","gravatar_id":"","url":"https://api.github.com/users/lyft","html_url":"https://github.com/lyft","followers_url":"https://api.github.com/users/lyft/followers","following_url":"https://api.github.com/users/lyft/following{/other_user}","gists_url":"https://api.github.com/users/lyft/gists{/gist_id}","starred_url":"https://api.github.com/users/lyft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lyft/subscriptions","organizations_url":"https://api.github.com/users/lyft/orgs","repos_url":"https://api.github.com/users/lyft/repos","events_url":"https://api.github.com/users/lyft/events{/privacy}","received_events_url":"https://api.github.com/users/lyft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lyft/incubator-airflow","description":"Apache Airflow (Incubating)","fork":true,"url":"https://api.github.com/repos/lyft/incubator-airflow","forks_url":"https://api.github.com/repos/lyft/incubator-airflow/forks","keys_url":"https://api.github.com/repos/lyft/incubator-airflow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lyft/incubator-airflow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lyft/incubator-airflow/teams","hooks_url":"https://api.github.com/repos/lyft/incubator-airflow/hooks","issue_events_url":"https://api.github.com/repos/lyft/incubator-airflow/issues/events{/number}","events_url":"https://api.github.com/repos/lyft/incubator-airflow/events","assignees_url":"https://api.github.com/repos/lyft/incubator-airflow/assignees{/user}","branches_url":"https://api.github.com/repos/lyft/incubator-airflow/branches{/branch}","tags_url":"https://api.github.com/repos/lyft/incubator-airflow/tags","blobs_url":"https://api.github.com/repos/lyft/incubator-airflow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lyft/incubator-airflow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lyft/incubator-airflow/git/refs{/sha}","trees_url":"https://api.github.com/repos/lyft/incubator-airflow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lyft/incubator-airflow/statuses/{sha}","languages_url":"https://api.github.com/repos/lyft/incubator-airflow/languages","stargazers_url":"https://api.github.com/repos/lyft/incubator-airflow/stargazers","contributors_url":"https://api.github.com/repos/lyft/incubator-airflow/contributors","subscribers_url":"https://api.github.com/repos/lyft/incubator-airflow/subscribers","subscription_url":"https://api.github.com/repos/lyft/incubator-airflow/subscription","commits_url":"https://api.github.com/repos/lyft/incubator-airflow/commits{/sha}","git_commits_url":"https://api.github.com/repos/lyft/incubator-airflow/git/commits{/sha}","comments_url":"https://api.github.com/repos/lyft/incubator-airflow/comments{/number}","issue_comment_url":"https://api.github.com/repos/lyft/incubator-airflow/issues/comments{/number}","contents_url":"https://api.github.com/repos/lyft/incubator-airflow/contents/{+path}","compare_url":"https://api.github.com/repos/lyft/incubator-airflow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lyft/incubator-airflow/merges","archive_url":"https://api.github.com/repos/lyft/incubator-airflow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lyft/incubator-airflow/downloads","issues_url":"https://api.github.com/repos/lyft/incubator-airflow/issues{/number}","pulls_url":"https://api.github.com/repos/lyft/incubator-airflow/pulls{/number}","milestones_url":"https://api.github.com/repos/lyft/incubator-airflow/milestones{/number}","notifications_url":"https://api.github.com/repos/lyft/incubator-airflow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lyft/incubator-airflow/labels{/name}","releases_url":"https://api.github.com/repos/lyft/incubator-airflow/releases{/id}","deployments_url":"https://api.github.com/repos/lyft/incubator-airflow/deployments","created_at":"2016-05-13T18:11:09Z","updated_at":"2017-04-20T16:15:44Z","pushed_at":"2018-08-02T05:49:41Z","git_url":"git://github.com/lyft/incubator-airflow.git","ssh_url":"git@github.com:lyft/incubator-airflow.git","clone_url":"https://github.com/lyft/incubator-airflow.git","svn_url":"https://github.com/lyft/incubator-airflow","homepage":"","size":16249,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":3,"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":3,"watchers":1,"default_branch":"master"}},"base":{"label":"lyft:data-platform-upgrade","ref":"data-platform-upgrade","sha":"0d15850580915b2e879e160ff7220d6d5cdfda87","user":{"login":"lyft","id":4269340,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQyNjkzNDA=","avatar_url":"https://avatars2.githubusercontent.com/u/4269340?v=4","gravatar_id":"","url":"https://api.github.com/users/lyft","html_url":"https://github.com/lyft","followers_url":"https://api.github.com/users/lyft/followers","following_url":"https://api.github.com/users/lyft/following{/other_user}","gists_url":"https://api.github.com/users/lyft/gists{/gist_id}","starred_url":"https://api.github.com/users/lyft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lyft/subscriptions","organizations_url":"https://api.github.com/users/lyft/orgs","repos_url":"https://api.github.com/users/lyft/repos","events_url":"https://api.github.com/users/lyft/events{/privacy}","received_events_url":"https://api.github.com/users/lyft/received_events","type":"Organization","site_admin":false},"repo":{"id":58762364,"node_id":"MDEwOlJlcG9zaXRvcnk1ODc2MjM2NA==","name":"incubator-airflow","full_name":"lyft/incubator-airflow","owner":{"login":"lyft","id":4269340,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQyNjkzNDA=","avatar_url":"https://avatars2.githubusercontent.com/u/4269340?v=4","gravatar_id":"","url":"https://api.github.com/users/lyft","html_url":"https://github.com/lyft","followers_url":"https://api.github.com/users/lyft/followers","following_url":"https://api.github.com/users/lyft/following{/other_user}","gists_url":"https://api.github.com/users/lyft/gists{/gist_id}","starred_url":"https://api.github.com/users/lyft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lyft/subscriptions","organizations_url":"https://api.github.com/users/lyft/orgs","repos_url":"https://api.github.com/users/lyft/repos","events_url":"https://api.github.com/users/lyft/events{/privacy}","received_events_url":"https://api.github.com/users/lyft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lyft/incubator-airflow","description":"Apache Airflow (Incubating)","fork":true,"url":"https://api.github.com/repos/lyft/incubator-airflow","forks_url":"https://api.github.com/repos/lyft/incubator-airflow/forks","keys_url":"https://api.github.com/repos/lyft/incubator-airflow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lyft/incubator-airflow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lyft/incubator-airflow/teams","hooks_url":"https://api.github.com/repos/lyft/incubator-airflow/hooks","issue_events_url":"https://api.github.com/repos/lyft/incubator-airflow/issues/events{/number}","events_url":"https://api.github.com/repos/lyft/incubator-airflow/events","assignees_url":"https://api.github.com/repos/lyft/incubator-airflow/assignees{/user}","branches_url":"https://api.github.com/repos/lyft/incubator-airflow/branches{/branch}","tags_url":"https://api.github.com/repos/lyft/incubator-airflow/tags","blobs_url":"https://api.github.com/repos/lyft/incubator-airflow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lyft/incubator-airflow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lyft/incubator-airflow/git/refs{/sha}","trees_url":"https://api.github.com/repos/lyft/incubator-airflow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lyft/incubator-airflow/statuses/{sha}","languages_url":"https://api.github.com/repos/lyft/incubator-airflow/languages","stargazers_url":"https://api.github.com/repos/lyft/incubator-airflow/stargazers","contributors_url":"https://api.github.com/repos/lyft/incubator-airflow/contributors","subscribers_url":"https://api.github.com/repos/lyft/incubator-airflow/subscribers","subscription_url":"https://api.github.com/repos/lyft/incubator-airflow/subscription","commits_url":"https://api.github.com/repos/lyft/incubator-airflow/commits{/sha}","git_commits_url":"https://api.github.com/repos/lyft/incubator-airflow/git/commits{/sha}","comments_url":"https://api.github.com/repos/lyft/incubator-airflow/comments{/number}","issue_comment_url":"https://api.github.com/repos/lyft/incubator-airflow/issues/comments{/number}","contents_url":"https://api.github.com/repos/lyft/incubator-airflow/contents/{+path}","compare_url":"https://api.github.com/repos/lyft/incubator-airflow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lyft/incubator-airflow/merges","archive_url":"https://api.github.com/repos/lyft/incubator-airflow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lyft/incubator-airflow/downloads","issues_url":"https://api.github.com/repos/lyft/incubator-airflow/issues{/number}","pulls_url":"https://api.github.com/repos/lyft/incubator-airflow/pulls{/number}","milestones_url":"https://api.github.com/repos/lyft/incubator-airflow/milestones{/number}","notifications_url":"https://api.github.com/repos/lyft/incubator-airflow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lyft/incubator-airflow/labels{/name}","releases_url":"https://api.github.com/repos/lyft/incubator-airflow/releases{/id}","deployments_url":"https://api.github.com/repos/lyft/incubator-airflow/deployments","created_at":"2016-05-13T18:11:09Z","updated_at":"2017-04-20T16:15:44Z","pushed_at":"2018-08-02T05:49:41Z","git_url":"git://github.com/lyft/incubator-airflow.git","ssh_url":"git@github.com:lyft/incubator-airflow.git","clone_url":"https://github.com/lyft/incubator-airflow.git","svn_url":"https://github.com/lyft/incubator-airflow","homepage":"","size":16249,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":3,"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":3,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lyft/incubator-airflow/pulls/97"},"html":{"href":"https://github.com/lyft/incubator-airflow/pull/97"},"issue":{"href":"https://api.github.com/repos/lyft/incubator-airflow/issues/97"},"comments":{"href":"https://api.github.com/repos/lyft/incubator-airflow/issues/97/comments"},"review_comments":{"href":"https://api.github.com/repos/lyft/incubator-airflow/pulls/97/comments"},"review_comment":{"href":"https://api.github.com/repos/lyft/incubator-airflow/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lyft/incubator-airflow/pulls/97/commits"},"statuses":{"href":"https://api.github.com/repos/lyft/incubator-airflow/statuses/bf9ba3a4b943dde123eef7df3db8c20b3896f690"}},"author_association":"NONE"}}
{"actor":{"display_login":"milton0825"}}