Page MenuHomePhabricator

Add proxy support to GitHub actions
Closed, ResolvedPublic

Description

Pywikibot runs a relatively large set of post-merge tests via GitHub Actions. Some of these tests use Beta Cluster wikis as their target for end-to-end testing of various features especially upcoming changes of new MW versions.

GitHub Actions uses Microsoft Azure to host it's runners. There are over 5000 (!) IP ranges listed at https://api.github.com/meta that GitHub Actions might make requests from. Due to unwanted crawlers, some of the IP addresses used by GitHub Actions have blocked and lead to http response 403 (see T399415).

So solve this problem, a proxy can be used. It’s usage is already available through requests package:
https://www.mediawiki.org/wiki/Manual:Pywikibot/Installation
https://requests.readthedocs.io/en/latest/user/advanced/#proxies
T399485#11011491

This might also increase the WM rate limits

Event Timeline

Change #1287995 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [tests] Add SOCKS proxy support to pywikibot-ci

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

Change #1287995 merged by Xqt:

[pywikibot/core@master] [tests] Add SOCKS proxy support to pywikibot-ci

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

Change #1287996 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [tests] Add SOCKS proxy support to several GutHub actions tests

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

Change #1287996 merged by Xqt:

[pywikibot/core@master] [tests] Add SOCKS proxy support to several GutHub actions tests

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

Change #1287998 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [tests] Run WMCS SOCKS setup as bash in doctest

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

Change #1287998 merged by Xqt:

[pywikibot/core@master] [tests] Run WMCS SOCKS setup as bash in doctest

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