Page MenuHomePhabricator

Flow ApiFlowModerateTopicTest::testModerateTopic() assumes ApiResult will pass through arbitrary objects
Closed, ResolvedPublic

Description

This is causing unit test failures in Gerrit change 182858, which among other things is making the API behave more sensibly when passed objects.

Discussion on IRC with @EBernhardson suggested two possibilities:

  • Flow could just do the appropriate conversion before passing its UUID into ApiResult
  • Some sort of "ApiSerializable" interface, like PHP's JsonSerializable. This has been added to Gerrit change 182858 in PS17, but would still need implementation by Flow in its UUID class and conditional handling in its unit test until that change is merged.

Event Timeline

Anomie raised the priority of this task from to Needs Triage.
Anomie updated the task description. (Show Details)
Anomie added a project: StructuredDiscussions.
Anomie added subscribers: Anomie, EBernhardson.
EBernhardson set Security to None.

Change 193010 had a related patch set uploaded (by EBernhardson):
Pre-support for ApiSerializable interface

https://gerrit.wikimedia.org/r/193010

Change 193011 had a related patch set uploaded (by EBernhardson):
Support the ApiSerializable interface

https://gerrit.wikimedia.org/r/193011

Change 193013 had a related patch set uploaded (by EBernhardson):
Don't put serialized uuid's into the logging table

https://gerrit.wikimedia.org/r/193013

Change 193013 merged by jenkins-bot:
Don't put serialized uuid's into the logging table

https://gerrit.wikimedia.org/r/193013

Change 193010 merged by jenkins-bot:
Pre-support for ApiSerializable interface

https://gerrit.wikimedia.org/r/193010

Change 193011 merged by jenkins-bot:
Support the ApiSerializable interface

https://gerrit.wikimedia.org/r/193011