Lucas_Werkmeister_WMDE added a comment.
Here’s a version of the reproduction commands from T44325#7355099 <https://phabricator.wikimedia.org/T44325#7355099> for easier testing: first, setup once… const params = { action: 'wbeditentity', new: 'item', data: JSON.stringify( { sitelinks: { [ mw.config.get( 'wgDBname' ) ]: { site: mw.config.get( 'wgDBname' ), title: mw.config.get( 'wgTitle' ) } } } ) }; const api = new mw.Api(); and then repeat the following snippet as often as you want: await Promise.all( [ api.postWithEditToken( params ), api.postWithEditToken( params ) ].map( promise => promise.then( response => response.entity.id ).then( itemId => { console.log( itemId ); return api.postWithEditToken( { action: 'delete', title: `Item:${itemId}` } ); } ) ) ) This will try to create two items with the same sitelink, and either log a success (if both were created, i.e. the conflict was not detected, bad) or an error (`failed-save` indicates the conflict was detected, good). Either way, any created item is also deleted afterwards. TASK DETAIL https://phabricator.wikimedia.org/T291377 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Lucas_Werkmeister_WMDE Cc: Aklapper, hoo, Lea_Lacroix_WMDE, Mohammed_Sadat_WMDE, Lydia_Pintscher, Addshore, Lucas_Werkmeister_WMDE, Suran38, Biggs657, Invadibot, Lalamarie69, maantietaja, Juan90264, Alter-paule, Beast1978, Un1tY, Akuckartz, Hook696, Iflorez, Kent7301, alaa_wmde, joker88john, CucyNoiD, Nandana, Gaboe420, lucamauri, Giuliamocci, Cpaulf30, Lahi, Gq86, Af420, Bsandipan, GoranSMilovanovic, QZanden, LawExplorer, Lewizho99, Maathavan, _jensen, rosalieper, Scott_WUaS, Wikidata-bugs, aude, Mbch331
_______________________________________________ Wikidata-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected]
