Page MenuHomePhabricator

Add config, tests, and convert to PSR4
Open, Needs TriagePublic

Description

To make it easier for people to contribute and run the tool locally.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 16 2020, 5:54 AM

Change 504985 had a related patch set uploaded (by Samwilson; owner: Gergő Tisza):
[labs/tools/extjsonuploader@master] Convert to PSR-4, add standard boilerplates, add tests

https://gerrit.wikimedia.org/r/504985

Change 649489 had a related patch set uploaded (by Samwilson; owner: Samwilson):
[integration/config@master] Add labs/tools/extjsonuploader

https://gerrit.wikimedia.org/r/649489

Change 649489 merged by jenkins-bot:
[integration/config@master] Zuul: Install CI for labs/tools/extjsonuploader

https://gerrit.wikimedia.org/r/649489

Mentioned in SAL (#wikimedia-releng) [2020-12-15T16:16:40Z] <James_F> Zuul: Install CI for labs/tools/extjsonuploader T250344

Change 504985 merged by jenkins-bot:
[labs/tools/extjsonuploader@master] Convert to PSR-4, add standard boilerplates, add tests

https://gerrit.wikimedia.org/r/504985

Mentioned in SAL (#wikimedia-cloud) [2020-12-16T06:31:21Z] <wm-bot> <samwilson> Deployed new version. T250344.

Change 649770 had a related patch set uploaded (by Samwilson; owner: Samwilson):
[labs/tools/extjsonuploader@master] Fix up clone.sh for new run.php entry point

https://gerrit.wikimedia.org/r/649770

The new run.php is deployed, but I've left the cronjob uncommented because clone.sh is calling the wrong PHP file (see patch above).

run.php is giving "Error when saving: The content you supplied exceeds the article size limit of 2048 kilobytes." but I assume that's been happening for ages and can be ignored. I'll keep running clone and run manually until there are changes in extensions to confirm that everything is working as it should be.

Change 649845 had a related patch set uploaded (by Samwilson; owner: Samwilson):
[labs/tools/extjsonuploader@master] Remove unneeded data to keep size small

https://gerrit.wikimedia.org/r/649845

Samwilson added a comment.EditedDec 16 2020, 10:57 AM

I should learn to read the message in front of me! It was indeed trying to save a too-large page, because in the switch to the new structure we lost https://gerrit.wikimedia.org/r/c/labs/tools/extjsonuploader/+/530983

The size difference was

  • old: 1,626,886 bytes
  • new: 2,798,558 bytes

I've made a patch for that.

Also, there was a change in the src/vendor/ directory, which we should add into the new code:

diff vendor/hamstar/wikimate/Wikimate.php src/vendor/hamstar/wikimate/Wikimate.php
52c52
<               $this->useragent = 'Wikimate '.self::VERSION.' (https://github.com/hamstar/Wikimate)';
---
>               $this->useragent = 'User:Bawolff extension.json sync bot (using framework: Wikimate '.self::VERSION.' (https://github.com/hamstar/Wikimate))';
260d259

For the time being, I've rolled the deployed version back to 979d702f40b874aad23b3fbd2ad2f13a45966d6e and restored the cronjob.

Change 649845 merged by jenkins-bot:
[labs/tools/extjsonuploader@master] Remove unneeded data to keep size small

https://gerrit.wikimedia.org/r/649845

Tgr added a subscriber: Tgr.Dec 17 2020, 4:49 AM

Also, there was a change in the src/vendor/ directory, which we should add into the new code:

That needs to be fixed upstream so Wikimate takes the user agent as a parameter.

Change 649770 merged by jenkins-bot:
[labs/tools/extjsonuploader@master] Fix up clone.sh for new run.php entry point

https://gerrit.wikimedia.org/r/649770

Mentioned in SAL (#wikimedia-cloud) [2020-12-19T05:43:48Z] <wm-bot> <samwilson> T250344 Redeployed new version.