Page MenuHomePhabricator

Don't update pywikibot directly from master but from last published tag
Closed, ResolvedPublic

Description

I propose not to update pywikibot directly from master branch but from last published tag. The reason is that master is under perpetual development and may contain bugs from recently committed patches whereas tags are more like a stable release and are deployed after the recent tests are sucessfull. Tags are published currently every month. Refer the HISTORY.rst or this release history: https://pypi.org/project/pywikibot/#history

Event Timeline

Chicocvenancio subscribed.

We're currently cloning from core and pulling on every user start. To change that we'd need to change this line in the singleuser Dockerfile https://github.com/yuvipanda/paws/blob/087d0ecf3c13f22319f20329ee30b4d4b87b4aa8/images/singleuser/Dockerfile#L124

@Xqt Any thoughts on what tag to consistently clone?

We're currently going for https://gerrit.wikimedia.org/r/pywikibot/core.git.

It seems cloning from master is the recommend install method at https://www.mediawiki.org/wiki/Manual:Pywikibot/Installation

OMG no. I'll change it.

Chicocvenancio changed the task status from Open to Stalled.Mar 15 2019, 5:40 PM
Chicocvenancio assigned this task to Xqt.
Chicocvenancio triaged this task as Low priority.
Chicocvenancio moved this task from Good first tasks to Waiting information on the PAWS board.

It seems cloning from master is the recommend install method at https://www.mediawiki.org/wiki/Manual:Pywikibot/Installation

No, it recommends to download the code from http://tools.wmflabs.org/pywikibot/ where it is packaged both from current master and also from 1 week old master commit. @Xqt I would cancel the webpage and redirect it to pip downloads page. What do you think?

No, it recommends to download the code from http://tools.wmflabs.org/pywikibot/ where it is packaged both from current master and also from 1 week old master commit. @Xqt I would cancel the webpage and redirect it to pip downloads page. What do you think?

Alternatively, you may retrieve the latest version using git or svn client from Gerrit, see Manual:Pywikibot/Gerrit#For users. This is the recommended way for active bot operators and developers to use Pywikibot.

That's correct. Alternatively ... for active bot operators and developers I would just reword it to experienced bot operators and developers as in English these two words have slightly different meaning. But that's not recommended for regular users

Please document a standard, repeatable and cheap way to install and update pywikibot on PAWS.

I would personally fetch the current remote master and then checkout last tag (Can be found using git tag | tail -1) every time new tag is created, because pip package contains only library parts, not the full package, so it it not good for PAWS.

And that's what is suggested in the task's description actually!

For PAWS (and we should use this way also in user docs):

$ git clone --recursive --branch $(git tag | tail -1) https://gerrit.wikimedia.org/r/pywikibot/core.git

$(git tag | tail -1)

Need repo cloned. Seperate into two commands?

Oh I see. Then:
a)

$ git clone --recursive --branch $(curl pip latest version somehow?) https://gerrit.wikimedia.org/r/pywikibot/core.git

b) (we should find a shortcut for users)

$ git clone --recursive https://gerrit.wikimedia.org/r/pywikibot/core.git
$ cd core
$ git checkout $(git tag | tail -1)

I propose another way:
Currently a new version tag like 3.0.20190301 is created every month if 5 tests passed on travis and appveyor is green. The library part is uploaded to pypi then. I would create a new tag stable (which indicates a stable release whereas master is under perpetual development) which always is the same commit as the last published release tag. This ensures that teh repository can always be cloned with
git clone --branch stable "https://gerrit.wikimedia.org/r/pywikibot/core"
and updated with
git pull "origin" stable

I would create a new tag stable (which indicates a stable release whereas master is under perpetual development) which always is the same commit as the last published release tag. This ensures that teh repository can always be cloned with
git clone --branch stable "https://gerrit.wikimedia.org/r/pywikibot/core"
and updated with
git pull "origin" stable

Agree

I created the stable tag now

Looks good, the Travis error seems unrelated. But does mean we cannot merge yet.

Looks good, the Travis error seems unrelated. But does mean we cannot merge yet.

How can it be fixed?

How can it be fixed?

I need to investigate it. I'll create a task for it, I think it is likely a requirement not being pinned and a new version clashing with another package.

@Xqt do you mind rebasing that PR? or allowing me to rebase the changes there?

@Xqt do you mind rebasing that PR? or allowing me to rebase the changes there?

Yes you can rebase it, this is the easiest way in this case I guess.

Mentioned in SAL (#wikimedia-cloud) [2019-05-18T11:13:41Z] <chicocvenancio> PAWS update helm chart to point to new singleuser image (T217908)