{"action":"created","comment":{"url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/pulls/comments/88557921","pull_request_review_id":9129362,"id":88557921,"diff_hunk":"@@ -397,14 +398,15 @@ def getStatus(self):\n             submissionInfo[\"last_updated\"] = submission.updated_at.strftime(\"%Y-%m-%dT%H:%M:%S\")\n \n             for job_id in jobs:\n+                job = sess.query(Job).filter_by(job_id = job_id).one()","path":"dataactbroker/handlers/fileHandler.py","position":null,"original_position":32,"commit_id":"cb5c42018113aacf5bf8f20ef81f7e7639e0d6a3","original_commit_id":"62b617dd6086cf42c4081e2e781f78da2f13776f","user":{"login":"bsweger","id":540544,"avatar_url":"https://avatars.githubusercontent.com/u/540544?v=3","gravatar_id":"","url":"https://api.github.com/users/bsweger","html_url":"https://github.com/bsweger","followers_url":"https://api.github.com/users/bsweger/followers","following_url":"https://api.github.com/users/bsweger/following{/other_user}","gists_url":"https://api.github.com/users/bsweger/gists{/gist_id}","starred_url":"https://api.github.com/users/bsweger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bsweger/subscriptions","organizations_url":"https://api.github.com/users/bsweger/orgs","repos_url":"https://api.github.com/users/bsweger/repos","events_url":"https://api.github.com/users/bsweger/events{/privacy}","received_events_url":"https://api.github.com/users/bsweger/received_events","type":"User","site_admin":false},"body":"Heh, yeah. This is happening in several places. I went ahead and refactored out the `getJobsBySubmission` function, which was returning a list of job_ids so that calling code could loop through said list and get the jobs. Now everyone just pulls the jobs.","created_at":"2016-11-17T22:07:12Z","updated_at":"2016-11-17T22:07:12Z","html_url":"https://github.com/fedspendingtransparency/data-act-broker-backend/pull/411#discussion_r88557921","pull_request_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/pulls/411","_links":{"self":{"href":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/pulls/comments/88557921"},"html":{"href":"https://github.com/fedspendingtransparency/data-act-broker-backend/pull/411#discussion_r88557921"},"pull_request":{"href":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/pulls/411"}}},"pull_request":{"url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/pulls/411","id":94035652,"html_url":"https://github.com/fedspendingtransparency/data-act-broker-backend/pull/411","diff_url":"https://github.com/fedspendingtransparency/data-act-broker-backend/pull/411.diff","patch_url":"https://github.com/fedspendingtransparency/data-act-broker-backend/pull/411.patch","issue_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/issues/411","number":411,"state":"open","locked":false,"title":"Finish global validation error handling and related job interface moves","user":{"login":"bsweger","id":540544,"avatar_url":"https://avatars.githubusercontent.com/u/540544?v=3","gravatar_id":"","url":"https://api.github.com/users/bsweger","html_url":"https://github.com/bsweger","followers_url":"https://api.github.com/users/bsweger/followers","following_url":"https://api.github.com/users/bsweger/following{/other_user}","gists_url":"https://api.github.com/users/bsweger/gists{/gist_id}","starred_url":"https://api.github.com/users/bsweger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bsweger/subscriptions","organizations_url":"https://api.github.com/users/bsweger/orgs","repos_url":"https://api.github.com/users/bsweger/repos","events_url":"https://api.github.com/users/bsweger/events{/privacy}","received_events_url":"https://api.github.com/users/bsweger/received_events","type":"User","site_admin":false},"body":"This PR does two major things:\r\n\r\n* Removes the 2nd big `try/except` block around the validation process. Instead, any errors raised during validation are caught by exception handlers at the app level.\r\n* Move/removes related functions from the jobTrackerInterface (_e.g._ functions and their dependencies that are used by the aforementioned exception handlers).\r\n\r\nThe PR also addresses a few minor things that cropped up along the way:\r\n* POST to the validate route wasn't being sent a JSON (problematic b/c our integration tests were sending as JSON, and the difference resulted in some errors not being caught in tests)\r\n* FIx intermittent Flask `AssertionErrors` in integration tests\r\n\r\nLeft to do on the job \"db\" refactor:\r\n* remove remaining functions from `jobHandler.py` and `jobTrackerInterface.py` + cleanup\r\n* tidy up the exception handlers in the validator's `app.py`, they contain a lot of duplicate code\r\n* fix the enqueue import hack","created_at":"2016-11-16T19:42:48Z","updated_at":"2016-11-17T22:07:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a1d5c1004d8ee1bc5598b0ae8e67fbbeb008dfe4","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/pulls/411/commits","review_comments_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/pulls/411/comments","review_comment_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/issues/411/comments","statuses_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/statuses/cb5c42018113aacf5bf8f20ef81f7e7639e0d6a3","head":{"label":"fedspendingtransparency:add-validation-error-handler-part2","ref":"add-validation-error-handler-part2","sha":"cb5c42018113aacf5bf8f20ef81f7e7639e0d6a3","user":{"login":"fedspendingtransparency","id":8397762,"avatar_url":"https://avatars.githubusercontent.com/u/8397762?v=3","gravatar_id":"","url":"https://api.github.com/users/fedspendingtransparency","html_url":"https://github.com/fedspendingtransparency","followers_url":"https://api.github.com/users/fedspendingtransparency/followers","following_url":"https://api.github.com/users/fedspendingtransparency/following{/other_user}","gists_url":"https://api.github.com/users/fedspendingtransparency/gists{/gist_id}","starred_url":"https://api.github.com/users/fedspendingtransparency/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fedspendingtransparency/subscriptions","organizations_url":"https://api.github.com/users/fedspendingtransparency/orgs","repos_url":"https://api.github.com/users/fedspendingtransparency/repos","events_url":"https://api.github.com/users/fedspendingtransparency/events{/privacy}","received_events_url":"https://api.github.com/users/fedspendingtransparency/received_events","type":"Organization","site_admin":false},"repo":{"id":57313310,"name":"data-act-broker-backend","full_name":"fedspendingtransparency/data-act-broker-backend","owner":{"login":"fedspendingtransparency","id":8397762,"avatar_url":"https://avatars.githubusercontent.com/u/8397762?v=3","gravatar_id":"","url":"https://api.github.com/users/fedspendingtransparency","html_url":"https://github.com/fedspendingtransparency","followers_url":"https://api.github.com/users/fedspendingtransparency/followers","following_url":"https://api.github.com/users/fedspendingtransparency/following{/other_user}","gists_url":"https://api.github.com/users/fedspendingtransparency/gists{/gist_id}","starred_url":"https://api.github.com/users/fedspendingtransparency/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fedspendingtransparency/subscriptions","organizations_url":"https://api.github.com/users/fedspendingtransparency/orgs","repos_url":"https://api.github.com/users/fedspendingtransparency/repos","events_url":"https://api.github.com/users/fedspendingtransparency/events{/privacy}","received_events_url":"https://api.github.com/users/fedspendingtransparency/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fedspendingtransparency/data-act-broker-backend","description":null,"fork":false,"url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend","forks_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/forks","keys_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/teams","hooks_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/hooks","issue_events_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/issues/events{/number}","events_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/events","assignees_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/assignees{/user}","branches_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/branches{/branch}","tags_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/tags","blobs_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/git/refs{/sha}","trees_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/statuses/{sha}","languages_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/languages","stargazers_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/stargazers","contributors_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/contributors","subscribers_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/subscribers","subscription_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/subscription","commits_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/commits{/sha}","git_commits_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/git/commits{/sha}","comments_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/comments{/number}","issue_comment_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/issues/comments{/number}","contents_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/contents/{+path}","compare_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/merges","archive_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/downloads","issues_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/issues{/number}","pulls_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/pulls{/number}","milestones_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/milestones{/number}","notifications_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/labels{/name}","releases_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/releases{/id}","deployments_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/deployments","created_at":"2016-04-28T15:39:36Z","updated_at":"2016-11-14T00:47:16Z","pushed_at":"2016-11-17T22:05:53Z","git_url":"git://github.com/fedspendingtransparency/data-act-broker-backend.git","ssh_url":"git@github.com:fedspendingtransparency/data-act-broker-backend.git","clone_url":"https://github.com/fedspendingtransparency/data-act-broker-backend.git","svn_url":"https://github.com/fedspendingtransparency/data-act-broker-backend","homepage":null,"size":53854,"stargazers_count":12,"watchers_count":12,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":7,"forks":4,"open_issues":7,"watchers":12,"default_branch":"development"}},"base":{"label":"fedspendingtransparency:development","ref":"development","sha":"706549ce0fc7b8dcf45a61d8de5654c9e0f43aed","user":{"login":"fedspendingtransparency","id":8397762,"avatar_url":"https://avatars.githubusercontent.com/u/8397762?v=3","gravatar_id":"","url":"https://api.github.com/users/fedspendingtransparency","html_url":"https://github.com/fedspendingtransparency","followers_url":"https://api.github.com/users/fedspendingtransparency/followers","following_url":"https://api.github.com/users/fedspendingtransparency/following{/other_user}","gists_url":"https://api.github.com/users/fedspendingtransparency/gists{/gist_id}","starred_url":"https://api.github.com/users/fedspendingtransparency/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fedspendingtransparency/subscriptions","organizations_url":"https://api.github.com/users/fedspendingtransparency/orgs","repos_url":"https://api.github.com/users/fedspendingtransparency/repos","events_url":"https://api.github.com/users/fedspendingtransparency/events{/privacy}","received_events_url":"https://api.github.com/users/fedspendingtransparency/received_events","type":"Organization","site_admin":false},"repo":{"id":57313310,"name":"data-act-broker-backend","full_name":"fedspendingtransparency/data-act-broker-backend","owner":{"login":"fedspendingtransparency","id":8397762,"avatar_url":"https://avatars.githubusercontent.com/u/8397762?v=3","gravatar_id":"","url":"https://api.github.com/users/fedspendingtransparency","html_url":"https://github.com/fedspendingtransparency","followers_url":"https://api.github.com/users/fedspendingtransparency/followers","following_url":"https://api.github.com/users/fedspendingtransparency/following{/other_user}","gists_url":"https://api.github.com/users/fedspendingtransparency/gists{/gist_id}","starred_url":"https://api.github.com/users/fedspendingtransparency/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fedspendingtransparency/subscriptions","organizations_url":"https://api.github.com/users/fedspendingtransparency/orgs","repos_url":"https://api.github.com/users/fedspendingtransparency/repos","events_url":"https://api.github.com/users/fedspendingtransparency/events{/privacy}","received_events_url":"https://api.github.com/users/fedspendingtransparency/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/fedspendingtransparency/data-act-broker-backend","description":null,"fork":false,"url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend","forks_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/forks","keys_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/teams","hooks_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/hooks","issue_events_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/issues/events{/number}","events_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/events","assignees_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/assignees{/user}","branches_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/branches{/branch}","tags_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/tags","blobs_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/git/refs{/sha}","trees_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/statuses/{sha}","languages_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/languages","stargazers_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/stargazers","contributors_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/contributors","subscribers_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/subscribers","subscription_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/subscription","commits_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/commits{/sha}","git_commits_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/git/commits{/sha}","comments_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/comments{/number}","issue_comment_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/issues/comments{/number}","contents_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/contents/{+path}","compare_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/merges","archive_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/downloads","issues_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/issues{/number}","pulls_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/pulls{/number}","milestones_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/milestones{/number}","notifications_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/labels{/name}","releases_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/releases{/id}","deployments_url":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/deployments","created_at":"2016-04-28T15:39:36Z","updated_at":"2016-11-14T00:47:16Z","pushed_at":"2016-11-17T22:05:53Z","git_url":"git://github.com/fedspendingtransparency/data-act-broker-backend.git","ssh_url":"git@github.com:fedspendingtransparency/data-act-broker-backend.git","clone_url":"https://github.com/fedspendingtransparency/data-act-broker-backend.git","svn_url":"https://github.com/fedspendingtransparency/data-act-broker-backend","homepage":null,"size":53854,"stargazers_count":12,"watchers_count":12,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":7,"forks":4,"open_issues":7,"watchers":12,"default_branch":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/pulls/411"},"html":{"href":"https://github.com/fedspendingtransparency/data-act-broker-backend/pull/411"},"issue":{"href":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/issues/411"},"comments":{"href":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/issues/411/comments"},"review_comments":{"href":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/pulls/411/comments"},"review_comment":{"href":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/pulls/411/commits"},"statuses":{"href":"https://api.github.com/repos/fedspendingtransparency/data-act-broker-backend/statuses/cb5c42018113aacf5bf8f20ef81f7e7639e0d6a3"}}}}
{"actor":{"display_login":"bsweger"}}