{"action":"opened","number":17519,"pull_request":{"url":"https://api.github.com/repos/gatsbyjs/gatsby/pulls/17519","id":315722832,"node_id":"MDExOlB1bGxSZXF1ZXN0MzE1NzIyODMy","html_url":"https://github.com/gatsbyjs/gatsby/pull/17519","diff_url":"https://github.com/gatsbyjs/gatsby/pull/17519.diff","patch_url":"https://github.com/gatsbyjs/gatsby/pull/17519.patch","issue_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/17519","number":17519,"state":"open","locked":false,"title":"fix(gatsby-source-filesystem): Fix timing issue - processing nodes while flushing","user":{"login":"Andarist","id":9800850,"node_id":"MDQ6VXNlcjk4MDA4NTA=","avatar_url":"https://avatars2.githubusercontent.com/u/9800850?v=4","gravatar_id":"","url":"https://api.github.com/users/Andarist","html_url":"https://github.com/Andarist","followers_url":"https://api.github.com/users/Andarist/followers","following_url":"https://api.github.com/users/Andarist/following{/other_user}","gists_url":"https://api.github.com/users/Andarist/gists{/gist_id}","starred_url":"https://api.github.com/users/Andarist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Andarist/subscriptions","organizations_url":"https://api.github.com/users/Andarist/orgs","repos_url":"https://api.github.com/users/Andarist/repos","events_url":"https://api.github.com/users/Andarist/events{/privacy}","received_events_url":"https://api.github.com/users/Andarist/received_events","type":"User","site_admin":false},"body":"Followup to https://github.com/gatsbyjs/gatsby/pull/17192#discussion_r320210053\r\n\r\n## Description\r\n\r\nThis PR aims to solve a minor timing issue. Right now nodes can be created/changed/removed instantly **while** flushing path queue, so even before a returned promise settles. It has been suggested by @pieh that this might be a slight problem, although surely an edge case.\r\n\r\n**Before**\r\n\r\n<img src=\"https://user-images.githubusercontent.com/9800850/64313988-ae2d3180-cfad-11e9-822f-53dd804f3c6e.png\"/>\r\n\r\n**After**\r\n<img width=\"952\" alt=\"Screenshot 2019-09-09 at 23 15 58\" src=\"https://user-images.githubusercontent.com/9800850/64567135-d3c48d00-d357-11e9-8664-d838efdb2413.png\">\r\n\r\nAs you might notice on the **After** visualization paths queuing seems to be moved to the outside of CHOKIDAR state so it might look like those events always lead to queuing. This is not the case though, I've leveraged the fact of how XState works - we can \"override\" outer transitions by specifying inner ones. So actually we always queue (in NOT_READY & FLUSHING) but we process in READY (because we've overridden queuing there). This is somewhat less explicit, especially for people not familiar with XState but it makes the visualization more readable (it declutters it). If you don't like it I can change to more \"explicit\" form of this - by duplicating queuing transitions on both NOT_READY & FLUSHING states.\r\n\r\nThis is still WIP because we need to establish how flushing errors should be handled. Any thoughts @pieh ?","created_at":"2019-09-09T21:25:37Z","updated_at":"2019-09-09T21:25:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[{"login":"pieh","id":419821,"node_id":"MDQ6VXNlcjQxOTgyMQ==","avatar_url":"https://avatars1.githubusercontent.com/u/419821?v=4","gravatar_id":"","url":"https://api.github.com/users/pieh","html_url":"https://github.com/pieh","followers_url":"https://api.github.com/users/pieh/followers","following_url":"https://api.github.com/users/pieh/following{/other_user}","gists_url":"https://api.github.com/users/pieh/gists{/gist_id}","starred_url":"https://api.github.com/users/pieh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pieh/subscriptions","organizations_url":"https://api.github.com/users/pieh/orgs","repos_url":"https://api.github.com/users/pieh/repos","events_url":"https://api.github.com/users/pieh/events{/privacy}","received_events_url":"https://api.github.com/users/pieh/received_events","type":"User","site_admin":false}],"requested_teams":[{"name":"core","id":2934334,"node_id":"MDQ6VGVhbTI5MzQzMzQ=","slug":"core","description":"Code owners for core functionality of Gatsby.","privacy":"closed","url":"https://api.github.com/teams/2934334","html_url":"https://github.com/orgs/gatsbyjs/teams/core","members_url":"https://api.github.com/teams/2934334/members{/member}","repositories_url":"https://api.github.com/teams/2934334/repos","permission":"pull"}],"labels":[{"id":1030072314,"node_id":"MDU6TGFiZWwxMDMwMDcyMzE0","url":"https://api.github.com/repos/gatsbyjs/gatsby/labels/status:%20WIP","name":"status: WIP","color":"daf282","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/gatsbyjs/gatsby/pulls/17519/commits","review_comments_url":"https://api.github.com/repos/gatsbyjs/gatsby/pulls/17519/comments","review_comment_url":"https://api.github.com/repos/gatsbyjs/gatsby/pulls/comments{/number}","comments_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/17519/comments","statuses_url":"https://api.github.com/repos/gatsbyjs/gatsby/statuses/f3fd99e1bed547890f0a3aee2c3dacb112f8f4d7","head":{"label":"gatsbyjs:fix/gatsby-source-filesystem-promise","ref":"fix/gatsby-source-filesystem-promise","sha":"f3fd99e1bed547890f0a3aee2c3dacb112f8f4d7","user":{"login":"gatsbyjs","id":12551863,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNTUxODYz","avatar_url":"https://avatars1.githubusercontent.com/u/12551863?v=4","gravatar_id":"","url":"https://api.github.com/users/gatsbyjs","html_url":"https://github.com/gatsbyjs","followers_url":"https://api.github.com/users/gatsbyjs/followers","following_url":"https://api.github.com/users/gatsbyjs/following{/other_user}","gists_url":"https://api.github.com/users/gatsbyjs/gists{/gist_id}","starred_url":"https://api.github.com/users/gatsbyjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gatsbyjs/subscriptions","organizations_url":"https://api.github.com/users/gatsbyjs/orgs","repos_url":"https://api.github.com/users/gatsbyjs/repos","events_url":"https://api.github.com/users/gatsbyjs/events{/privacy}","received_events_url":"https://api.github.com/users/gatsbyjs/received_events","type":"Organization","site_admin":false},"repo":{"id":36040894,"node_id":"MDEwOlJlcG9zaXRvcnkzNjA0MDg5NA==","name":"gatsby","full_name":"gatsbyjs/gatsby","private":false,"owner":{"login":"gatsbyjs","id":12551863,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNTUxODYz","avatar_url":"https://avatars1.githubusercontent.com/u/12551863?v=4","gravatar_id":"","url":"https://api.github.com/users/gatsbyjs","html_url":"https://github.com/gatsbyjs","followers_url":"https://api.github.com/users/gatsbyjs/followers","following_url":"https://api.github.com/users/gatsbyjs/following{/other_user}","gists_url":"https://api.github.com/users/gatsbyjs/gists{/gist_id}","starred_url":"https://api.github.com/users/gatsbyjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gatsbyjs/subscriptions","organizations_url":"https://api.github.com/users/gatsbyjs/orgs","repos_url":"https://api.github.com/users/gatsbyjs/repos","events_url":"https://api.github.com/users/gatsbyjs/events{/privacy}","received_events_url":"https://api.github.com/users/gatsbyjs/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/gatsbyjs/gatsby","description":"Build blazing fast, modern apps and websites with React","fork":false,"url":"https://api.github.com/repos/gatsbyjs/gatsby","forks_url":"https://api.github.com/repos/gatsbyjs/gatsby/forks","keys_url":"https://api.github.com/repos/gatsbyjs/gatsby/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gatsbyjs/gatsby/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gatsbyjs/gatsby/teams","hooks_url":"https://api.github.com/repos/gatsbyjs/gatsby/hooks","issue_events_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/events{/number}","events_url":"https://api.github.com/repos/gatsbyjs/gatsby/events","assignees_url":"https://api.github.com/repos/gatsbyjs/gatsby/assignees{/user}","branches_url":"https://api.github.com/repos/gatsbyjs/gatsby/branches{/branch}","tags_url":"https://api.github.com/repos/gatsbyjs/gatsby/tags","blobs_url":"https://api.github.com/repos/gatsbyjs/gatsby/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gatsbyjs/gatsby/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gatsbyjs/gatsby/git/refs{/sha}","trees_url":"https://api.github.com/repos/gatsbyjs/gatsby/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gatsbyjs/gatsby/statuses/{sha}","languages_url":"https://api.github.com/repos/gatsbyjs/gatsby/languages","stargazers_url":"https://api.github.com/repos/gatsbyjs/gatsby/stargazers","contributors_url":"https://api.github.com/repos/gatsbyjs/gatsby/contributors","subscribers_url":"https://api.github.com/repos/gatsbyjs/gatsby/subscribers","subscription_url":"https://api.github.com/repos/gatsbyjs/gatsby/subscription","commits_url":"https://api.github.com/repos/gatsbyjs/gatsby/commits{/sha}","git_commits_url":"https://api.github.com/repos/gatsbyjs/gatsby/git/commits{/sha}","comments_url":"https://api.github.com/repos/gatsbyjs/gatsby/comments{/number}","issue_comment_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/comments{/number}","contents_url":"https://api.github.com/repos/gatsbyjs/gatsby/contents/{+path}","compare_url":"https://api.github.com/repos/gatsbyjs/gatsby/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gatsbyjs/gatsby/merges","archive_url":"https://api.github.com/repos/gatsbyjs/gatsby/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gatsbyjs/gatsby/downloads","issues_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues{/number}","pulls_url":"https://api.github.com/repos/gatsbyjs/gatsby/pulls{/number}","milestones_url":"https://api.github.com/repos/gatsbyjs/gatsby/milestones{/number}","notifications_url":"https://api.github.com/repos/gatsbyjs/gatsby/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gatsbyjs/gatsby/labels{/name}","releases_url":"https://api.github.com/repos/gatsbyjs/gatsby/releases{/id}","deployments_url":"https://api.github.com/repos/gatsbyjs/gatsby/deployments","created_at":"2015-05-21T22:43:05Z","updated_at":"2019-09-09T20:59:21Z","pushed_at":"2019-09-09T21:24:29Z","git_url":"git://github.com/gatsbyjs/gatsby.git","ssh_url":"git@github.com:gatsbyjs/gatsby.git","clone_url":"https://github.com/gatsbyjs/gatsby.git","svn_url":"https://github.com/gatsbyjs/gatsby","homepage":"https://www.gatsbyjs.org","size":636546,"stargazers_count":37946,"watchers_count":37946,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5947,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":609,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":5947,"open_issues":609,"watchers":37946,"default_branch":"master"}},"base":{"label":"gatsbyjs:master","ref":"master","sha":"8562e93c9d413b2660a40aaad34fb10b33d98921","user":{"login":"gatsbyjs","id":12551863,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNTUxODYz","avatar_url":"https://avatars1.githubusercontent.com/u/12551863?v=4","gravatar_id":"","url":"https://api.github.com/users/gatsbyjs","html_url":"https://github.com/gatsbyjs","followers_url":"https://api.github.com/users/gatsbyjs/followers","following_url":"https://api.github.com/users/gatsbyjs/following{/other_user}","gists_url":"https://api.github.com/users/gatsbyjs/gists{/gist_id}","starred_url":"https://api.github.com/users/gatsbyjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gatsbyjs/subscriptions","organizations_url":"https://api.github.com/users/gatsbyjs/orgs","repos_url":"https://api.github.com/users/gatsbyjs/repos","events_url":"https://api.github.com/users/gatsbyjs/events{/privacy}","received_events_url":"https://api.github.com/users/gatsbyjs/received_events","type":"Organization","site_admin":false},"repo":{"id":36040894,"node_id":"MDEwOlJlcG9zaXRvcnkzNjA0MDg5NA==","name":"gatsby","full_name":"gatsbyjs/gatsby","private":false,"owner":{"login":"gatsbyjs","id":12551863,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyNTUxODYz","avatar_url":"https://avatars1.githubusercontent.com/u/12551863?v=4","gravatar_id":"","url":"https://api.github.com/users/gatsbyjs","html_url":"https://github.com/gatsbyjs","followers_url":"https://api.github.com/users/gatsbyjs/followers","following_url":"https://api.github.com/users/gatsbyjs/following{/other_user}","gists_url":"https://api.github.com/users/gatsbyjs/gists{/gist_id}","starred_url":"https://api.github.com/users/gatsbyjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gatsbyjs/subscriptions","organizations_url":"https://api.github.com/users/gatsbyjs/orgs","repos_url":"https://api.github.com/users/gatsbyjs/repos","events_url":"https://api.github.com/users/gatsbyjs/events{/privacy}","received_events_url":"https://api.github.com/users/gatsbyjs/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/gatsbyjs/gatsby","description":"Build blazing fast, modern apps and websites with React","fork":false,"url":"https://api.github.com/repos/gatsbyjs/gatsby","forks_url":"https://api.github.com/repos/gatsbyjs/gatsby/forks","keys_url":"https://api.github.com/repos/gatsbyjs/gatsby/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gatsbyjs/gatsby/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gatsbyjs/gatsby/teams","hooks_url":"https://api.github.com/repos/gatsbyjs/gatsby/hooks","issue_events_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/events{/number}","events_url":"https://api.github.com/repos/gatsbyjs/gatsby/events","assignees_url":"https://api.github.com/repos/gatsbyjs/gatsby/assignees{/user}","branches_url":"https://api.github.com/repos/gatsbyjs/gatsby/branches{/branch}","tags_url":"https://api.github.com/repos/gatsbyjs/gatsby/tags","blobs_url":"https://api.github.com/repos/gatsbyjs/gatsby/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gatsbyjs/gatsby/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gatsbyjs/gatsby/git/refs{/sha}","trees_url":"https://api.github.com/repos/gatsbyjs/gatsby/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gatsbyjs/gatsby/statuses/{sha}","languages_url":"https://api.github.com/repos/gatsbyjs/gatsby/languages","stargazers_url":"https://api.github.com/repos/gatsbyjs/gatsby/stargazers","contributors_url":"https://api.github.com/repos/gatsbyjs/gatsby/contributors","subscribers_url":"https://api.github.com/repos/gatsbyjs/gatsby/subscribers","subscription_url":"https://api.github.com/repos/gatsbyjs/gatsby/subscription","commits_url":"https://api.github.com/repos/gatsbyjs/gatsby/commits{/sha}","git_commits_url":"https://api.github.com/repos/gatsbyjs/gatsby/git/commits{/sha}","comments_url":"https://api.github.com/repos/gatsbyjs/gatsby/comments{/number}","issue_comment_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues/comments{/number}","contents_url":"https://api.github.com/repos/gatsbyjs/gatsby/contents/{+path}","compare_url":"https://api.github.com/repos/gatsbyjs/gatsby/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gatsbyjs/gatsby/merges","archive_url":"https://api.github.com/repos/gatsbyjs/gatsby/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gatsbyjs/gatsby/downloads","issues_url":"https://api.github.com/repos/gatsbyjs/gatsby/issues{/number}","pulls_url":"https://api.github.com/repos/gatsbyjs/gatsby/pulls{/number}","milestones_url":"https://api.github.com/repos/gatsbyjs/gatsby/milestones{/number}","notifications_url":"https://api.github.com/repos/gatsbyjs/gatsby/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gatsbyjs/gatsby/labels{/name}","releases_url":"https://api.github.com/repos/gatsbyjs/gatsby/releases{/id}","deployments_url":"https://api.github.com/repos/gatsbyjs/gatsby/deployments","created_at":"2015-05-21T22:43:05Z","updated_at":"2019-09-09T20:59:21Z","pushed_at":"2019-09-09T21:24:29Z","git_url":"git://github.com/gatsbyjs/gatsby.git","ssh_url":"git@github.com:gatsbyjs/gatsby.git","clone_url":"https://github.com/gatsbyjs/gatsby.git","svn_url":"https://github.com/gatsbyjs/gatsby","homepage":"https://www.gatsbyjs.org","size":636546,"stargazers_count":37946,"watchers_count":37946,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":5947,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":609,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":5947,"open_issues":609,"watchers":37946,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/gatsbyjs/gatsby/pulls/17519"},"html":{"href":"https://github.com/gatsbyjs/gatsby/pull/17519"},"issue":{"href":"https://api.github.com/repos/gatsbyjs/gatsby/issues/17519"},"comments":{"href":"https://api.github.com/repos/gatsbyjs/gatsby/issues/17519/comments"},"review_comments":{"href":"https://api.github.com/repos/gatsbyjs/gatsby/pulls/17519/comments"},"review_comment":{"href":"https://api.github.com/repos/gatsbyjs/gatsby/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/gatsbyjs/gatsby/pulls/17519/commits"},"statuses":{"href":"https://api.github.com/repos/gatsbyjs/gatsby/statuses/f3fd99e1bed547890f0a3aee2c3dacb112f8f4d7"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":34,"deletions":10,"changed_files":1}}
{"actor":{"display_login":"Andarist"}}