Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subscriptions: fixing fallback after local platform failure #18363

Merged
merged 4 commits into from Sep 27, 2018

Conversation

prateekbh
Copy link
Member

  • Shifts resolution of fallback entitlement right after local platform fails

@jpettitt
Copy link
Contributor

Can you add a test for the case where non-local fails to make sure it doesn't use fallback.

@@ -468,18 +468,17 @@ export class PlatformStore {
* @param {string} serviceId
*/
reportPlatformFailure(serviceId) {
if (this.failedPlatforms_.indexOf(serviceId) == -1) {
if (serviceId === this.getLocalPlatform().getServiceId()
&& this.fallbackEntitlement_) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would happen if the fallbackEntitlement is successful, but other services have not finished yet? Will we execute the "local" renderer and send "local" pingback even though some other services might return with an actual positive response? Or does "renderer" and "pingback" wait for other services anyway?

Copy link
Member Author

@prateekbh prateekbh Sep 25, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well in theory its just filling local with a proxied Entitlement and doesn't change anything with selectPlatform flow. But will check and see if we have a test for that

@prateekbh
Copy link
Member Author

@dvoytenko @jpettitt it indeed unblocks in favor of local always, not merging this right now.
Working on a better fix

@prateekbh prateekbh merged commit dff4d82 into ampproject:master Sep 27, 2018
@prateekbh prateekbh deleted the subscriptions-fallback-fix branch September 27, 2018 23:17
torch2424 pushed a commit to torch2424/amphtml that referenced this pull request Oct 10, 2018
…ct#18363)

* fixing fallback on local platform only

* adding negation test

* adding more verbose test

* fixing lint
Enriqe pushed a commit to Enriqe/amphtml that referenced this pull request Nov 28, 2018
…ct#18363)

* fixing fallback on local platform only

* adding negation test

* adding more verbose test

* fixing lint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants