HomePhabricator

Update question archive/visibility status via API
425c4856e3edUnpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.
This commit no longer exists in the repository. It may have been part of a branch which was deleted.This commit has been deleted in the repository: it is no longer reachable from any branch, tag, or ref.

Description

Update question archive/visibility status via API

Before, we relied on a DeferredUpdate in SpecialHomepage::execute to make
changes to question records stored in the user's preference.
TransactionProfiler is not happy about this as it's a write on a GET.

This patch:

  • switches ApiQuestionStore to require a POST
  • loads the questions as they are stored in the prefs (without checking for updated status, or writing any updates) on GET
  • adds two POST requests at Homepage.js which will load and update questions

Because loadAndUpdateQuestions() takes about ~150ms on a homepage with six
questions, and isRevisionVisible() accounts for ~60ms, I opted to not do any
checks on the initial GET.

Bug: T222124
Change-Id: I21a485c75c6a7ff90985c3b3467907de5cde21a8

Details

Provenance
kostajhAuthored on May 1 2019, 8:31 PM
ChangeId
I21a485c75c6a7ff90985c3b3467907de5cde21a8

Commit No Longer Exists

This commit no longer exists in the repository.