{"action":"created","comment":{"url":"https://api.github.com/repos/RackHD/on-tasks/pulls/comments/76137922","id":76137922,"diff_hunk":"@@ -41,8 +41,13 @@ function generateTagJobFactory(\n     function GenerateTagJob(options, context, taskId) {\n         GenerateTagJob.super_.call(this, logger, options, context, taskId);\n \n-        this.nodeId = context.target || options.nodeId;\n-        assert.isMongoId(this.nodeId, 'context.target || options.nodeId');\n+        if (options.nodes) {\n+            this.nodes = options.nodes;\n+            assert.arrayOfString(this.nodes, 'options.nodes');\n+        } else {\n+            this.nodeId = context.target || options.nodeId;\n+            assert.isMongoId(this.nodeId, 'context.target || options.nodeId');","path":"lib/jobs/generate-tag.js","position":11,"original_position":11,"commit_id":"1ca08ab40e8ff4dc4650b8e174ba6502e60e2bc1","original_commit_id":"1ca08ab40e8ff4dc4650b8e174ba6502e60e2bc1","user":{"login":"heckj","id":43388,"avatar_url":"https://avatars.githubusercontent.com/u/43388?v=3","gravatar_id":"","url":"https://api.github.com/users/heckj","html_url":"https://github.com/heckj","followers_url":"https://api.github.com/users/heckj/followers","following_url":"https://api.github.com/users/heckj/following{/other_user}","gists_url":"https://api.github.com/users/heckj/gists{/gist_id}","starred_url":"https://api.github.com/users/heckj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heckj/subscriptions","organizations_url":"https://api.github.com/users/heckj/orgs","repos_url":"https://api.github.com/users/heckj/repos","events_url":"https://api.github.com/users/heckj/events{/privacy}","received_events_url":"https://api.github.com/users/heckj/received_events","type":"User","site_admin":false},"body":"I recognize we're changing this, but should this be pinned to a mongoId or is UUID now more appropriate with the migration of node ID's to UUIDs? (or am I a clueless monkey here?)","created_at":"2016-08-24T21:00:29Z","updated_at":"2016-08-24T21:00:29Z","html_url":"https://github.com/RackHD/on-tasks/pull/320#discussion_r76137922","pull_request_url":"https://api.github.com/repos/RackHD/on-tasks/pulls/320","_links":{"self":{"href":"https://api.github.com/repos/RackHD/on-tasks/pulls/comments/76137922"},"html":{"href":"https://github.com/RackHD/on-tasks/pull/320#discussion_r76137922"},"pull_request":{"href":"https://api.github.com/repos/RackHD/on-tasks/pulls/320"}}},"pull_request":{"url":"https://api.github.com/repos/RackHD/on-tasks/pulls/320","id":82615947,"html_url":"https://github.com/RackHD/on-tasks/pull/320","diff_url":"https://github.com/RackHD/on-tasks/pull/320.diff","patch_url":"https://github.com/RackHD/on-tasks/pull/320.patch","issue_url":"https://api.github.com/repos/RackHD/on-tasks/issues/320","number":320,"state":"open","locked":false,"title":"Update generate-tag task to take an array of node IDs","user":{"login":"benbp","id":1020379,"avatar_url":"https://avatars.githubusercontent.com/u/1020379?v=3","gravatar_id":"","url":"https://api.github.com/users/benbp","html_url":"https://github.com/benbp","followers_url":"https://api.github.com/users/benbp/followers","following_url":"https://api.github.com/users/benbp/following{/other_user}","gists_url":"https://api.github.com/users/benbp/gists{/gist_id}","starred_url":"https://api.github.com/users/benbp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benbp/subscriptions","organizations_url":"https://api.github.com/users/benbp/orgs","repos_url":"https://api.github.com/users/benbp/repos","events_url":"https://api.github.com/users/benbp/events{/privacy}","received_events_url":"https://api.github.com/users/benbp/received_events","type":"User","site_admin":false},"body":"This is an update to the generate-tag task and job to support processing an array of nodeIds within a single workflow instance, rather than tying one workflow instance to one nodeId. The upstream impact of this is that issuing POST calls to the `/api/<version>/tags` API no longer triggers N workflows at once where N == the number of nodes in the database, but rather a single workflow (see ODR-821 for internal reporting).\r\n\r\nThis is partially a quick and easy patch that glosses over issues with the workflow engine itself (system slowdowns when batch running hundreds of workflows at the same time with a small number of task runner/scheduler instances), and while this issue happens to expose this problem, I don't think that the fix should be tied to it, as the solution to our performance problems is likely going to warrant a much more significant investigation and/or overhaul (and I welcome all the shaming @zyoung51 and @jlongever can throw at me 😄).\r\n\r\n@yyscamper I've added a JSON schema for the generate-tag task, which is I believe the first schema that uses the oneOf field for top level properties. As such, I had to make some minor modifications to the schema-ut-helper test library. Please let me know if I'm doing things in a different way than you intended or if there is a better way to do them (alternatively, we could just deprecate the singular nodeId option altogether and not need the oneOf option, but I didn't want to potentially break any downstream users of the existing workflow outside of our internal API logic).\r\n\r\n@RackHD/corecommitters @pscharla @heckj ","created_at":"2016-08-24T20:56:07Z","updated_at":"2016-08-24T21:00:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2b6ca56b1da9bcf8896546a22b2c5cb6456cd23a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/RackHD/on-tasks/pulls/320/commits","review_comments_url":"https://api.github.com/repos/RackHD/on-tasks/pulls/320/comments","review_comment_url":"https://api.github.com/repos/RackHD/on-tasks/pulls/comments{/number}","comments_url":"https://api.github.com/repos/RackHD/on-tasks/issues/320/comments","statuses_url":"https://api.github.com/repos/RackHD/on-tasks/statuses/1ca08ab40e8ff4dc4650b8e174ba6502e60e2bc1","head":{"label":"benbp:generate-tag-from-list","ref":"generate-tag-from-list","sha":"1ca08ab40e8ff4dc4650b8e174ba6502e60e2bc1","user":{"login":"benbp","id":1020379,"avatar_url":"https://avatars.githubusercontent.com/u/1020379?v=3","gravatar_id":"","url":"https://api.github.com/users/benbp","html_url":"https://github.com/benbp","followers_url":"https://api.github.com/users/benbp/followers","following_url":"https://api.github.com/users/benbp/following{/other_user}","gists_url":"https://api.github.com/users/benbp/gists{/gist_id}","starred_url":"https://api.github.com/users/benbp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benbp/subscriptions","organizations_url":"https://api.github.com/users/benbp/orgs","repos_url":"https://api.github.com/users/benbp/repos","events_url":"https://api.github.com/users/benbp/events{/privacy}","received_events_url":"https://api.github.com/users/benbp/received_events","type":"User","site_admin":false},"repo":{"id":45488667,"name":"on-tasks","full_name":"benbp/on-tasks","owner":{"login":"benbp","id":1020379,"avatar_url":"https://avatars.githubusercontent.com/u/1020379?v=3","gravatar_id":"","url":"https://api.github.com/users/benbp","html_url":"https://github.com/benbp","followers_url":"https://api.github.com/users/benbp/followers","following_url":"https://api.github.com/users/benbp/following{/other_user}","gists_url":"https://api.github.com/users/benbp/gists{/gist_id}","starred_url":"https://api.github.com/users/benbp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benbp/subscriptions","organizations_url":"https://api.github.com/users/benbp/orgs","repos_url":"https://api.github.com/users/benbp/repos","events_url":"https://api.github.com/users/benbp/events{/privacy}","received_events_url":"https://api.github.com/users/benbp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/benbp/on-tasks","description":"","fork":true,"url":"https://api.github.com/repos/benbp/on-tasks","forks_url":"https://api.github.com/repos/benbp/on-tasks/forks","keys_url":"https://api.github.com/repos/benbp/on-tasks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/benbp/on-tasks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/benbp/on-tasks/teams","hooks_url":"https://api.github.com/repos/benbp/on-tasks/hooks","issue_events_url":"https://api.github.com/repos/benbp/on-tasks/issues/events{/number}","events_url":"https://api.github.com/repos/benbp/on-tasks/events","assignees_url":"https://api.github.com/repos/benbp/on-tasks/assignees{/user}","branches_url":"https://api.github.com/repos/benbp/on-tasks/branches{/branch}","tags_url":"https://api.github.com/repos/benbp/on-tasks/tags","blobs_url":"https://api.github.com/repos/benbp/on-tasks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/benbp/on-tasks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/benbp/on-tasks/git/refs{/sha}","trees_url":"https://api.github.com/repos/benbp/on-tasks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/benbp/on-tasks/statuses/{sha}","languages_url":"https://api.github.com/repos/benbp/on-tasks/languages","stargazers_url":"https://api.github.com/repos/benbp/on-tasks/stargazers","contributors_url":"https://api.github.com/repos/benbp/on-tasks/contributors","subscribers_url":"https://api.github.com/repos/benbp/on-tasks/subscribers","subscription_url":"https://api.github.com/repos/benbp/on-tasks/subscription","commits_url":"https://api.github.com/repos/benbp/on-tasks/commits{/sha}","git_commits_url":"https://api.github.com/repos/benbp/on-tasks/git/commits{/sha}","comments_url":"https://api.github.com/repos/benbp/on-tasks/comments{/number}","issue_comment_url":"https://api.github.com/repos/benbp/on-tasks/issues/comments{/number}","contents_url":"https://api.github.com/repos/benbp/on-tasks/contents/{+path}","compare_url":"https://api.github.com/repos/benbp/on-tasks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/benbp/on-tasks/merges","archive_url":"https://api.github.com/repos/benbp/on-tasks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/benbp/on-tasks/downloads","issues_url":"https://api.github.com/repos/benbp/on-tasks/issues{/number}","pulls_url":"https://api.github.com/repos/benbp/on-tasks/pulls{/number}","milestones_url":"https://api.github.com/repos/benbp/on-tasks/milestones{/number}","notifications_url":"https://api.github.com/repos/benbp/on-tasks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/benbp/on-tasks/labels{/name}","releases_url":"https://api.github.com/repos/benbp/on-tasks/releases{/id}","deployments_url":"https://api.github.com/repos/benbp/on-tasks/deployments","created_at":"2015-11-03T18:58:52Z","updated_at":"2015-11-03T18:58:53Z","pushed_at":"2016-08-24T20:55:37Z","git_url":"git://github.com/benbp/on-tasks.git","ssh_url":"git@github.com:benbp/on-tasks.git","clone_url":"https://github.com/benbp/on-tasks.git","svn_url":"https://github.com/benbp/on-tasks","homepage":null,"size":1822,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"RackHD:master","ref":"master","sha":"1dcfec5507688afbd1e321b8ed5472410aa8f43d","user":{"login":"RackHD","id":13982662,"avatar_url":"https://avatars.githubusercontent.com/u/13982662?v=3","gravatar_id":"","url":"https://api.github.com/users/RackHD","html_url":"https://github.com/RackHD","followers_url":"https://api.github.com/users/RackHD/followers","following_url":"https://api.github.com/users/RackHD/following{/other_user}","gists_url":"https://api.github.com/users/RackHD/gists{/gist_id}","starred_url":"https://api.github.com/users/RackHD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RackHD/subscriptions","organizations_url":"https://api.github.com/users/RackHD/orgs","repos_url":"https://api.github.com/users/RackHD/repos","events_url":"https://api.github.com/users/RackHD/events{/privacy}","received_events_url":"https://api.github.com/users/RackHD/received_events","type":"Organization","site_admin":false},"repo":{"id":41690099,"name":"on-tasks","full_name":"RackHD/on-tasks","owner":{"login":"RackHD","id":13982662,"avatar_url":"https://avatars.githubusercontent.com/u/13982662?v=3","gravatar_id":"","url":"https://api.github.com/users/RackHD","html_url":"https://github.com/RackHD","followers_url":"https://api.github.com/users/RackHD/followers","following_url":"https://api.github.com/users/RackHD/following{/other_user}","gists_url":"https://api.github.com/users/RackHD/gists{/gist_id}","starred_url":"https://api.github.com/users/RackHD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RackHD/subscriptions","organizations_url":"https://api.github.com/users/RackHD/orgs","repos_url":"https://api.github.com/users/RackHD/repos","events_url":"https://api.github.com/users/RackHD/events{/privacy}","received_events_url":"https://api.github.com/users/RackHD/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/RackHD/on-tasks","description":"","fork":false,"url":"https://api.github.com/repos/RackHD/on-tasks","forks_url":"https://api.github.com/repos/RackHD/on-tasks/forks","keys_url":"https://api.github.com/repos/RackHD/on-tasks/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RackHD/on-tasks/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RackHD/on-tasks/teams","hooks_url":"https://api.github.com/repos/RackHD/on-tasks/hooks","issue_events_url":"https://api.github.com/repos/RackHD/on-tasks/issues/events{/number}","events_url":"https://api.github.com/repos/RackHD/on-tasks/events","assignees_url":"https://api.github.com/repos/RackHD/on-tasks/assignees{/user}","branches_url":"https://api.github.com/repos/RackHD/on-tasks/branches{/branch}","tags_url":"https://api.github.com/repos/RackHD/on-tasks/tags","blobs_url":"https://api.github.com/repos/RackHD/on-tasks/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RackHD/on-tasks/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RackHD/on-tasks/git/refs{/sha}","trees_url":"https://api.github.com/repos/RackHD/on-tasks/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RackHD/on-tasks/statuses/{sha}","languages_url":"https://api.github.com/repos/RackHD/on-tasks/languages","stargazers_url":"https://api.github.com/repos/RackHD/on-tasks/stargazers","contributors_url":"https://api.github.com/repos/RackHD/on-tasks/contributors","subscribers_url":"https://api.github.com/repos/RackHD/on-tasks/subscribers","subscription_url":"https://api.github.com/repos/RackHD/on-tasks/subscription","commits_url":"https://api.github.com/repos/RackHD/on-tasks/commits{/sha}","git_commits_url":"https://api.github.com/repos/RackHD/on-tasks/git/commits{/sha}","comments_url":"https://api.github.com/repos/RackHD/on-tasks/comments{/number}","issue_comment_url":"https://api.github.com/repos/RackHD/on-tasks/issues/comments{/number}","contents_url":"https://api.github.com/repos/RackHD/on-tasks/contents/{+path}","compare_url":"https://api.github.com/repos/RackHD/on-tasks/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RackHD/on-tasks/merges","archive_url":"https://api.github.com/repos/RackHD/on-tasks/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RackHD/on-tasks/downloads","issues_url":"https://api.github.com/repos/RackHD/on-tasks/issues{/number}","pulls_url":"https://api.github.com/repos/RackHD/on-tasks/pulls{/number}","milestones_url":"https://api.github.com/repos/RackHD/on-tasks/milestones{/number}","notifications_url":"https://api.github.com/repos/RackHD/on-tasks/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RackHD/on-tasks/labels{/name}","releases_url":"https://api.github.com/repos/RackHD/on-tasks/releases{/id}","deployments_url":"https://api.github.com/repos/RackHD/on-tasks/deployments","created_at":"2015-08-31T17:29:32Z","updated_at":"2016-05-17T08:18:08Z","pushed_at":"2016-08-24T20:56:08Z","git_url":"git://github.com/RackHD/on-tasks.git","ssh_url":"git@github.com:RackHD/on-tasks.git","clone_url":"https://github.com/RackHD/on-tasks.git","svn_url":"https://github.com/RackHD/on-tasks","homepage":null,"size":1951,"stargazers_count":7,"watchers_count":7,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":46,"mirror_url":null,"open_issues_count":7,"forks":46,"open_issues":7,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/RackHD/on-tasks/pulls/320"},"html":{"href":"https://github.com/RackHD/on-tasks/pull/320"},"issue":{"href":"https://api.github.com/repos/RackHD/on-tasks/issues/320"},"comments":{"href":"https://api.github.com/repos/RackHD/on-tasks/issues/320/comments"},"review_comments":{"href":"https://api.github.com/repos/RackHD/on-tasks/pulls/320/comments"},"review_comment":{"href":"https://api.github.com/repos/RackHD/on-tasks/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/RackHD/on-tasks/pulls/320/commits"},"statuses":{"href":"https://api.github.com/repos/RackHD/on-tasks/statuses/1ca08ab40e8ff4dc4650b8e174ba6502e60e2bc1"}}}}
{"actor":{"display_login":"heckj"}}