Page MenuHomePhabricator

Create DescriptionCacheExpiry and UserAgentURL configuration options
Closed, ResolvedPublicFeature

Description

I propose adding two configuration options:

  1. QuickInstantCommonsDescriptionCacheExpiry

Currently, to change the description cache expiry you would have to set $wgUseQuickInstantCommons to false and define the $wgForeignFileRepos entry manually. This is unideal and cumbersome, especially on wikifarms.
https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/QuickInstantCommons/+/refs/heads/master/src/Hooks.php#38

  1. QuickInstantCommonsUserAgentURL

Would go in place of https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/QuickInstantCommons/+/refs/heads/master/src/MultiHttpClient.php#109. Would be useful for leaving more detailed contact information, or in the case of wikifarms, provide a link to the host, not the enduser.

Event Timeline

Aklapper renamed this task from Add additional configuration options to Create DescriptionCacheExpiry and UserAgentURL configuration options.Thu, Jan 15, 9:11 AM
Aklapper changed the subtype of this task from "Task" to "Feature Request".

@Pskyechology: Thanks for reporting this. For future reference, please use the feature request form (linked from the top of the task creation page) to create feature requests. Thanks.

I'm a bit unsure about the first part. $wgUseQuickInstantCommons was meant as the easy option where no config needed. I'm a bit hesitent to add additional config options here which just duplicate the foreignfilerepos config.

The second part sounds good.

@Pskyechology: Thanks for reporting this. For future reference, please use the feature request form (linked from the top of the task creation page) to create feature requests. Thanks.

Will do! Not yet familiar with this maze.

I'm a bit unsure about the first part. $wgUseQuickInstantCommons was meant as the easy option where no config needed. I'm a bit hesitent to add additional config options here which just duplicate the foreignfilerepos config.

I would agree for individual wikis, not so much for wikifarms. For reference, we have the extension enabled globally. For users that wish to use QIC, we would have to suppress $wgUseQuickInstantCommons to false. Having its value be in a superstate might be problematic. While I don't think the foreign file repos definition will be changing soon, it is unideal having to maintain your own definition of it. I'm also open to alternative ideas, such as raising the default expiry to a week, which seems to be WMF's desired default for (large) users.

Change #1231228 had a related patch set uploaded (by Brian Wolff; author: Brian Wolff):

[mediawiki/extensions/QuickInstantCommons@master] Allow specifying custom contact info in user-agent

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

I would agree for individual wikis, not so much for wikifarms. For reference, we have the extension enabled globally. For users that wish to use QIC, we would have to suppress $wgUseQuickInstantCommons to false. Having its value be in a superstate might be problematic. While I don't think the foreign file repos definition will be changing soon, it is unideal having to maintain your own definition of it. I'm also open to alternative ideas, such as raising the default expiry to a week, which seems to be WMF's desired default for (large) users.

I don't really understand the issue here. Lots of MediaWiki config values are arrays.

Bawolff claimed this task.

Adding stuff to the user-agent part fixed.

If you feel strongly about the other part, feel free to open a separate bug, but right now I'm inclined to not do that, as QuickInstantCommons is largely following MediaWiki convention here and I don't see any need for separate variables.

Change #1231228 merged by jenkins-bot:

[mediawiki/extensions/QuickInstantCommons@master] Allow specifying custom contact info in user-agent

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

Change #1231507 had a related patch set uploaded (by Paladox; author: Brian Wolff):

[mediawiki/extensions/QuickInstantCommons@REL1_45] Allow specifying custom contact info in user-agent

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

Change #1231508 had a related patch set uploaded (by Paladox; author: Brian Wolff):

[mediawiki/extensions/QuickInstantCommons@REL1_44] Allow specifying custom contact info in user-agent

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

Change #1231509 had a related patch set uploaded (by Paladox; author: Brian Wolff):

[mediawiki/extensions/QuickInstantCommons@REL1_43] Allow specifying custom contact info in user-agent

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

Change #1231509 merged by jenkins-bot:

[mediawiki/extensions/QuickInstantCommons@REL1_43] Allow specifying custom contact info in user-agent

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

Change #1231508 merged by jenkins-bot:

[mediawiki/extensions/QuickInstantCommons@REL1_44] Allow specifying custom contact info in user-agent

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

Change #1231507 merged by jenkins-bot:

[mediawiki/extensions/QuickInstantCommons@REL1_45] Allow specifying custom contact info in user-agent

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