{"action":"created","comment":{"url":"https://api.github.com/repos/dcos/dcos-ui/pulls/comments/176916890","pull_request_review_id":106707095,"id":176916890,"diff_hunk":"@@ -99,14 +99,15 @@ class MesosStateStore extends GetSetBaseStore {\n     // refresh limits to the UI. They are:\n     //\n     // MOST once every (Config.getRefreshRate() * 0.5) ms. due to debounceTime.\n-    // LEAST once every tick of Config.getRefreshRate() ms in Observable.interval\n+    // LEAST once every tick of Config.getRefreshRate() ms in\n+    // Observable.interval\n     //\n     // TODO: https://jira.mesosphere.com/browse/DCOS-18277\n     this.stream = waitStream\n       .concat(eventTriggerStream)\n       .debounceTime(Config.getRefreshRate() * 0.5)\n       .retryWhen(linearBackoff(MAX_RETRIES, RETRY_DELAY))\n-      .subscribe(this.onStreamData, this.onStreamError);\n+      .subscribe(Promise.resolve().then(this.onStreamData), this.onStreamError);","path":"src/js/stores/MesosStateStore.js","position":14,"original_position":14,"commit_id":"f32c3ebd4b083fc86ae2ec43403c6aee48f53cf6","original_commit_id":"f32c3ebd4b083fc86ae2ec43403c6aee48f53cf6","user":{"login":"Fabs","id":10524,"avatar_url":"https://avatars1.githubusercontent.com/u/10524?v=4","gravatar_id":"","url":"https://api.github.com/users/Fabs","html_url":"https://github.com/Fabs","followers_url":"https://api.github.com/users/Fabs/followers","following_url":"https://api.github.com/users/Fabs/following{/other_user}","gists_url":"https://api.github.com/users/Fabs/gists{/gist_id}","starred_url":"https://api.github.com/users/Fabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fabs/subscriptions","organizations_url":"https://api.github.com/users/Fabs/orgs","repos_url":"https://api.github.com/users/Fabs/repos","events_url":"https://api.github.com/users/Fabs/events{/privacy}","received_events_url":"https://api.github.com/users/Fabs/received_events","type":"User","site_admin":false},"body":"Regarding micro/macro tasks and observer scheduler, we settled that in this case it does not really matter for us, but I would like to share a little bit of what I learned about schedulers.\r\n\r\nContrary to rxjs 4, rxjs 5 default scheduler depends on the operator.\r\nhttps://github.com/ReactiveX/rxjs/blob/master/doc/scheduler.md\r\n\r\nThe default scheduler for `from` rxjs 5 is synchronous `Scheduler.queue`:\r\nhttps://github.com/Reactive-Extensions/RxJS/blob/master/src/modular/observable/from.js\r\nhttps://jsbin.com/keriluy/edit?js,console\r\n\r\nFor `Interval` on the other hand, it is `Scheduler.async`:\r\nhttps://github.com/Reactive-Extensions/RxJS/blob/master/src/modular/observable/interval.js\r\n\r\n","created_at":"2018-03-24T18:47:51Z","updated_at":"2018-03-24T18:47:51Z","html_url":"https://github.com/dcos/dcos-ui/pull/2851#discussion_r176916890","pull_request_url":"https://api.github.com/repos/dcos/dcos-ui/pulls/2851","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/dcos/dcos-ui/pulls/comments/176916890"},"html":{"href":"https://github.com/dcos/dcos-ui/pull/2851#discussion_r176916890"},"pull_request":{"href":"https://api.github.com/repos/dcos/dcos-ui/pulls/2851"}},"in_reply_to_id":176694589},"pull_request":{"url":"https://api.github.com/repos/dcos/dcos-ui/pulls/2851","id":176823375,"html_url":"https://github.com/dcos/dcos-ui/pull/2851","diff_url":"https://github.com/dcos/dcos-ui/pull/2851.diff","patch_url":"https://github.com/dcos/dcos-ui/pull/2851.patch","issue_url":"https://api.github.com/repos/dcos/dcos-ui/issues/2851","number":2851,"state":"open","locked":false,"title":"fix(MesosStateStore): adjust stream data handling","user":{"login":"orlandohohmeier","id":647035,"avatar_url":"https://avatars3.githubusercontent.com/u/647035?v=4","gravatar_id":"","url":"https://api.github.com/users/orlandohohmeier","html_url":"https://github.com/orlandohohmeier","followers_url":"https://api.github.com/users/orlandohohmeier/followers","following_url":"https://api.github.com/users/orlandohohmeier/following{/other_user}","gists_url":"https://api.github.com/users/orlandohohmeier/gists{/gist_id}","starred_url":"https://api.github.com/users/orlandohohmeier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orlandohohmeier/subscriptions","organizations_url":"https://api.github.com/users/orlandohohmeier/orgs","repos_url":"https://api.github.com/users/orlandohohmeier/repos","events_url":"https://api.github.com/users/orlandohohmeier/events{/privacy}","received_events_url":"https://api.github.com/users/orlandohohmeier/received_events","type":"User","site_admin":false},"body":"Use `Promise.resolve().then()` to schedule a micro tasks and asynchronously  trigger `onStreamData` which is used to emit the `MESOS_STATE_CHANGE`. This change will mitigate issues in which errors in view components lead to stale data as the error propergation broke the stream.\r\n\r\nN.B. `EventEmitter` is synchronous meaning that every delay in an event handler effects the `emit` execution time and errors propagate up to the `emit` call which sometimes leads to undesireable behavior.\r\n\r\nCloses DCOS-21784","created_at":"2018-03-22T15:49:03Z","updated_at":"2018-03-24T18:47:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ec87c4aa505e9f3c6d5b1deb95e3316a7e4e88fc","assignee":{"login":"Fabs","id":10524,"avatar_url":"https://avatars1.githubusercontent.com/u/10524?v=4","gravatar_id":"","url":"https://api.github.com/users/Fabs","html_url":"https://github.com/Fabs","followers_url":"https://api.github.com/users/Fabs/followers","following_url":"https://api.github.com/users/Fabs/following{/other_user}","gists_url":"https://api.github.com/users/Fabs/gists{/gist_id}","starred_url":"https://api.github.com/users/Fabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fabs/subscriptions","organizations_url":"https://api.github.com/users/Fabs/orgs","repos_url":"https://api.github.com/users/Fabs/repos","events_url":"https://api.github.com/users/Fabs/events{/privacy}","received_events_url":"https://api.github.com/users/Fabs/received_events","type":"User","site_admin":false},"assignees":[{"login":"Fabs","id":10524,"avatar_url":"https://avatars1.githubusercontent.com/u/10524?v=4","gravatar_id":"","url":"https://api.github.com/users/Fabs","html_url":"https://github.com/Fabs","followers_url":"https://api.github.com/users/Fabs/followers","following_url":"https://api.github.com/users/Fabs/following{/other_user}","gists_url":"https://api.github.com/users/Fabs/gists{/gist_id}","starred_url":"https://api.github.com/users/Fabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fabs/subscriptions","organizations_url":"https://api.github.com/users/Fabs/orgs","repos_url":"https://api.github.com/users/Fabs/repos","events_url":"https://api.github.com/users/Fabs/events{/privacy}","received_events_url":"https://api.github.com/users/Fabs/received_events","type":"User","site_admin":false}],"requested_reviewers":[{"login":"nLight","id":186223,"avatar_url":"https://avatars0.githubusercontent.com/u/186223?v=4","gravatar_id":"","url":"https://api.github.com/users/nLight","html_url":"https://github.com/nLight","followers_url":"https://api.github.com/users/nLight/followers","following_url":"https://api.github.com/users/nLight/following{/other_user}","gists_url":"https://api.github.com/users/nLight/gists{/gist_id}","starred_url":"https://api.github.com/users/nLight/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nLight/subscriptions","organizations_url":"https://api.github.com/users/nLight/orgs","repos_url":"https://api.github.com/users/nLight/repos","events_url":"https://api.github.com/users/nLight/events{/privacy}","received_events_url":"https://api.github.com/users/nLight/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":539468738,"url":"https://api.github.com/repos/dcos/dcos-ui/labels/blocker","name":"blocker","color":"b60205","default":false}],"milestone":{"url":"https://api.github.com/repos/dcos/dcos-ui/milestones/7","html_url":"https://github.com/dcos/dcos-ui/milestone/7","labels_url":"https://api.github.com/repos/dcos/dcos-ui/milestones/7/labels","id":3048958,"number":7,"title":"1.12","description":"","creator":{"login":"orlandohohmeier","id":647035,"avatar_url":"https://avatars3.githubusercontent.com/u/647035?v=4","gravatar_id":"","url":"https://api.github.com/users/orlandohohmeier","html_url":"https://github.com/orlandohohmeier","followers_url":"https://api.github.com/users/orlandohohmeier/followers","following_url":"https://api.github.com/users/orlandohohmeier/following{/other_user}","gists_url":"https://api.github.com/users/orlandohohmeier/gists{/gist_id}","starred_url":"https://api.github.com/users/orlandohohmeier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orlandohohmeier/subscriptions","organizations_url":"https://api.github.com/users/orlandohohmeier/orgs","repos_url":"https://api.github.com/users/orlandohohmeier/repos","events_url":"https://api.github.com/users/orlandohohmeier/events{/privacy}","received_events_url":"https://api.github.com/users/orlandohohmeier/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":36,"state":"open","created_at":"2018-01-19T16:07:51Z","updated_at":"2018-03-22T15:49:13Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/dcos/dcos-ui/pulls/2851/commits","review_comments_url":"https://api.github.com/repos/dcos/dcos-ui/pulls/2851/comments","review_comment_url":"https://api.github.com/repos/dcos/dcos-ui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dcos/dcos-ui/issues/2851/comments","statuses_url":"https://api.github.com/repos/dcos/dcos-ui/statuses/f32c3ebd4b083fc86ae2ec43403c6aee48f53cf6","head":{"label":"dcos:orlandohohmeier/master/fix/DCOS-21784-adjust-the-mesos-stream-data-handling-to-mitigate-upstream-error-propagation","ref":"orlandohohmeier/master/fix/DCOS-21784-adjust-the-mesos-stream-data-handling-to-mitigate-upstream-error-propagation","sha":"f32c3ebd4b083fc86ae2ec43403c6aee48f53cf6","user":{"login":"dcos","id":17648048,"avatar_url":"https://avatars1.githubusercontent.com/u/17648048?v=4","gravatar_id":"","url":"https://api.github.com/users/dcos","html_url":"https://github.com/dcos","followers_url":"https://api.github.com/users/dcos/followers","following_url":"https://api.github.com/users/dcos/following{/other_user}","gists_url":"https://api.github.com/users/dcos/gists{/gist_id}","starred_url":"https://api.github.com/users/dcos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcos/subscriptions","organizations_url":"https://api.github.com/users/dcos/orgs","repos_url":"https://api.github.com/users/dcos/repos","events_url":"https://api.github.com/users/dcos/events{/privacy}","received_events_url":"https://api.github.com/users/dcos/received_events","type":"Organization","site_admin":false},"repo":{"id":56547504,"name":"dcos-ui","full_name":"dcos/dcos-ui","owner":{"login":"dcos","id":17648048,"avatar_url":"https://avatars1.githubusercontent.com/u/17648048?v=4","gravatar_id":"","url":"https://api.github.com/users/dcos","html_url":"https://github.com/dcos","followers_url":"https://api.github.com/users/dcos/followers","following_url":"https://api.github.com/users/dcos/following{/other_user}","gists_url":"https://api.github.com/users/dcos/gists{/gist_id}","starred_url":"https://api.github.com/users/dcos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcos/subscriptions","organizations_url":"https://api.github.com/users/dcos/orgs","repos_url":"https://api.github.com/users/dcos/repos","events_url":"https://api.github.com/users/dcos/events{/privacy}","received_events_url":"https://api.github.com/users/dcos/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dcos/dcos-ui","description":"The UI for The Datacenter Operating System","fork":false,"url":"https://api.github.com/repos/dcos/dcos-ui","forks_url":"https://api.github.com/repos/dcos/dcos-ui/forks","keys_url":"https://api.github.com/repos/dcos/dcos-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dcos/dcos-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dcos/dcos-ui/teams","hooks_url":"https://api.github.com/repos/dcos/dcos-ui/hooks","issue_events_url":"https://api.github.com/repos/dcos/dcos-ui/issues/events{/number}","events_url":"https://api.github.com/repos/dcos/dcos-ui/events","assignees_url":"https://api.github.com/repos/dcos/dcos-ui/assignees{/user}","branches_url":"https://api.github.com/repos/dcos/dcos-ui/branches{/branch}","tags_url":"https://api.github.com/repos/dcos/dcos-ui/tags","blobs_url":"https://api.github.com/repos/dcos/dcos-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dcos/dcos-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dcos/dcos-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/dcos/dcos-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dcos/dcos-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/dcos/dcos-ui/languages","stargazers_url":"https://api.github.com/repos/dcos/dcos-ui/stargazers","contributors_url":"https://api.github.com/repos/dcos/dcos-ui/contributors","subscribers_url":"https://api.github.com/repos/dcos/dcos-ui/subscribers","subscription_url":"https://api.github.com/repos/dcos/dcos-ui/subscription","commits_url":"https://api.github.com/repos/dcos/dcos-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/dcos/dcos-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/dcos/dcos-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/dcos/dcos-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/dcos/dcos-ui/contents/{+path}","compare_url":"https://api.github.com/repos/dcos/dcos-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dcos/dcos-ui/merges","archive_url":"https://api.github.com/repos/dcos/dcos-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dcos/dcos-ui/downloads","issues_url":"https://api.github.com/repos/dcos/dcos-ui/issues{/number}","pulls_url":"https://api.github.com/repos/dcos/dcos-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/dcos/dcos-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/dcos/dcos-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dcos/dcos-ui/labels{/name}","releases_url":"https://api.github.com/repos/dcos/dcos-ui/releases{/id}","deployments_url":"https://api.github.com/repos/dcos/dcos-ui/deployments","created_at":"2016-04-18T22:48:06Z","updated_at":"2018-03-23T15:58:47Z","pushed_at":"2018-03-23T15:58:47Z","git_url":"git://github.com/dcos/dcos-ui.git","ssh_url":"git@github.com:dcos/dcos-ui.git","clone_url":"https://github.com/dcos/dcos-ui.git","svn_url":"https://github.com/dcos/dcos-ui","homepage":"https://dcos.io/","size":43116,"stargazers_count":171,"watchers_count":171,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":64,"mirror_url":null,"archived":false,"open_issues_count":19,"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":64,"open_issues":19,"watchers":171,"default_branch":"master"}},"base":{"label":"dcos:master","ref":"master","sha":"badc5eeb9ce658724da67467722dfc7279d02233","user":{"login":"dcos","id":17648048,"avatar_url":"https://avatars1.githubusercontent.com/u/17648048?v=4","gravatar_id":"","url":"https://api.github.com/users/dcos","html_url":"https://github.com/dcos","followers_url":"https://api.github.com/users/dcos/followers","following_url":"https://api.github.com/users/dcos/following{/other_user}","gists_url":"https://api.github.com/users/dcos/gists{/gist_id}","starred_url":"https://api.github.com/users/dcos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcos/subscriptions","organizations_url":"https://api.github.com/users/dcos/orgs","repos_url":"https://api.github.com/users/dcos/repos","events_url":"https://api.github.com/users/dcos/events{/privacy}","received_events_url":"https://api.github.com/users/dcos/received_events","type":"Organization","site_admin":false},"repo":{"id":56547504,"name":"dcos-ui","full_name":"dcos/dcos-ui","owner":{"login":"dcos","id":17648048,"avatar_url":"https://avatars1.githubusercontent.com/u/17648048?v=4","gravatar_id":"","url":"https://api.github.com/users/dcos","html_url":"https://github.com/dcos","followers_url":"https://api.github.com/users/dcos/followers","following_url":"https://api.github.com/users/dcos/following{/other_user}","gists_url":"https://api.github.com/users/dcos/gists{/gist_id}","starred_url":"https://api.github.com/users/dcos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcos/subscriptions","organizations_url":"https://api.github.com/users/dcos/orgs","repos_url":"https://api.github.com/users/dcos/repos","events_url":"https://api.github.com/users/dcos/events{/privacy}","received_events_url":"https://api.github.com/users/dcos/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dcos/dcos-ui","description":"The UI for The Datacenter Operating System","fork":false,"url":"https://api.github.com/repos/dcos/dcos-ui","forks_url":"https://api.github.com/repos/dcos/dcos-ui/forks","keys_url":"https://api.github.com/repos/dcos/dcos-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dcos/dcos-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dcos/dcos-ui/teams","hooks_url":"https://api.github.com/repos/dcos/dcos-ui/hooks","issue_events_url":"https://api.github.com/repos/dcos/dcos-ui/issues/events{/number}","events_url":"https://api.github.com/repos/dcos/dcos-ui/events","assignees_url":"https://api.github.com/repos/dcos/dcos-ui/assignees{/user}","branches_url":"https://api.github.com/repos/dcos/dcos-ui/branches{/branch}","tags_url":"https://api.github.com/repos/dcos/dcos-ui/tags","blobs_url":"https://api.github.com/repos/dcos/dcos-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dcos/dcos-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dcos/dcos-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/dcos/dcos-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dcos/dcos-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/dcos/dcos-ui/languages","stargazers_url":"https://api.github.com/repos/dcos/dcos-ui/stargazers","contributors_url":"https://api.github.com/repos/dcos/dcos-ui/contributors","subscribers_url":"https://api.github.com/repos/dcos/dcos-ui/subscribers","subscription_url":"https://api.github.com/repos/dcos/dcos-ui/subscription","commits_url":"https://api.github.com/repos/dcos/dcos-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/dcos/dcos-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/dcos/dcos-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/dcos/dcos-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/dcos/dcos-ui/contents/{+path}","compare_url":"https://api.github.com/repos/dcos/dcos-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dcos/dcos-ui/merges","archive_url":"https://api.github.com/repos/dcos/dcos-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dcos/dcos-ui/downloads","issues_url":"https://api.github.com/repos/dcos/dcos-ui/issues{/number}","pulls_url":"https://api.github.com/repos/dcos/dcos-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/dcos/dcos-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/dcos/dcos-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dcos/dcos-ui/labels{/name}","releases_url":"https://api.github.com/repos/dcos/dcos-ui/releases{/id}","deployments_url":"https://api.github.com/repos/dcos/dcos-ui/deployments","created_at":"2016-04-18T22:48:06Z","updated_at":"2018-03-23T15:58:47Z","pushed_at":"2018-03-23T15:58:47Z","git_url":"git://github.com/dcos/dcos-ui.git","ssh_url":"git@github.com:dcos/dcos-ui.git","clone_url":"https://github.com/dcos/dcos-ui.git","svn_url":"https://github.com/dcos/dcos-ui","homepage":"https://dcos.io/","size":43116,"stargazers_count":171,"watchers_count":171,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":64,"mirror_url":null,"archived":false,"open_issues_count":19,"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":64,"open_issues":19,"watchers":171,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dcos/dcos-ui/pulls/2851"},"html":{"href":"https://github.com/dcos/dcos-ui/pull/2851"},"issue":{"href":"https://api.github.com/repos/dcos/dcos-ui/issues/2851"},"comments":{"href":"https://api.github.com/repos/dcos/dcos-ui/issues/2851/comments"},"review_comments":{"href":"https://api.github.com/repos/dcos/dcos-ui/pulls/2851/comments"},"review_comment":{"href":"https://api.github.com/repos/dcos/dcos-ui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dcos/dcos-ui/pulls/2851/commits"},"statuses":{"href":"https://api.github.com/repos/dcos/dcos-ui/statuses/f32c3ebd4b083fc86ae2ec43403c6aee48f53cf6"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"Fabs"}}