Page MenuHomePhabricator

Session & SchemeHandler improvements to prepare for mobile-html
Closed, ResolvedPublic

Description

  • Bring over updated Session & SchemeHandler from the lite project
  • Fix task tracking and cancellation relationship between Fetcher and Session
  • Update ArticleSummary handling to utilize Codable instead of an arbitrary dictionary, move summary fetching out of Session
  • Remove WMFArticlePreviewFetcher

In the work on https://github.com/wikimedia/wikipedia-ios/pull/2949 @NHarateh_WMF found an issue where Session could call the completion for a task before it was tracked by Fetcher.

This should be discussed and refactored early in 6.3.

One possibility would be to move the task tracking and cancellation logic into Session and prevent it from returning URLSessionTasks. This would clean up the abstraction. Session could take an optional cancellationKey as a parameter to allow Fetchers to link multiple requests together under a single cancellation key. Fetchers would be responsible for keeping track of cancellation keys for requests they have in flight and passing those along to an interface on Session for cancellation.

Related Objects

Event Timeline

JoeWalsh triaged this task as Medium priority.Mar 1 2019, 2:54 PM
JoeWalsh renamed this task from Fix task tracking and cancellation relationship between `Fetcher` and `Session` to Session & SchemeHandler improvements to prepare for mobile-html.Mar 12 2019, 6:40 PM
JoeWalsh updated the task description. (Show Details)

WIP of the summary changes on the summary_as_codable branch - feel free to pick up that branch and continue the rest of the work from there [edit] that branch is merged, crossed off the relevant items in the list above

JMinor lowered the priority of this task from Medium to Low.May 16 2019, 8:30 PM