{"action":"created","comment":{"url":"https://api.github.com/repos/apache/incubator-airflow/pulls/comments/169674261","pull_request_review_id":98238576,"id":169674261,"diff_hunk":"@@ -2081,11 +2079,11 @@ class SlaMissModelView(wwwutils.SuperUserMixin, ModelViewOnly):\n @provide_session\n def _connection_ids(session=None):\n     return [\n-            (c.conn_id, c.conn_id)\n-            for c in (\n-                session.query(models.Connection.conn_id)\n-                    .group_by(models.Connection.conn_id)\n-            )","path":"airflow/www/views.py","position":19,"original_position":19,"commit_id":"432fa196f917d0abc3af186994147245d2d29131","original_commit_id":"432fa196f917d0abc3af186994147245d2d29131","user":{"login":"ashb","id":34150,"avatar_url":"https://avatars2.githubusercontent.com/u/34150?v=4","gravatar_id":"","url":"https://api.github.com/users/ashb","html_url":"https://github.com/ashb","followers_url":"https://api.github.com/users/ashb/followers","following_url":"https://api.github.com/users/ashb/following{/other_user}","gists_url":"https://api.github.com/users/ashb/gists{/gist_id}","starred_url":"https://api.github.com/users/ashb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashb/subscriptions","organizations_url":"https://api.github.com/users/ashb/orgs","repos_url":"https://api.github.com/users/ashb/repos","events_url":"https://api.github.com/users/ashb/events{/privacy}","received_events_url":"https://api.github.com/users/ashb/received_events","type":"User","site_admin":false},"body":"I though (perhaps wrongly) that flake8 was only applied to diffs, not the whole file. This is certainly what the contrib guides say anyway: `git diff upstream/master -u -- \"*.py\" | flake8 --diff`\r\n\r\n","created_at":"2018-02-21T15:30:01Z","updated_at":"2018-02-21T15:30:02Z","html_url":"https://github.com/apache/incubator-airflow/pull/2691#discussion_r169674261","pull_request_url":"https://api.github.com/repos/apache/incubator-airflow/pulls/2691","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-airflow/pulls/comments/169674261"},"html":{"href":"https://github.com/apache/incubator-airflow/pull/2691#discussion_r169674261"},"pull_request":{"href":"https://api.github.com/repos/apache/incubator-airflow/pulls/2691"}},"in_reply_to_id":169652257},"pull_request":{"url":"https://api.github.com/repos/apache/incubator-airflow/pulls/2691","id":146619608,"html_url":"https://github.com/apache/incubator-airflow/pull/2691","diff_url":"https://github.com/apache/incubator-airflow/pull/2691.diff","patch_url":"https://github.com/apache/incubator-airflow/pull/2691.patch","issue_url":"https://api.github.com/repos/apache/incubator-airflow/issues/2691","number":2691,"state":"open","locked":false,"title":"[AIRFLOW-1246] Setting a Subdag Task State Throws Exception","user":{"login":"zack3241","id":22421878,"avatar_url":"https://avatars2.githubusercontent.com/u/22421878?v=4","gravatar_id":"","url":"https://api.github.com/users/zack3241","html_url":"https://github.com/zack3241","followers_url":"https://api.github.com/users/zack3241/followers","following_url":"https://api.github.com/users/zack3241/following{/other_user}","gists_url":"https://api.github.com/users/zack3241/gists{/gist_id}","starred_url":"https://api.github.com/users/zack3241/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zack3241/subscriptions","organizations_url":"https://api.github.com/users/zack3241/orgs","repos_url":"https://api.github.com/users/zack3241/repos","events_url":"https://api.github.com/users/zack3241/events{/privacy}","received_events_url":"https://api.github.com/users/zack3241/received_events","type":"User","site_admin":false},"body":"Dear Airflow maintainers,\r\n\r\nPlease accept this PR. I understand that it will not be reviewed until I have checked off all the steps below!\r\n\r\n\r\n### JIRA\r\n- [x] My PR addresses the following [Airflow JIRA](https://issues.apache.org/jira/browse/AIRFLOW/) issues and references them in the PR title. For example, \"[AIRFLOW-XXX] My Airflow PR\"\r\n    - https://issues.apache.org/jira/browse/AIRFLOW-1246\r\n\r\n\r\n### Description\r\n- [x] Here are some details about my PR, including screenshots of any UI changes:\r\nThis PR fixes the problem that occurs from flask_admin duplicating periods (its CHAR_ESCAPE value) in primary keys it returns. I've written a reversing function given that it appears that this functionality is intentional in flask_admin. I then use this reversing function on the task and DAG ids in the clear and update status actions of the Task Instance View.\r\n\r\nCommits:\r\n[AIRFLOW-1246] Setting a Subdag Task State Throws Exception\r\n    Add flask_admin_unescape function to airfow.www.views\r\n\r\nAdd flask_admin_unescape for Id's in TaskInstanceModelView clear action\r\n\r\nAdd flask_admin_unescape for Id's in TaskInstanceModelView state action\r\n\r\nAdd Test for flask_admin_unescape function\r\n\r\nMove flask_admin_unescape function to airflow.www.utils\r\n\r\nMove test_flask_admin_unescape to airflow.tests.www.test_utils\r\n\r\nAdd Return and Param Documentation for flask_admin_unescape Function\r\n\r\n### Tests\r\n- [x] My PR adds the following unit tests __OR__ does not need testing for this extremely good reason:\r\nairflow.tests.www.test_utils.UtilsTest.test_flask_admin_unescape\r\n\r\n### Commits\r\n- [x] My commits all reference JIRA issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from \"[How to write a good git commit message](http://chris.beams.io/posts/git-commit/)\":\r\n    1. Subject is separated from body by a blank line\r\n    2. Subject is limited to 50 characters\r\n    3. Subject does not end with a period\r\n    4. Subject uses the imperative mood (\"add\", not \"adding\")\r\n    5. Body wraps at 72 characters\r\n    6. Body explains \"what\" and \"why\", not \"how\"\r\n\r\n","created_at":"2017-10-14T20:21:13Z","updated_at":"2018-02-21T15:30:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"201764e5b4dc5ba8d6d0a55e543966f39cf499ab","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/incubator-airflow/pulls/2691/commits","review_comments_url":"https://api.github.com/repos/apache/incubator-airflow/pulls/2691/comments","review_comment_url":"https://api.github.com/repos/apache/incubator-airflow/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/incubator-airflow/issues/2691/comments","statuses_url":"https://api.github.com/repos/apache/incubator-airflow/statuses/432fa196f917d0abc3af186994147245d2d29131","head":{"label":"zack3241:AIRFLOW-1246_dev","ref":"AIRFLOW-1246_dev","sha":"432fa196f917d0abc3af186994147245d2d29131","user":{"login":"zack3241","id":22421878,"avatar_url":"https://avatars2.githubusercontent.com/u/22421878?v=4","gravatar_id":"","url":"https://api.github.com/users/zack3241","html_url":"https://github.com/zack3241","followers_url":"https://api.github.com/users/zack3241/followers","following_url":"https://api.github.com/users/zack3241/following{/other_user}","gists_url":"https://api.github.com/users/zack3241/gists{/gist_id}","starred_url":"https://api.github.com/users/zack3241/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zack3241/subscriptions","organizations_url":"https://api.github.com/users/zack3241/orgs","repos_url":"https://api.github.com/users/zack3241/repos","events_url":"https://api.github.com/users/zack3241/events{/privacy}","received_events_url":"https://api.github.com/users/zack3241/received_events","type":"User","site_admin":false},"repo":{"id":91010596,"name":"incubator-airflow","full_name":"zack3241/incubator-airflow","owner":{"login":"zack3241","id":22421878,"avatar_url":"https://avatars2.githubusercontent.com/u/22421878?v=4","gravatar_id":"","url":"https://api.github.com/users/zack3241","html_url":"https://github.com/zack3241","followers_url":"https://api.github.com/users/zack3241/followers","following_url":"https://api.github.com/users/zack3241/following{/other_user}","gists_url":"https://api.github.com/users/zack3241/gists{/gist_id}","starred_url":"https://api.github.com/users/zack3241/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zack3241/subscriptions","organizations_url":"https://api.github.com/users/zack3241/orgs","repos_url":"https://api.github.com/users/zack3241/repos","events_url":"https://api.github.com/users/zack3241/events{/privacy}","received_events_url":"https://api.github.com/users/zack3241/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zack3241/incubator-airflow","description":"Apache Airflow (Incubating)","fork":true,"url":"https://api.github.com/repos/zack3241/incubator-airflow","forks_url":"https://api.github.com/repos/zack3241/incubator-airflow/forks","keys_url":"https://api.github.com/repos/zack3241/incubator-airflow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zack3241/incubator-airflow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zack3241/incubator-airflow/teams","hooks_url":"https://api.github.com/repos/zack3241/incubator-airflow/hooks","issue_events_url":"https://api.github.com/repos/zack3241/incubator-airflow/issues/events{/number}","events_url":"https://api.github.com/repos/zack3241/incubator-airflow/events","assignees_url":"https://api.github.com/repos/zack3241/incubator-airflow/assignees{/user}","branches_url":"https://api.github.com/repos/zack3241/incubator-airflow/branches{/branch}","tags_url":"https://api.github.com/repos/zack3241/incubator-airflow/tags","blobs_url":"https://api.github.com/repos/zack3241/incubator-airflow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zack3241/incubator-airflow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zack3241/incubator-airflow/git/refs{/sha}","trees_url":"https://api.github.com/repos/zack3241/incubator-airflow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zack3241/incubator-airflow/statuses/{sha}","languages_url":"https://api.github.com/repos/zack3241/incubator-airflow/languages","stargazers_url":"https://api.github.com/repos/zack3241/incubator-airflow/stargazers","contributors_url":"https://api.github.com/repos/zack3241/incubator-airflow/contributors","subscribers_url":"https://api.github.com/repos/zack3241/incubator-airflow/subscribers","subscription_url":"https://api.github.com/repos/zack3241/incubator-airflow/subscription","commits_url":"https://api.github.com/repos/zack3241/incubator-airflow/commits{/sha}","git_commits_url":"https://api.github.com/repos/zack3241/incubator-airflow/git/commits{/sha}","comments_url":"https://api.github.com/repos/zack3241/incubator-airflow/comments{/number}","issue_comment_url":"https://api.github.com/repos/zack3241/incubator-airflow/issues/comments{/number}","contents_url":"https://api.github.com/repos/zack3241/incubator-airflow/contents/{+path}","compare_url":"https://api.github.com/repos/zack3241/incubator-airflow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zack3241/incubator-airflow/merges","archive_url":"https://api.github.com/repos/zack3241/incubator-airflow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zack3241/incubator-airflow/downloads","issues_url":"https://api.github.com/repos/zack3241/incubator-airflow/issues{/number}","pulls_url":"https://api.github.com/repos/zack3241/incubator-airflow/pulls{/number}","milestones_url":"https://api.github.com/repos/zack3241/incubator-airflow/milestones{/number}","notifications_url":"https://api.github.com/repos/zack3241/incubator-airflow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zack3241/incubator-airflow/labels{/name}","releases_url":"https://api.github.com/repos/zack3241/incubator-airflow/releases{/id}","deployments_url":"https://api.github.com/repos/zack3241/incubator-airflow/deployments","created_at":"2017-05-11T18:20:58Z","updated_at":"2017-05-11T18:21:02Z","pushed_at":"2018-01-25T17:24:42Z","git_url":"git://github.com/zack3241/incubator-airflow.git","ssh_url":"git@github.com:zack3241/incubator-airflow.git","clone_url":"https://github.com/zack3241/incubator-airflow.git","svn_url":"https://github.com/zack3241/incubator-airflow","homepage":"","size":14799,"stargazers_count":0,"watchers_count":0,"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":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"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"cbc02da48f7d5c3e01669a7c9b881feda4eaeda0","user":{"login":"apache","id":47359,"avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":33884891,"name":"incubator-airflow","full_name":"apache/incubator-airflow","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars0.githubusercontent.com/u/47359?v=4","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/incubator-airflow","description":"Apache Airflow (Incubating)","fork":false,"url":"https://api.github.com/repos/apache/incubator-airflow","forks_url":"https://api.github.com/repos/apache/incubator-airflow/forks","keys_url":"https://api.github.com/repos/apache/incubator-airflow/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/incubator-airflow/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/incubator-airflow/teams","hooks_url":"https://api.github.com/repos/apache/incubator-airflow/hooks","issue_events_url":"https://api.github.com/repos/apache/incubator-airflow/issues/events{/number}","events_url":"https://api.github.com/repos/apache/incubator-airflow/events","assignees_url":"https://api.github.com/repos/apache/incubator-airflow/assignees{/user}","branches_url":"https://api.github.com/repos/apache/incubator-airflow/branches{/branch}","tags_url":"https://api.github.com/repos/apache/incubator-airflow/tags","blobs_url":"https://api.github.com/repos/apache/incubator-airflow/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/incubator-airflow/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/incubator-airflow/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/incubator-airflow/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/incubator-airflow/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/incubator-airflow/languages","stargazers_url":"https://api.github.com/repos/apache/incubator-airflow/stargazers","contributors_url":"https://api.github.com/repos/apache/incubator-airflow/contributors","subscribers_url":"https://api.github.com/repos/apache/incubator-airflow/subscribers","subscription_url":"https://api.github.com/repos/apache/incubator-airflow/subscription","commits_url":"https://api.github.com/repos/apache/incubator-airflow/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/incubator-airflow/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/incubator-airflow/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/incubator-airflow/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/incubator-airflow/contents/{+path}","compare_url":"https://api.github.com/repos/apache/incubator-airflow/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/incubator-airflow/merges","archive_url":"https://api.github.com/repos/apache/incubator-airflow/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/incubator-airflow/downloads","issues_url":"https://api.github.com/repos/apache/incubator-airflow/issues{/number}","pulls_url":"https://api.github.com/repos/apache/incubator-airflow/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/incubator-airflow/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/incubator-airflow/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/incubator-airflow/labels{/name}","releases_url":"https://api.github.com/repos/apache/incubator-airflow/releases{/id}","deployments_url":"https://api.github.com/repos/apache/incubator-airflow/deployments","created_at":"2015-04-13T18:04:58Z","updated_at":"2018-02-21T15:11:47Z","pushed_at":"2018-02-21T15:29:53Z","git_url":"git://github.com/apache/incubator-airflow.git","ssh_url":"git@github.com:apache/incubator-airflow.git","clone_url":"https://github.com/apache/incubator-airflow.git","svn_url":"https://github.com/apache/incubator-airflow","homepage":"","size":15538,"stargazers_count":7247,"watchers_count":7247,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2215,"mirror_url":null,"archived":false,"open_issues_count":357,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":2215,"open_issues":357,"watchers":7247,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-airflow/pulls/2691"},"html":{"href":"https://github.com/apache/incubator-airflow/pull/2691"},"issue":{"href":"https://api.github.com/repos/apache/incubator-airflow/issues/2691"},"comments":{"href":"https://api.github.com/repos/apache/incubator-airflow/issues/2691/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/incubator-airflow/pulls/2691/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/incubator-airflow/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/incubator-airflow/pulls/2691/commits"},"statuses":{"href":"https://api.github.com/repos/apache/incubator-airflow/statuses/432fa196f917d0abc3af186994147245d2d29131"}},"author_association":"NONE"}}
{"actor":{"display_login":"ashb"}}