Page MenuHomePhabricator

Add baserevid to wbleditformelements API module
Closed, ResolvedPublic

Description

See parent

Details

Related Gerrit Patches:
mediawiki/extensions/WikibaseLexeme : masterAdd baserevid to wbleditformelements API module

Event Timeline

Ladsgroup created this task.Jun 5 2019, 9:52 AM
Addshore moved this task from incoming to in progress on the Wikidata board.Jun 21 2019, 11:27 PM

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
This comment was removed by alaa_wmde.

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?

Rosalie_WMDE added a comment.EditedJul 24 2019, 1:51 PM

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.

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.

alaa_wmde closed this task as Resolved.Oct 1 2019, 2:52 PM