Page MenuHomePhabricator

TFA missing from MCS response
Closed, ResolvedPublic

Description

In the last 7 days, there have been over 6000 instances where the MCS result for the feed did not contain the TFA portion in the body. A sample log entry:

TypeError: Cannot set property 'thumbnail' of undefined
    at P.join.then (/srv/deployment/restbase/deploy-cache/revs/44e09555bc88aca274384cddaa267a25deabfc97/restbase/v1/feed.js:95:50)
    at tryCatcher (/srv/deployment/restbase/deploy-cache/revs/44e09555bc88aca274384cddaa267a25deabfc97/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/srv/deployment/restbase/deploy-cache/revs/44e09555bc88aca274384cddaa267a25deabfc97/node_modules/bluebird/js/release/promise.js:512:31)
    at Promise._settlePromise (/srv/deployment/restbase/deploy-cache/revs/44e09555bc88aca274384cddaa267a25deabfc97/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._settlePromise0 (/srv/deployment/restbase/deploy-cache/revs/44e09555bc88aca274384cddaa267a25deabfc97/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise._settlePromises (/srv/deployment/restbase/deploy-cache/revs/44e09555bc88aca274384cddaa267a25deabfc97/node_modules/bluebird/js/release/promise.js:694:18)
    at Promise._fulfill (/srv/deployment/restbase/deploy-cache/revs/44e09555bc88aca274384cddaa267a25deabfc97/node_modules/bluebird/js/release/promise.js:638:18)
    at PromiseArray._resolve (/srv/deployment/restbase/deploy-cache/revs/44e09555bc88aca274384cddaa267a25deabfc97/node_modules/bluebird/js/release/promise_array.js:126:19)
    at PromiseArray._promiseFulfilled (/srv/deployment/restbase/deploy-cache/revs/44e09555bc88aca274384cddaa267a25deabfc97/node_modules/bluebird/js/release/promise_array.js:144:14)
    at Promise._settlePromise (/srv/deployment/restbase/deploy-cache/revs/44e09555bc88aca274384cddaa267a25deabfc97/node_modules/bluebird/js/release/promise.js:574:26)
    at Promise._settlePromise0 (/srv/deployment/restbase/deploy-cache/revs/44e09555bc88aca274384cddaa267a25deabfc97/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise._settlePromises (/srv/deployment/restbase/deploy-cache/revs/44e09555bc88aca274384cddaa267a25deabfc97/node_modules/bluebird/js/release/promise.js:694:18)
    at Promise._fulfill (/srv/deployment/restbase/deploy-cache/revs/44e09555bc88aca274384cddaa267a25deabfc97/node_modules/bluebird/js/release/promise.js:638:18)
    at Promise._resolveCallback (/srv/deployment/restbase/deploy-cache/revs/44e09555bc88aca274384cddaa267a25deabfc97/node_modules/bluebird/js/release/promise.js:432:57)
    at Promise._settlePromiseFromHandler (/srv/deployment/restbase/deploy-cache/revs/44e09555bc88aca274384cddaa267a25deabfc97/node_modules/bluebird/js/release/promise.js:524:17)
    at Promise._settlePromise (/srv/deployment/restbase/deploy-cache/revs/44e09555bc88aca274384cddaa267a25deabfc97/node_modules/bluebird/js/release/promise.js:569:18)

Open questions:

  • Does the Android app expect TFA to be present in the response?
  • Is not having the TFA in the response legitimate?

Event Timeline

mobrovac created this task.

Since this happens quite a lot (~1300 failed requests in the last 24h), I am assuming the answer to the first question in the task description is yes and will move forward on PR #1088 which ensures result[0].body.tfa exists.

Stashbot subscribed.

Mentioned in SAL (#wikimedia-operations) [2018-12-13T11:31:52Z] <mobrovac@deploy1001> Started deploy [restbase/deploy@29a0902]: Remove restbase200[1-6] and ensure body.tfa exists for feed responses - T211070 T211871

Mentioned in SAL (#wikimedia-operations) [2018-12-13T11:39:00Z] <mobrovac@deploy1001> Finished deploy [restbase/deploy@29a0902]: Remove restbase200[1-6] and ensure body.tfa exists for feed responses - T211070 T211871 (duration: 07m 08s)

Mentioned in SAL (#wikimedia-operations) [2018-12-13T11:39:18Z] <mobrovac@deploy1001> Started deploy [restbase/deploy@29a0902]: Remove restbase200[1-6] and ensure body.tfa exists for feed responses - T211070 T211871

Mentioned in SAL (#wikimedia-operations) [2018-12-13T11:45:26Z] <mobrovac@deploy1001> Finished deploy [restbase/deploy@29a0902]: Remove restbase200[1-6] and ensure body.tfa exists for feed responses - T211070 T211871 (duration: 06m 08s)

Mentioned in SAL (#wikimedia-operations) [2018-12-13T11:53:49Z] <mobrovac@deploy1001> Started deploy [restbase/deploy@55fcd4b]: Remove restbase200[1-6], ensure body.tfa exists for feed responses and disable Citoid check - T211070 T211871 T211411

Mentioned in SAL (#wikimedia-operations) [2018-12-13T12:12:47Z] <mobrovac@deploy1001> Finished deploy [restbase/deploy@55fcd4b]: Remove restbase200[1-6], ensure body.tfa exists for feed responses and disable Citoid check - T211070 T211871 T211411 (duration: 18m 59s)

Open questions:

  • Does the Android app expect TFA to be present in the response?

Yes, for supported languages, but I believe the app gracefully handles both missing feed response properties and malformed properties (ping @Dbrant to verify).

  • Is not having the TFA in the response legitimate?

See above.

I'm confused about what's really going on here, though. Won't MCS necessarily have responded with a well-formed tfa property to reach this point due to the check on https://github.com/wikimedia/restbase/blob/master/v1/feed.js#L72? Could something be going wrong in the intervening _hydrateResponse?

I'm confused about what's really going on here, though. Won't MCS necessarily have responded with a well-formed tfa property to reach this point due to the check on https://github.com/wikimedia/restbase/blob/master/v1/feed.js#L72? Could something be going wrong in the intervening _hydrateResponse?

Indeed. _hydrateResponse would delete the property if it could not fetch the summary for the article for some reason and it fetches it from RESTBase. We have been experiencing some latency penalties and elevated error rates due to cluster reshaping, maybe that's the cause.