Page MenuHomePhabricator

SecureLinkFixer updating bot is broken
Closed, ResolvedPublic

Description

Seems to have broken like 8 weeks ago.

tools.slf@tools-sgebastion-08:~/SecureLinkFixer$ php maintenance/fetchList.php

Warning: file_get_contents(https://hg.mozilla.org/mozilla-central/atom-log/tip/security/manager/ssl/nsSTSPreloadList.inc): failed to open stream: HTTP request failed! in /mnt/nfs/labstore-secondary-tools-project/slf/SecureLinkFixer/includes/ListFetcher.php on line 59

Call Stack:
    0.0010     395504   1. {main}() /mnt/nfs/labstore-secondary-tools-project/slf/SecureLinkFixer/maintenance/fetchList.php:0
    0.0088     415336   2. MediaWiki\SecureLinkFixer\main() /mnt/nfs/labstore-secondary-tools-project/slf/SecureLinkFixer/maintenance/fetchList.php:45
    0.0089     415712   3. MediaWiki\SecureLinkFixer\ListFetcher->getLatestInfo() /mnt/nfs/labstore-secondary-tools-project/slf/SecureLinkFixer/maintenance/fetchList.php:39
    0.0089     415712   4. file_get_contents() /mnt/nfs/labstore-secondary-tools-project/slf/SecureLinkFixer/includes/ListFetcher.php:59


Fatal error: Uncaught RuntimeException: Unable to parse revision id/updated date for HSTS preload list in /mnt/nfs/labstore-secondary-tools-project/slf/SecureLinkFixer/includes/ListFetcher.php on line 63

RuntimeException: Unable to parse revision id/updated date for HSTS preload list in /mnt/nfs/labstore-secondary-tools-project/slf/SecureLinkFixer/includes/ListFetcher.php on line 63

Call Stack:
    0.0010     395504   1. {main}() /mnt/nfs/labstore-secondary-tools-project/slf/SecureLinkFixer/maintenance/fetchList.php:0
    0.0088     415336   2. MediaWiki\SecureLinkFixer\main() /mnt/nfs/labstore-secondary-tools-project/slf/SecureLinkFixer/maintenance/fetchList.php:45
    0.0089     415712   3. MediaWiki\SecureLinkFixer\ListFetcher->getLatestInfo() /mnt/nfs/labstore-secondary-tools-project/slf/SecureLinkFixer/maintenance/fetchList.php:39

If I run that file_get_contents locally, it works fine. Using curl from Toolforge also works fine.

Event Timeline

Change 741726 had a related patch set uploaded (by Reedy; author: Reedy):

[mediawiki/extensions/SecureLinkFixer@master] WIP: Fetch list from GitHub

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

Change 741726 merged by jenkins-bot:

[mediawiki/extensions/SecureLinkFixer@master] Fetch list from GitHub

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

I think I fixed it, we'll see next week.

https://gerrit.wikimedia.org/r/c/mediawiki/extensions/SecureLinkFixer/+/876331/

And by "fixed" I meant I ported fetchList.php to Rust and surprise surprise, it works perfectly. Source code is: https://gitlab.wikimedia.org/toolforge-repos/slf-bot/