Page MenuHomePhabricator

Switch ErfgoedBot to use pywikibot master (and pin to specific commit)
Closed, DeclinedPublic

Description

See T112460

I’m fine with switching to master.

There are two different things to take care of:

  • The pywikibot used in unit tests and Docker, which is installed via requirements.txt. Solution is indeed to put in the git repo there together with a specific hash
  • The pywikibot used in production: This is a manual check-out of pywikibot on disk, used via pwb.py.

We should probably align both.

Event Timeline

JeanFred renamed this task from Pin pywikibot to latest master commit to Switch ErfgoedBot to use pywikibot master (and pin to specific commit).Nov 28 2016, 6:46 PM

Maybe better to run the tests twice?

  • One for the latest and greatest master of pywikibot and latest and last version of heritage
  • One for the pinned version of pywikibot and the and last version of heritage

Maybe better to run the tests twice?

  • One for the latest and greatest master of pywikibot and latest and last version of heritage
  • One for the pinned version of pywikibot and the and last version of heritage

Not sure how you would do that if you run the tests through tox. Or is it possible to define an environment with a different hash/version/url for pywikibot then that in requirements.txt?

I’m fine with switching to master.

There are two different things to take care of:

  • The pywikibot used in unit tests and Docker, which is installed via requirements.txt. Solution is indeed to put in the git repo there together with a specific hash
  • The pywikibot used in production: This is a manual check-out of pywikibot on disk, used via pwb.py.

We should probably align both.

This should be solvable by updating the hash in requirements.txt (to the latest) and running the tests immediately prior to deploying a new (the newest) pywikibot in production.

With T152907: Release a new version of pywikibot fixed we should be able to pin a 3.0 version to run which should solve our needs. Then whenever we need to bump the normale unit test train will hopefully warn us if anything breaks.

Main reason to pin is that latest version is by design not guaranteed to be stable.

We have now a fine pinned pywikibot, and it’s been working well for a while now.

I just tried upgrading to the most recent version, and the heritage unit tests are then failing. It’s not a criticism of pywikibot − it’s only normal that there are some backwards incompatible changes every once in a while − but that comforts me into deciding that pinning is the way to go.