Page MenuHomePhabricator

Add baserevid to wbleditformelements API module
Closed, ResolvedPublic

Description

See parent

Event Timeline

Change 520725 had a related patch set uploaded (by Ladsgroup; owner: Ladsgroup):
[mediawiki/extensions/WikibaseLexeme@master] Add baserevid to wbleditformelements API module

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

So we have an issue here. Browser tests fail because they add a form and then immediately try to edit it. The baserevid sent doesn't contain any form so the system can't apply the form change op (or build it) and definitely can't do a proper patching or diffing or anything whatsoever.

There are several options:

  • We hard-code avoiding any check on wbeditformelemnts and wbeditsenseelemnets when they mid-edit is done by the same user, that would fix most of issues but not all. We can't do that in the MediawikiEditEntity class given that it fails before getting there.
  • We avoid doing checks on wbeditformelemnts and wbeditsenseelemnets in total.
  • We merge the patches as it is, fixing browser tests

Change 520725 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Add baserevid to wbleditformelements API module

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

There are several options:

  • We hard-code avoiding any check on wbeditformelemnts and wbeditsenseelemnets when they mid-edit is done by the same user, that would fix most of issues but not all. We can't do that in the MediawikiEditEntity class given that it fails before getting there.
  • We avoid doing checks on wbeditformelemnts and wbeditsenseelemnets in total.
  • We merge the patches as it is, fixing browser tests

Please which of the above was the addopted solution for the task?

I just tested baserevID for adding forms on beta and I have an error of base revision ID not found

Details of what I did:

Say, there are 2 users A, B.
A has loaded the page before B but B adds a form before A and saves.
Then A adds a form and save little time after B's addition.
Few seconds later A and B both try to edit the forms they added and they can't.

This error gets displayed.

error.png (284×828 px, 22 KB)

Please which of the above was the addopted solution for the task?

We went with the first one.

That's why your test fail. You can try it with both trying to edit an existing form at the same time.