Page MenuHomePhabricator

ChangeOps should have a separate function for validation.
Closed, ResolvedPublic

Description

ChangeOps should perform validation against a target entity separately from the apply() method, in validate() method.

The rationale is:

  1. when applying a batch of ChangeOps, we want to be able to validate all before applying any.
  1. for some batch operations like merging, we don't want to apply validation, since we are dealing with "status quo" data, and we shouldn't fail if that status quo does not conform to soft constraints (hard constraints should and will of course still be enforced).

Version: unspecified
Severity: normal
Whiteboard: u=dev c=backend p=5 s=2014-05-06
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=65215

Details

Reference
bz64309

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 3:13 AM
bzimport set Reference to bz64309.
bzimport added a subscriber: Unknown Object (MLST).

Change 129244 had a related patch set uploaded by Daniel Kinzler:
(bug 64309) Introducing ChangeOp::validate

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