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

Xqt created this task.Mar 8 2019, 5:34 PM
Chicocvenancio moved this task from Backlog to Easy tasks on the PAWS board.Mar 8 2019, 5:41 PM
Chicocvenancio added a subscriber: Chicocvenancio.

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.

Restricted Application added a subscriber: pywikibot-bugs-list. · View Herald TranscriptMar 12 2019, 8:24 PM

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

Xqt added a comment.Mar 12 2019, 10:17 PM

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 triaged this task as Low priority.
Chicocvenancio moved this task from Easy tasks to Waiting information on the PAWS board.
Chicocvenancio assigned this task to Xqt.
Dvorapa added a subscriber: Dvorapa.EditedMar 15 2019, 7:40 PM

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.

Dvorapa added a comment.EditedMar 15 2019, 7:59 PM

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.

Dvorapa added a comment.EditedMar 15 2019, 8:16 PM

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?

Dvorapa added a comment.EditedMar 15 2019, 8:37 PM

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)
Xqt added a comment.Mar 22 2019, 8:36 AM

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

Dvorapa added a comment.EditedMar 22 2019, 8:38 AM

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

Xqt added a comment.Mar 23 2019, 9:43 AM

I created the stable tag now

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

Xqt added a comment.Mar 23 2019, 3:13 PM

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.

Dvorapa moved this task from Backlog to Upstream issues on the Pywikibot board.

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

Xqt added a comment.Fri, May 17, 9:38 PM

@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.

Xqt closed this task as Resolved.Sat, May 18, 10:24 AM

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