Page MenuHomePhabricator

Enable BetaFeatures extension on Wikitech
Closed, ResolvedPublic

Description

Having BetaFeatures enabled for wikitech would allow users there to try out things like cirrussearch-completionsuggester, read-more or VisualEditor wikitext editor.

They might be interesting features for the Wikitech audience.

Event Timeline

bd808 raised the priority of this task from to Needs Triage.
bd808 updated the task description. (Show Details)
bd808 added subscribers: Qgil, Luke081515, Purodha and 7 others.

It was disabled as part of https://gerrit.wikimedia.org/r/#/c/158409/ - not sure why. But September 2014... Was that around the time it was being migrated to silver? Maybe they imported all the wikitech data but it didn't have the tables for the newly expected-by-default extensions, or something.

BF doesn't require any database tables, just a working job queue.

Which updates a betafeatures_user_counts table?

Dereckson subscribed.

And do we currently have a working job queue for wikitech?

krenair@silver:~$ mwscript showJobs.php labswiki --group
refreshLinksPrioritized: 0 queued; 507 claimed (0 active, 507 abandoned); 0 delayed
categoryMembershipChange: 0 queued; 1 claimed (0 active, 1 abandoned); 0 delayed

sudo -u www-data crontab -l shows:

# Puppet Name: run-jobs
* * * * * /usr/local/bin/mwscript maintenance/runJobs.php --wiki=labswiki > /dev/null 2>&1

I am reviving this task slightly. I could definitely use the VisualEditor to edit wikitext which is only available as a BetaFeature ( https://www.mediawiki.org/wiki/2017_wikitext_editor ).

From the above comments about BetaFeatures:

Why it is disabled

Extension has been disabled with other extensions by @Andrew in 2014: https://gerrit.wikimedia.org/r/c/operations/mediawiki-config/+/158409 . Some got enabled again afterward such as Math.

MediaWiki jobs

Running job is done by running runJobs.php every minute:

modules/openstack/manifests/wikitech/web.pp
    systemd::timer::job { 'wikitech_run_jobs':
        ensure                    => present,
        description               => 'Run Wikitech runJobs.php maintenance script',
        command                   => "/usr/local/bin/mwscript maintenance/runJobs.php --wiki=${wikidb}",
        interval                  => {
          'start'    => 'OnCalendar',
          'interval' => '*-*-* *:*:00', # Every minute
        },
...
    }

It is not ideal but that does the work.

Database table

The extension requires a Database table to be created: betafeatures_user_counts. It is present on the database:

mwmaint1002:~$ echo 'SHOW CREATE TABLE betafeatures_user_counts \G'|sql labswiki
*************************** 1. row ***************************
       Table: betafeatures_user_counts
Create Table: CREATE TABLE `betafeatures_user_counts` (
  `feature` varchar(255) NOT NULL,
  `number` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`feature`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1

And match the schema provided in the extension:

mediawiki/extensions/BetaFeatures/sql/tables-generated.sql
CREATE TABLE /*_*/betafeatures_user_counts (
  feature VARCHAR(255) NOT NULL,
  number INT DEFAULT 0 NOT NULL,
  PRIMARY KEY(feature)
) /*$wgDBTableOptions*/;

Maybe some features would require extra database tables, but we can probably assume they got created as part of enabling those extensions.

So I guess it is all a matter of enabling it again?

No clue who can review but I can at least craft the patch and nag people about it :]

Change 668196 had a related patch set uploaded (by Hashar; owner: Hashar):
[operations/mediawiki-config@master] wikitech: enable BetaFeatures

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

hashar renamed this task from Enable beta features for Wikitech to Enable BetaFeatures extension on Wikitech.Mar 11 2021, 3:00 PM

Change 668196 merged by jenkins-bot:
[operations/mediawiki-config@master] wikitech: enable BetaFeatures

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

Mentioned in SAL (#wikimedia-operations) [2021-03-11T19:18:14Z] <tgr@deploy1002> Synchronized wmf-config/InitialiseSettings.php: Config: [[gerrit:668196|wikitech: enable BetaFeatures (T125941)]] (duration: 01m 08s)

Looks like that works now: https://wikitech.wikimedia.org/wiki/Special:Preferences#mw-prefsection-betafeatures

I have tested New wikitext mode and Visual differences . I haven't tested Paragraph-based edit conflict , I assume it will work ;)