Skip to content

Conversation

@micgro42
Copy link
Collaborator

@micgro42 micgro42 commented Nov 12, 2021

Using the chronology protector should prevent some browser test failures when running against beta and the replica hasn't caught up yet.

TODO: Somehow try this out in my local browser tests

Bug: T277862
Bug: T284443

@micgro42
Copy link
Collaborator Author

Oh, apparently that is a repository where we still do have some Travis-CI integration? o.O

Copy link
Member

@lucaswerkmeister lucaswerkmeister left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: Somehow try this out in my local browser tests

https://stackoverflow.com/a/39732501/1420237 ?

@micgro42
Copy link
Collaborator Author

micgro42 commented Nov 12, 2021

TODO: Somehow try this out in my local browser tests

stackoverflow.com/a/39732501/1420237 ?

I tried it locally with npm-link, will make a patch for Gerrit/Jenkins with this approach!

Edit: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/WikibaseLexeme/+/738378 though I may have to chain this behind https://gerrit.wikimedia.org/r/c/mediawiki/extensions/WikibaseLexeme/+/709747 to make all the peer dependencies line up correctly

wikibase.api.js Outdated
}, reject );
} );
} );
return new Promise( ( resolve, reject ) => { // FIXME: I don't think this Promise is needed
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don’t think the Promise is needed either, we can probably just await the response and then return response.entity.id? (And I’d say the same for createItem() – once we start using async/await, it seems unnecessary to keep working with .then() “manually”.)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Though I feel like I want to split up the change to how we use mwbot and general Promise=>async/await cleanup into two commits

wikibase.api.js Outdated
username: browser.config.mwUser,
password: browser.config.mwPwd
} );
} ).then( () => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line can probably be removed as well?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, done!

micgro42 and others added 3 commits November 12, 2021 16:23
Using the chronology protector should prevent some browser test failures
when running against beta and the replica hasn't caught up yet.

Bug: T277862
Bug: T284443
This should be a pure refactoring without any behavior changes
This is not a major version bump, because everything still works without
using `WikibaseApi.initialize()`, it just logs a warning.
Copy link
Member

@lucaswerkmeister lucaswerkmeister left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, even Node v8 had async/await already, we don’t even need to bump the engine version in package.json.

LGTM; do we need more testing (CI somewhere), or is this good to release?

@micgro42
Copy link
Collaborator Author

LGTM; do we need more testing (CI somewhere), or is this good to release?

I think this is good to go, but to be sure I think I would like the Wikibase patch to be ready similar to the Lexeme patch before merging it.

We should make a ticket for replacing Travis in this repo here

@lucaswerkmeister
Copy link
Member

Ah, okay. So we’re waiting for CI to finish on https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Wikibase/+/738421, I assume. (And, yes!)

@micgro42
Copy link
Collaborator Author

Both the Wikibase and WikibaseLexeme patches succeeded, so this is ready to be merged and a new release made

@micgro42 micgro42 marked this pull request as ready for review November 12, 2021 18:06
@micgro42 micgro42 merged commit cd3420e into master Nov 15, 2021
@micgro42 micgro42 deleted the reuseBot branch November 15, 2021 12:07
wmfgerrit pushed a commit to wikimedia/mediawiki-extensions-WikibaseLexeme that referenced this pull request Nov 16, 2021
Depends-on: wmde/wdio-wikibase#41
Bug: T277862
Change-Id: Ic46a31931a88759c041a62849a860afa5d24932c
wmfgerrit pushed a commit to wikimedia/mediawiki-extensions that referenced this pull request Nov 16, 2021
* Update WikibaseLexeme from branch 'master'
  to 7c6a2d03c5afe9e2e9441bdee2dfe7d1c13da608
  - Merge "Selenium: initialize WikibaseApi with ChronologyProtector"
  - Selenium: initialize WikibaseApi with ChronologyProtector
    
    Depends-on: wmde/wdio-wikibase#41
    Bug: T277862
    Change-Id: Ic46a31931a88759c041a62849a860afa5d24932c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants