{"action":"created","comment":{"url":"https://api.github.com/repos/linkedin/pinot/pulls/comments/169755164","pull_request_review_id":98329292,"id":169755164,"diff_hunk":"@@ -443,6 +395,98 @@ export default Route.extend({\n     return RSVP.hash(promises);\n   },\n \n+  /**\n+   * Performs the repetitive task of setting graph properties based on\n+   * returned metric data and dimension data\n+   * @method setGraphProperties\n+   * @param {Object} metricData - returned metric timeseries data\n+   * @param {String} exploreDimensions - string of metric dimensions\n+   * @returns {RSVP promise}\n+   */\n+  setGraphProperties(metricData, exploreDimensions) {\n+    const alertDimension = exploreDimensions ? exploreDimensions.split(',')[0] : '';\n+    Object.assign(metricData, { color: metricDataColor });\n+    this.controller.setProperties({\n+      metricData,\n+      alertDimension,\n+      topDimensions: [],\n+      isMetricDataLoading: false\n+    });\n+    // If alert has dimensions set, load them into graph once replay is done.\n+    if (exploreDimensions && !this.controller.isReplayPending) {\n+      this.controller.set('topDimensions', getTopDimensions(metricData, dimensionCount));\n+    }\n+  },\n+\n+  /**\n+   * Fetch all anomalies we have Ids for. Enhance the data and populate power-select filter options.\n+   * Using ember concurrency parent/child tasks. When parent is cancelled, so are children\n+   * http://ember-concurrency.com/docs/child-tasks.\n+   * TODO: complete concurrency task error handling and refactor child tasks for cuncurrency.\n+   * @param {Array} anomalyIds - the IDs of anomalies that have been reported for this alert.\n+   * @return {undefined}\n+   */\n+  loadAnomalyData: task(function * (anomalyIds) {\n+    yield timeout(300);\n+    // Load data for each anomaly Id\n+    const rawAnomalies = yield fetchCombinedAnomalies(anomalyIds);\n+    // Fetch and append severity score to each anomaly record\n+    const severityScores = yield fetchSeverityScores(anomalyIds);\n+    // Process anomaly records to make them template-ready\n+    const anomalyData = yield enhanceAnomalies(rawAnomalies, severityScores);\n+    // Prepare de-duped power-select option arrays\n+    resolutionOptions.push(...new Set(anomalyData.map(record => record.anomalyFeedback)));\n+    dimensionOptions.push(...new Set(anomalyData.map(anomaly => anomaly.dimensionString)));\n+    // Push anomaly data into controller\n+    this.controller.setProperties({\n+      anomaliesLoaded: true,\n+      anomalyData,\n+      resolutionOptions,\n+      dimensionOptions\n+    });\n+    // Fetch and append extra WoW data for each anomaly record\n+    const wowData = yield this.fetchCombinedAnomalyChangeData(anomalyData);\n+    anomalyData.forEach((anomaly) => {\n+      anomaly.wowData = wowData[anomaly.anomalyId] || {};\n+    });\n+    // Load enhanced dataset into controller (WoW options will appear)\n+    this.controller.setProperties({\n+      anomalyData,\n+      baselineOptionsLoading: false,\n+      baselineOptions: [baselineOptions[0], ...newWowList]\n+    });\n+  // We use .cancelOn('deactivate') to make sure the task cancels when the user leaves the route.\n+  // We use restartable to ensure that only one instance of the task is running at a time, hence\n+  // any time setupController performs the task, any prior instances are canceled.\n+  }).cancelOn('deactivate').restartable(),\n+\n+  /**\n+   * Concurrenty task to ping the job-info endpoint to check status of an ongoing replay job.\n+   * If there is no progress after a set time, we display an error message.\n+   * @param {Number} jobId - the id for the newly triggered replay job\n+   * @param {String} functionName - user-provided new function name (used to validate creation)\n+   * @return {undefined}\n+   */\n+  loadGraphData: task(function * (metricDataUrl, exploreDimensions) {\n+    yield timeout(300);\n+    const metricId = this.currentModel.config ? this.currentModel.config.id : null;\n+    const isGraphDataLocal = metricId && localStorage.getItem(metricId) !== null;\n+\n+    // Fetch and load graph metric data.\n+    fetch(metricDataUrl).then(checkStatus)","path":"thirdeye/thirdeye-frontend/app/pods/manage/alert/explore/route.js","position":253,"original_position":253,"commit_id":"055b61829aa7625e52a921c6c9b1166a2b69f8eb","original_commit_id":"055b61829aa7625e52a921c6c9b1166a2b69f8eb","user":{"login":"justYves","id":8664954,"avatar_url":"https://avatars1.githubusercontent.com/u/8664954?v=4","gravatar_id":"","url":"https://api.github.com/users/justYves","html_url":"https://github.com/justYves","followers_url":"https://api.github.com/users/justYves/followers","following_url":"https://api.github.com/users/justYves/following{/other_user}","gists_url":"https://api.github.com/users/justYves/gists{/gist_id}","starred_url":"https://api.github.com/users/justYves/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justYves/subscriptions","organizations_url":"https://api.github.com/users/justYves/orgs","repos_url":"https://api.github.com/users/justYves/repos","events_url":"https://api.github.com/users/justYves/events{/privacy}","received_events_url":"https://api.github.com/users/justYves/received_events","type":"User","site_admin":false},"body":"Is this what you were referring to? My understanding is that moving this to another async function will allow for `await/async`, but doesn't work in the context of a task generator? ","created_at":"2018-02-21T19:42:05Z","updated_at":"2018-02-21T19:52:07Z","html_url":"https://github.com/linkedin/pinot/pull/2518#discussion_r169755164","pull_request_url":"https://api.github.com/repos/linkedin/pinot/pulls/2518","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/linkedin/pinot/pulls/comments/169755164"},"html":{"href":"https://github.com/linkedin/pinot/pull/2518#discussion_r169755164"},"pull_request":{"href":"https://api.github.com/repos/linkedin/pinot/pulls/2518"}}},"pull_request":{"url":"https://api.github.com/repos/linkedin/pinot/pulls/2518","id":170552888,"html_url":"https://github.com/linkedin/pinot/pull/2518","diff_url":"https://github.com/linkedin/pinot/pull/2518.diff","patch_url":"https://github.com/linkedin/pinot/pull/2518.patch","issue_url":"https://api.github.com/repos/linkedin/pinot/issues/2518","number":2518,"state":"open","locked":false,"title":"[TE] Self-Serve Onboard/Tuning flows: perf enhancements + links","user":{"login":"newsummit","id":11814420,"avatar_url":"https://avatars2.githubusercontent.com/u/11814420?v=4","gravatar_id":"","url":"https://api.github.com/users/newsummit","html_url":"https://github.com/newsummit","followers_url":"https://api.github.com/users/newsummit/followers","following_url":"https://api.github.com/users/newsummit/following{/other_user}","gists_url":"https://api.github.com/users/newsummit/gists{/gist_id}","starred_url":"https://api.github.com/users/newsummit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/newsummit/subscriptions","organizations_url":"https://api.github.com/users/newsummit/orgs","repos_url":"https://api.github.com/users/newsummit/repos","events_url":"https://api.github.com/users/newsummit/events{/privacy}","received_events_url":"https://api.github.com/users/newsummit/received_events","type":"User","site_admin":false},"body":"In this iteration for Self-Serve:\r\n- Releasing manage.alerts.index links to new Alert Page\r\n- Resolving blocked transition issues during fetch chains by using concurrency tasks\r\n- Other small adjustments such as - adding a loader icon for anomaly table","created_at":"2018-02-21T18:34:19Z","updated_at":"2018-02-21T19:52:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"044dd612da477e04825487ff1f022439f4cb87e8","assignee":{"login":"newsummit","id":11814420,"avatar_url":"https://avatars2.githubusercontent.com/u/11814420?v=4","gravatar_id":"","url":"https://api.github.com/users/newsummit","html_url":"https://github.com/newsummit","followers_url":"https://api.github.com/users/newsummit/followers","following_url":"https://api.github.com/users/newsummit/following{/other_user}","gists_url":"https://api.github.com/users/newsummit/gists{/gist_id}","starred_url":"https://api.github.com/users/newsummit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/newsummit/subscriptions","organizations_url":"https://api.github.com/users/newsummit/orgs","repos_url":"https://api.github.com/users/newsummit/repos","events_url":"https://api.github.com/users/newsummit/events{/privacy}","received_events_url":"https://api.github.com/users/newsummit/received_events","type":"User","site_admin":false},"assignees":[{"login":"newsummit","id":11814420,"avatar_url":"https://avatars2.githubusercontent.com/u/11814420?v=4","gravatar_id":"","url":"https://api.github.com/users/newsummit","html_url":"https://github.com/newsummit","followers_url":"https://api.github.com/users/newsummit/followers","following_url":"https://api.github.com/users/newsummit/following{/other_user}","gists_url":"https://api.github.com/users/newsummit/gists{/gist_id}","starred_url":"https://api.github.com/users/newsummit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/newsummit/subscriptions","organizations_url":"https://api.github.com/users/newsummit/orgs","repos_url":"https://api.github.com/users/newsummit/repos","events_url":"https://api.github.com/users/newsummit/events{/privacy}","received_events_url":"https://api.github.com/users/newsummit/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/linkedin/pinot/pulls/2518/commits","review_comments_url":"https://api.github.com/repos/linkedin/pinot/pulls/2518/comments","review_comment_url":"https://api.github.com/repos/linkedin/pinot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/linkedin/pinot/issues/2518/comments","statuses_url":"https://api.github.com/repos/linkedin/pinot/statuses/055b61829aa7625e52a921c6c9b1166a2b69f8eb","head":{"label":"linkedin:self-serve-onboarding11","ref":"self-serve-onboarding11","sha":"055b61829aa7625e52a921c6c9b1166a2b69f8eb","user":{"login":"linkedin","id":357098,"avatar_url":"https://avatars3.githubusercontent.com/u/357098?v=4","gravatar_id":"","url":"https://api.github.com/users/linkedin","html_url":"https://github.com/linkedin","followers_url":"https://api.github.com/users/linkedin/followers","following_url":"https://api.github.com/users/linkedin/following{/other_user}","gists_url":"https://api.github.com/users/linkedin/gists{/gist_id}","starred_url":"https://api.github.com/users/linkedin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linkedin/subscriptions","organizations_url":"https://api.github.com/users/linkedin/orgs","repos_url":"https://api.github.com/users/linkedin/repos","events_url":"https://api.github.com/users/linkedin/events{/privacy}","received_events_url":"https://api.github.com/users/linkedin/received_events","type":"Organization","site_admin":false},"repo":{"id":19961085,"name":"pinot","full_name":"linkedin/pinot","owner":{"login":"linkedin","id":357098,"avatar_url":"https://avatars3.githubusercontent.com/u/357098?v=4","gravatar_id":"","url":"https://api.github.com/users/linkedin","html_url":"https://github.com/linkedin","followers_url":"https://api.github.com/users/linkedin/followers","following_url":"https://api.github.com/users/linkedin/following{/other_user}","gists_url":"https://api.github.com/users/linkedin/gists{/gist_id}","starred_url":"https://api.github.com/users/linkedin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linkedin/subscriptions","organizations_url":"https://api.github.com/users/linkedin/orgs","repos_url":"https://api.github.com/users/linkedin/repos","events_url":"https://api.github.com/users/linkedin/events{/privacy}","received_events_url":"https://api.github.com/users/linkedin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/linkedin/pinot","description":"A realtime distributed OLAP datastore","fork":false,"url":"https://api.github.com/repos/linkedin/pinot","forks_url":"https://api.github.com/repos/linkedin/pinot/forks","keys_url":"https://api.github.com/repos/linkedin/pinot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/linkedin/pinot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/linkedin/pinot/teams","hooks_url":"https://api.github.com/repos/linkedin/pinot/hooks","issue_events_url":"https://api.github.com/repos/linkedin/pinot/issues/events{/number}","events_url":"https://api.github.com/repos/linkedin/pinot/events","assignees_url":"https://api.github.com/repos/linkedin/pinot/assignees{/user}","branches_url":"https://api.github.com/repos/linkedin/pinot/branches{/branch}","tags_url":"https://api.github.com/repos/linkedin/pinot/tags","blobs_url":"https://api.github.com/repos/linkedin/pinot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/linkedin/pinot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/linkedin/pinot/git/refs{/sha}","trees_url":"https://api.github.com/repos/linkedin/pinot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/linkedin/pinot/statuses/{sha}","languages_url":"https://api.github.com/repos/linkedin/pinot/languages","stargazers_url":"https://api.github.com/repos/linkedin/pinot/stargazers","contributors_url":"https://api.github.com/repos/linkedin/pinot/contributors","subscribers_url":"https://api.github.com/repos/linkedin/pinot/subscribers","subscription_url":"https://api.github.com/repos/linkedin/pinot/subscription","commits_url":"https://api.github.com/repos/linkedin/pinot/commits{/sha}","git_commits_url":"https://api.github.com/repos/linkedin/pinot/git/commits{/sha}","comments_url":"https://api.github.com/repos/linkedin/pinot/comments{/number}","issue_comment_url":"https://api.github.com/repos/linkedin/pinot/issues/comments{/number}","contents_url":"https://api.github.com/repos/linkedin/pinot/contents/{+path}","compare_url":"https://api.github.com/repos/linkedin/pinot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/linkedin/pinot/merges","archive_url":"https://api.github.com/repos/linkedin/pinot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/linkedin/pinot/downloads","issues_url":"https://api.github.com/repos/linkedin/pinot/issues{/number}","pulls_url":"https://api.github.com/repos/linkedin/pinot/pulls{/number}","milestones_url":"https://api.github.com/repos/linkedin/pinot/milestones{/number}","notifications_url":"https://api.github.com/repos/linkedin/pinot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/linkedin/pinot/labels{/name}","releases_url":"https://api.github.com/repos/linkedin/pinot/releases{/id}","deployments_url":"https://api.github.com/repos/linkedin/pinot/deployments","created_at":"2014-05-19T23:27:48Z","updated_at":"2018-02-19T04:26:33Z","pushed_at":"2018-02-21T19:39:54Z","git_url":"git://github.com/linkedin/pinot.git","ssh_url":"git@github.com:linkedin/pinot.git","clone_url":"https://github.com/linkedin/pinot.git","svn_url":"https://github.com/linkedin/pinot","homepage":"https://github.com/linkedin/pinot/wiki","size":147707,"stargazers_count":1751,"watchers_count":1751,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":317,"mirror_url":null,"archived":false,"open_issues_count":151,"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":317,"open_issues":151,"watchers":1751,"default_branch":"master"}},"base":{"label":"linkedin:master","ref":"master","sha":"d4e93107021ca7222619face319c7a62fae499d8","user":{"login":"linkedin","id":357098,"avatar_url":"https://avatars3.githubusercontent.com/u/357098?v=4","gravatar_id":"","url":"https://api.github.com/users/linkedin","html_url":"https://github.com/linkedin","followers_url":"https://api.github.com/users/linkedin/followers","following_url":"https://api.github.com/users/linkedin/following{/other_user}","gists_url":"https://api.github.com/users/linkedin/gists{/gist_id}","starred_url":"https://api.github.com/users/linkedin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linkedin/subscriptions","organizations_url":"https://api.github.com/users/linkedin/orgs","repos_url":"https://api.github.com/users/linkedin/repos","events_url":"https://api.github.com/users/linkedin/events{/privacy}","received_events_url":"https://api.github.com/users/linkedin/received_events","type":"Organization","site_admin":false},"repo":{"id":19961085,"name":"pinot","full_name":"linkedin/pinot","owner":{"login":"linkedin","id":357098,"avatar_url":"https://avatars3.githubusercontent.com/u/357098?v=4","gravatar_id":"","url":"https://api.github.com/users/linkedin","html_url":"https://github.com/linkedin","followers_url":"https://api.github.com/users/linkedin/followers","following_url":"https://api.github.com/users/linkedin/following{/other_user}","gists_url":"https://api.github.com/users/linkedin/gists{/gist_id}","starred_url":"https://api.github.com/users/linkedin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/linkedin/subscriptions","organizations_url":"https://api.github.com/users/linkedin/orgs","repos_url":"https://api.github.com/users/linkedin/repos","events_url":"https://api.github.com/users/linkedin/events{/privacy}","received_events_url":"https://api.github.com/users/linkedin/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/linkedin/pinot","description":"A realtime distributed OLAP datastore","fork":false,"url":"https://api.github.com/repos/linkedin/pinot","forks_url":"https://api.github.com/repos/linkedin/pinot/forks","keys_url":"https://api.github.com/repos/linkedin/pinot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/linkedin/pinot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/linkedin/pinot/teams","hooks_url":"https://api.github.com/repos/linkedin/pinot/hooks","issue_events_url":"https://api.github.com/repos/linkedin/pinot/issues/events{/number}","events_url":"https://api.github.com/repos/linkedin/pinot/events","assignees_url":"https://api.github.com/repos/linkedin/pinot/assignees{/user}","branches_url":"https://api.github.com/repos/linkedin/pinot/branches{/branch}","tags_url":"https://api.github.com/repos/linkedin/pinot/tags","blobs_url":"https://api.github.com/repos/linkedin/pinot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/linkedin/pinot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/linkedin/pinot/git/refs{/sha}","trees_url":"https://api.github.com/repos/linkedin/pinot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/linkedin/pinot/statuses/{sha}","languages_url":"https://api.github.com/repos/linkedin/pinot/languages","stargazers_url":"https://api.github.com/repos/linkedin/pinot/stargazers","contributors_url":"https://api.github.com/repos/linkedin/pinot/contributors","subscribers_url":"https://api.github.com/repos/linkedin/pinot/subscribers","subscription_url":"https://api.github.com/repos/linkedin/pinot/subscription","commits_url":"https://api.github.com/repos/linkedin/pinot/commits{/sha}","git_commits_url":"https://api.github.com/repos/linkedin/pinot/git/commits{/sha}","comments_url":"https://api.github.com/repos/linkedin/pinot/comments{/number}","issue_comment_url":"https://api.github.com/repos/linkedin/pinot/issues/comments{/number}","contents_url":"https://api.github.com/repos/linkedin/pinot/contents/{+path}","compare_url":"https://api.github.com/repos/linkedin/pinot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/linkedin/pinot/merges","archive_url":"https://api.github.com/repos/linkedin/pinot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/linkedin/pinot/downloads","issues_url":"https://api.github.com/repos/linkedin/pinot/issues{/number}","pulls_url":"https://api.github.com/repos/linkedin/pinot/pulls{/number}","milestones_url":"https://api.github.com/repos/linkedin/pinot/milestones{/number}","notifications_url":"https://api.github.com/repos/linkedin/pinot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/linkedin/pinot/labels{/name}","releases_url":"https://api.github.com/repos/linkedin/pinot/releases{/id}","deployments_url":"https://api.github.com/repos/linkedin/pinot/deployments","created_at":"2014-05-19T23:27:48Z","updated_at":"2018-02-19T04:26:33Z","pushed_at":"2018-02-21T19:39:54Z","git_url":"git://github.com/linkedin/pinot.git","ssh_url":"git@github.com:linkedin/pinot.git","clone_url":"https://github.com/linkedin/pinot.git","svn_url":"https://github.com/linkedin/pinot","homepage":"https://github.com/linkedin/pinot/wiki","size":147707,"stargazers_count":1751,"watchers_count":1751,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":317,"mirror_url":null,"archived":false,"open_issues_count":151,"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":317,"open_issues":151,"watchers":1751,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/linkedin/pinot/pulls/2518"},"html":{"href":"https://github.com/linkedin/pinot/pull/2518"},"issue":{"href":"https://api.github.com/repos/linkedin/pinot/issues/2518"},"comments":{"href":"https://api.github.com/repos/linkedin/pinot/issues/2518/comments"},"review_comments":{"href":"https://api.github.com/repos/linkedin/pinot/pulls/2518/comments"},"review_comment":{"href":"https://api.github.com/repos/linkedin/pinot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/linkedin/pinot/pulls/2518/commits"},"statuses":{"href":"https://api.github.com/repos/linkedin/pinot/statuses/055b61829aa7625e52a921c6c9b1166a2b69f8eb"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"justYves"}}