Skip to content
This repository has been archived by the owner on Sep 23, 2023. It is now read-only.

Add GlobalBlocking extension #419

Merged
merged 2 commits into from
Jan 25, 2022
Merged

Add GlobalBlocking extension #419

merged 2 commits into from
Jan 25, 2022

Conversation

MarcoAurelioWM
Copy link
Contributor

@MarcoAurelioWM MarcoAurelioWM commented Jan 23, 2022

Enables the GlobalBlocking extension on Patch Demo.

GlobalBlocking is in use in WMF wikis and recently it has started to receive many patches. It'd be great to test them in a test environment before they even reach e.g. the Beta Cluster or Production wikis.

@MarcoAurelioWM
Copy link
Contributor Author

I don't think this needs additional configuration. The "steward" permission comes in with extension.json so I don't think this needs to be configured separately.

@MatmaRex
Copy link
Owner

Well, unfortunately… https://patchdemo.wmflabs.org/wikis/847b3407a3/w/index.php?title=Special:UserLogin&returnto=Main+Page

#0 /srv/patchdemo-wikis/847b3407a3/w/includes/libs/rdbms/loadbalancer/LoadBalancer.php(956): Wikimedia\Rdbms\LoadBalancer->reportConnectionError()
#1 /srv/patchdemo-wikis/847b3407a3/w/includes/libs/rdbms/loadbalancer/LoadBalancer.php(928): Wikimedia\Rdbms\LoadBalancer->getServerConnection(0, 'globalblocking', 0)
#2 /srv/patchdemo-wikis/847b3407a3/w/includes/libs/rdbms/loadbalancer/LoadBalancer.php(1061): Wikimedia\Rdbms\LoadBalancer->getConnection(-1, Array, 'globalblocking', 0)
#3 /srv/patchdemo-wikis/847b3407a3/w/extensions/GlobalBlocking/includes/GlobalBlocking.php(349): Wikimedia\Rdbms\LoadBalancer->getConnectionRef(-1, 'globalblocking', 'globalblocking')
#4 /srv/patchdemo-wikis/847b3407a3/w/extensions/GlobalBlocking/includes/GlobalBlocking.php(242): GlobalBlocking::getGlobalBlockingDatabase(-1)
#5 /srv/patchdemo-wikis/847b3407a3/w/extensions/GlobalBlocking/includes/GlobalBlocking.php(85): GlobalBlocking::getGlobalBlockingBlock('172.16.5.238', true)
#6 /srv/patchdemo-wikis/847b3407a3/w/extensions/GlobalBlocking/includes/GlobalBlocking.php(29): GlobalBlocking::getUserBlockDetails(Object(User), '172.16.5.238')
#7 /srv/patchdemo-wikis/847b3407a3/w/extensions/GlobalBlocking/includes/GlobalBlockingHooks.php(147): GlobalBlocking::getUserBlock(Object(User), '172.16.5.238')
#8 /srv/patchdemo-wikis/847b3407a3/w/includes/HookContainer/HookContainer.php(160): GlobalBlockingHooks->onUserIsBlockedGlobally(Object(User), '172.16.5.238', false, NULL)
#9 /srv/patchdemo-wikis/847b3407a3/w/includes/HookContainer/HookRunner.php(4160): MediaWiki\HookContainer\HookContainer->run('UserIsBlockedGl...', Array)
#10 /srv/patchdemo-wikis/847b3407a3/w/includes/user/User.php(1832): MediaWiki\HookContainer\HookRunner->onUserIsBlockedGlobally(Object(User), '172.16.5.238', false, NULL)
#11 /srv/patchdemo-wikis/847b3407a3/w/includes/user/PasswordReset.php(357): User->getGlobalBlock()
#12 /srv/patchdemo-wikis/847b3407a3/w/includes/user/PasswordReset.php(160): PasswordReset->isBlocked(Object(User))
#13 /srv/patchdemo-wikis/847b3407a3/w/includes/user/PasswordReset.php(130): PasswordReset->computeIsAllowed(Object(User))
#14 /srv/patchdemo-wikis/847b3407a3/w/includes/libs/MapCacheLRU.php(274): PasswordReset->{closure}()
#15 /srv/patchdemo-wikis/847b3407a3/w/includes/user/PasswordReset.php(131): MapCacheLRU->getWithSetCallback('172.16.5.238', Object(Closure))
#16 /srv/patchdemo-wikis/847b3407a3/w/includes/specialpage/LoginSignupSpecialPage.php(996): PasswordReset->isAllowed(Object(User))
#17 /srv/patchdemo-wikis/847b3407a3/w/includes/specialpage/LoginSignupSpecialPage.php(707): LoginSignupSpecialPage->getFieldDefinitions()
#18 /srv/patchdemo-wikis/847b3407a3/w/includes/specialpage/AuthManagerSpecialPage.php(678): LoginSignupSpecialPage->onAuthChangeFormFields(Array, Array, Array, 'login')
#19 /srv/patchdemo-wikis/847b3407a3/w/includes/specialpage/LoginSignupSpecialPage.php(662): AuthManagerSpecialPage->fieldInfoToFormDescriptor(Array, Array, 'login')
#20 /srv/patchdemo-wikis/847b3407a3/w/includes/specialpage/AuthManagerSpecialPage.php(419): LoginSignupSpecialPage->getAuthForm(Array, 'login')
#21 /srv/patchdemo-wikis/847b3407a3/w/includes/specialpage/LoginSignupSpecialPage.php(314): AuthManagerSpecialPage->trySubmit()
#22 /srv/patchdemo-wikis/847b3407a3/w/includes/specialpage/SpecialPage.php(671): LoginSignupSpecialPage->execute(NULL)
#23 /srv/patchdemo-wikis/847b3407a3/w/includes/specialpage/SpecialPageFactory.php(1378): SpecialPage->run(NULL)
#24 /srv/patchdemo-wikis/847b3407a3/w/includes/MediaWiki.php(314): MediaWiki\SpecialPage\SpecialPageFactory->executePath('UserLogin', Object(RequestContext))
#25 /srv/patchdemo-wikis/847b3407a3/w/includes/MediaWiki.php(903): MediaWiki->performRequest()
#26 /srv/patchdemo-wikis/847b3407a3/w/includes/MediaWiki.php(563): MediaWiki->main()
#27 /srv/patchdemo-wikis/847b3407a3/w/index.php(53): MediaWiki->run()
#28 /srv/patchdemo-wikis/847b3407a3/w/index.php(46): wfIndexMain()
#29 {main}

@MatmaRex
Copy link
Owner

MatmaRex commented Jan 25, 2022

I'll update this, we need to set $wgGlobalBlockingDatabase.

Also, there's currently no way to become a steward on Patchdemo wikis, which would limit your testing ;) Never mind, bureaucrats can give steward rights, that's a bit silly, but okay.

@MatmaRex MatmaRex merged commit b1831ff into MatmaRex:master Jan 25, 2022
@MatmaRex
Copy link
Owner

Thanks for the patch!

@MarcoAurelioWM MarcoAurelioWM deleted the globalblocking branch January 26, 2022 10:29
@MarcoAurelioWM
Copy link
Contributor Author

Thank you! I guess we could add something in this file to assign the globalblocking-related permissions to sysops and unset the steward group to make testing more straightforward. I'll try that.

MatmaRex pushed a commit that referenced this pull request Jan 26, 2022
Follow-up to #419
Assign to sysops all GlobalBlocking permissions for easier testing, and remove the steward user group as uneeded.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants