{"action":"opened","number":17134,"pull_request":{"url":"https://api.github.com/repos/ampproject/amphtml/pulls/17134","id":204241303,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA0MjQxMzAz","html_url":"https://github.com/ampproject/amphtml/pull/17134","diff_url":"https://github.com/ampproject/amphtml/pull/17134.diff","patch_url":"https://github.com/ampproject/amphtml/pull/17134.patch","issue_url":"https://api.github.com/repos/ampproject/amphtml/issues/17134","number":17134,"state":"open","locked":false,"title":"🐛 Fixing store and request services race conditions.","user":{"login":"gmajoulet","id":1492044,"node_id":"MDQ6VXNlcjE0OTIwNDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1492044?v=4","gravatar_id":"","url":"https://api.github.com/users/gmajoulet","html_url":"https://github.com/gmajoulet","followers_url":"https://api.github.com/users/gmajoulet/followers","following_url":"https://api.github.com/users/gmajoulet/following{/other_user}","gists_url":"https://api.github.com/users/gmajoulet/gists{/gist_id}","starred_url":"https://api.github.com/users/gmajoulet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmajoulet/subscriptions","organizations_url":"https://api.github.com/users/gmajoulet/orgs","repos_url":"https://api.github.com/users/gmajoulet/repos","events_url":"https://api.github.com/users/gmajoulet/events{/privacy}","received_events_url":"https://api.github.com/users/gmajoulet/received_events","type":"User","site_admin":false},"body":"Both the story store and the request service are instantiated from the `amp-story` file, but runtime might instantiate other custom elements before the story itself. Which could result in the services being not declared, and trigger errors completely breaking the story.\r\n\r\n- New util methods to retrieve the service synchronously (we could use Promises to retrieve services but a synchronous approach allows easier implementations)\r\n- First element to retrieve the service instantiates it\r\n- Request service is only instantiated when needed to load the bookend config, and not on story construct\r\n- Bookend's ScrollableShareWidget is built only when building the whole bookend\r\n\r\nFixes #17042","created_at":"2018-07-26T19:20:02Z","updated_at":"2018-07-26T19:20:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ampproject/amphtml/pulls/17134/commits","review_comments_url":"https://api.github.com/repos/ampproject/amphtml/pulls/17134/comments","review_comment_url":"https://api.github.com/repos/ampproject/amphtml/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ampproject/amphtml/issues/17134/comments","statuses_url":"https://api.github.com/repos/ampproject/amphtml/statuses/518771cfebb9c3f9090d891c2cea030224569d0d","head":{"label":"gmajoulet:store_service_register_race_conditions","ref":"store_service_register_race_conditions","sha":"518771cfebb9c3f9090d891c2cea030224569d0d","user":{"login":"gmajoulet","id":1492044,"node_id":"MDQ6VXNlcjE0OTIwNDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1492044?v=4","gravatar_id":"","url":"https://api.github.com/users/gmajoulet","html_url":"https://github.com/gmajoulet","followers_url":"https://api.github.com/users/gmajoulet/followers","following_url":"https://api.github.com/users/gmajoulet/following{/other_user}","gists_url":"https://api.github.com/users/gmajoulet/gists{/gist_id}","starred_url":"https://api.github.com/users/gmajoulet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmajoulet/subscriptions","organizations_url":"https://api.github.com/users/gmajoulet/orgs","repos_url":"https://api.github.com/users/gmajoulet/repos","events_url":"https://api.github.com/users/gmajoulet/events{/privacy}","received_events_url":"https://api.github.com/users/gmajoulet/received_events","type":"User","site_admin":false},"repo":{"id":116157484,"node_id":"MDEwOlJlcG9zaXRvcnkxMTYxNTc0ODQ=","name":"amphtml","full_name":"gmajoulet/amphtml","owner":{"login":"gmajoulet","id":1492044,"node_id":"MDQ6VXNlcjE0OTIwNDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/1492044?v=4","gravatar_id":"","url":"https://api.github.com/users/gmajoulet","html_url":"https://github.com/gmajoulet","followers_url":"https://api.github.com/users/gmajoulet/followers","following_url":"https://api.github.com/users/gmajoulet/following{/other_user}","gists_url":"https://api.github.com/users/gmajoulet/gists{/gist_id}","starred_url":"https://api.github.com/users/gmajoulet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gmajoulet/subscriptions","organizations_url":"https://api.github.com/users/gmajoulet/orgs","repos_url":"https://api.github.com/users/gmajoulet/repos","events_url":"https://api.github.com/users/gmajoulet/events{/privacy}","received_events_url":"https://api.github.com/users/gmajoulet/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gmajoulet/amphtml","description":"AMP HTML source code, samples, and documentation.  See below for more info.","fork":true,"url":"https://api.github.com/repos/gmajoulet/amphtml","forks_url":"https://api.github.com/repos/gmajoulet/amphtml/forks","keys_url":"https://api.github.com/repos/gmajoulet/amphtml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gmajoulet/amphtml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gmajoulet/amphtml/teams","hooks_url":"https://api.github.com/repos/gmajoulet/amphtml/hooks","issue_events_url":"https://api.github.com/repos/gmajoulet/amphtml/issues/events{/number}","events_url":"https://api.github.com/repos/gmajoulet/amphtml/events","assignees_url":"https://api.github.com/repos/gmajoulet/amphtml/assignees{/user}","branches_url":"https://api.github.com/repos/gmajoulet/amphtml/branches{/branch}","tags_url":"https://api.github.com/repos/gmajoulet/amphtml/tags","blobs_url":"https://api.github.com/repos/gmajoulet/amphtml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gmajoulet/amphtml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gmajoulet/amphtml/git/refs{/sha}","trees_url":"https://api.github.com/repos/gmajoulet/amphtml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gmajoulet/amphtml/statuses/{sha}","languages_url":"https://api.github.com/repos/gmajoulet/amphtml/languages","stargazers_url":"https://api.github.com/repos/gmajoulet/amphtml/stargazers","contributors_url":"https://api.github.com/repos/gmajoulet/amphtml/contributors","subscribers_url":"https://api.github.com/repos/gmajoulet/amphtml/subscribers","subscription_url":"https://api.github.com/repos/gmajoulet/amphtml/subscription","commits_url":"https://api.github.com/repos/gmajoulet/amphtml/commits{/sha}","git_commits_url":"https://api.github.com/repos/gmajoulet/amphtml/git/commits{/sha}","comments_url":"https://api.github.com/repos/gmajoulet/amphtml/comments{/number}","issue_comment_url":"https://api.github.com/repos/gmajoulet/amphtml/issues/comments{/number}","contents_url":"https://api.github.com/repos/gmajoulet/amphtml/contents/{+path}","compare_url":"https://api.github.com/repos/gmajoulet/amphtml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gmajoulet/amphtml/merges","archive_url":"https://api.github.com/repos/gmajoulet/amphtml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gmajoulet/amphtml/downloads","issues_url":"https://api.github.com/repos/gmajoulet/amphtml/issues{/number}","pulls_url":"https://api.github.com/repos/gmajoulet/amphtml/pulls{/number}","milestones_url":"https://api.github.com/repos/gmajoulet/amphtml/milestones{/number}","notifications_url":"https://api.github.com/repos/gmajoulet/amphtml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gmajoulet/amphtml/labels{/name}","releases_url":"https://api.github.com/repos/gmajoulet/amphtml/releases{/id}","deployments_url":"https://api.github.com/repos/gmajoulet/amphtml/deployments","created_at":"2018-01-03T16:19:49Z","updated_at":"2018-07-24T22:03:10Z","pushed_at":"2018-07-26T19:06:45Z","git_url":"git://github.com/gmajoulet/amphtml.git","ssh_url":"git@github.com:gmajoulet/amphtml.git","clone_url":"https://github.com/gmajoulet/amphtml.git","svn_url":"https://github.com/gmajoulet/amphtml","homepage":"https://www.ampproject.org","size":493862,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ampproject:master","ref":"master","sha":"d3dd1cc157cdcae8d50e69a4e575f67376aee150","user":{"login":"ampproject","id":14114390,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTE0Mzkw","avatar_url":"https://avatars3.githubusercontent.com/u/14114390?v=4","gravatar_id":"","url":"https://api.github.com/users/ampproject","html_url":"https://github.com/ampproject","followers_url":"https://api.github.com/users/ampproject/followers","following_url":"https://api.github.com/users/ampproject/following{/other_user}","gists_url":"https://api.github.com/users/ampproject/gists{/gist_id}","starred_url":"https://api.github.com/users/ampproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ampproject/subscriptions","organizations_url":"https://api.github.com/users/ampproject/orgs","repos_url":"https://api.github.com/users/ampproject/repos","events_url":"https://api.github.com/users/ampproject/events{/privacy}","received_events_url":"https://api.github.com/users/ampproject/received_events","type":"Organization","site_admin":false},"repo":{"id":41766002,"node_id":"MDEwOlJlcG9zaXRvcnk0MTc2NjAwMg==","name":"amphtml","full_name":"ampproject/amphtml","owner":{"login":"ampproject","id":14114390,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTE0Mzkw","avatar_url":"https://avatars3.githubusercontent.com/u/14114390?v=4","gravatar_id":"","url":"https://api.github.com/users/ampproject","html_url":"https://github.com/ampproject","followers_url":"https://api.github.com/users/ampproject/followers","following_url":"https://api.github.com/users/ampproject/following{/other_user}","gists_url":"https://api.github.com/users/ampproject/gists{/gist_id}","starred_url":"https://api.github.com/users/ampproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ampproject/subscriptions","organizations_url":"https://api.github.com/users/ampproject/orgs","repos_url":"https://api.github.com/users/ampproject/repos","events_url":"https://api.github.com/users/ampproject/events{/privacy}","received_events_url":"https://api.github.com/users/ampproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ampproject/amphtml","description":"AMP HTML source code, samples, and documentation.  See below for more info.","fork":false,"url":"https://api.github.com/repos/ampproject/amphtml","forks_url":"https://api.github.com/repos/ampproject/amphtml/forks","keys_url":"https://api.github.com/repos/ampproject/amphtml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ampproject/amphtml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ampproject/amphtml/teams","hooks_url":"https://api.github.com/repos/ampproject/amphtml/hooks","issue_events_url":"https://api.github.com/repos/ampproject/amphtml/issues/events{/number}","events_url":"https://api.github.com/repos/ampproject/amphtml/events","assignees_url":"https://api.github.com/repos/ampproject/amphtml/assignees{/user}","branches_url":"https://api.github.com/repos/ampproject/amphtml/branches{/branch}","tags_url":"https://api.github.com/repos/ampproject/amphtml/tags","blobs_url":"https://api.github.com/repos/ampproject/amphtml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ampproject/amphtml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ampproject/amphtml/git/refs{/sha}","trees_url":"https://api.github.com/repos/ampproject/amphtml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ampproject/amphtml/statuses/{sha}","languages_url":"https://api.github.com/repos/ampproject/amphtml/languages","stargazers_url":"https://api.github.com/repos/ampproject/amphtml/stargazers","contributors_url":"https://api.github.com/repos/ampproject/amphtml/contributors","subscribers_url":"https://api.github.com/repos/ampproject/amphtml/subscribers","subscription_url":"https://api.github.com/repos/ampproject/amphtml/subscription","commits_url":"https://api.github.com/repos/ampproject/amphtml/commits{/sha}","git_commits_url":"https://api.github.com/repos/ampproject/amphtml/git/commits{/sha}","comments_url":"https://api.github.com/repos/ampproject/amphtml/comments{/number}","issue_comment_url":"https://api.github.com/repos/ampproject/amphtml/issues/comments{/number}","contents_url":"https://api.github.com/repos/ampproject/amphtml/contents/{+path}","compare_url":"https://api.github.com/repos/ampproject/amphtml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ampproject/amphtml/merges","archive_url":"https://api.github.com/repos/ampproject/amphtml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ampproject/amphtml/downloads","issues_url":"https://api.github.com/repos/ampproject/amphtml/issues{/number}","pulls_url":"https://api.github.com/repos/ampproject/amphtml/pulls{/number}","milestones_url":"https://api.github.com/repos/ampproject/amphtml/milestones{/number}","notifications_url":"https://api.github.com/repos/ampproject/amphtml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ampproject/amphtml/labels{/name}","releases_url":"https://api.github.com/repos/ampproject/amphtml/releases{/id}","deployments_url":"https://api.github.com/repos/ampproject/amphtml/deployments","created_at":"2015-09-01T22:10:53Z","updated_at":"2018-07-26T18:36:59Z","pushed_at":"2018-07-26T19:17:18Z","git_url":"git://github.com/ampproject/amphtml.git","ssh_url":"git@github.com:ampproject/amphtml.git","clone_url":"https://github.com/ampproject/amphtml.git","svn_url":"https://github.com/ampproject/amphtml","homepage":"https://www.ampproject.org","size":493291,"stargazers_count":11795,"watchers_count":11795,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":2501,"mirror_url":null,"archived":false,"open_issues_count":1327,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":2501,"open_issues":1327,"watchers":11795,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/17134"},"html":{"href":"https://github.com/ampproject/amphtml/pull/17134"},"issue":{"href":"https://api.github.com/repos/ampproject/amphtml/issues/17134"},"comments":{"href":"https://api.github.com/repos/ampproject/amphtml/issues/17134/comments"},"review_comments":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/17134/comments"},"review_comment":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ampproject/amphtml/pulls/17134/commits"},"statuses":{"href":"https://api.github.com/repos/ampproject/amphtml/statuses/518771cfebb9c3f9090d891c2cea030224569d0d"}},"author_association":"COLLABORATOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":169,"deletions":100,"changed_files":20}}
{"actor":{"display_login":"gmajoulet"}}