Ppchelko has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/399692 )
Change subject: [Config] Rerender mobile-sectionss and summary on MW purge and
null edit.
......................................................................
[Config] Rerender mobile-sectionss and summary on MW purge and null edit.
Sometimes due to software bugs MCS output could be wrong.
If it's cached, the editors will naturally try to purge it with
MW purge or a null edit. But since HTML might not have changed,
the optimization in RESTBase that doesn't issue purges if HTML's
unchanged will not be issued. This config change fixes the situation.
Bug: T182953
Change-Id: I4580bfab99f4df6c3f27bb12e6383718579bf4b7
---
M scap/templates/config.yaml.j2
1 file changed, 46 insertions(+), 19 deletions(-)
Approvals:
Mobrovac: Looks good to me, but someone else must approve
Ppchelko: Verified; Looks good to me, approved
diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index bca8e38..db503d3 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -155,15 +155,29 @@
meta:
domain: /\.wikidata\.org$/
exec:
- method: get
- # This even comes directly from MediaWiki, so title is
encoded in MW-specific way.
- # Re-encode the title in standard `encodeURIComponent`
encoding.
- uri: '<%= restbase_uri
%>/{{message.meta.domain}}/v1/page/html/{decode(match.meta.uri.title)}'
- headers:
- cache-control: no-cache
- if-unmodified-since: '{{date(message.meta.dt)}}'
- query:
- redirect: false
+ - method: get
+ # This even comes directly from MediaWiki, so title is
encoded in MW-specific way.
+ # Re-encode the title in standard `encodeURIComponent`
encoding.
+ uri: '<%= restbase_uri
%>/{{message.meta.domain}}/v1/page/html/{decode(match.meta.uri.title)}'
+ headers:
+ cache-control: no-cache
+ if-unmodified-since: '{{date(message.meta.dt)}}'
+ query:
+ redirect: false
+ # The HTML might not change but sometimes editors use a
purge to drop incorrectly rendered summary/MCS
+ # content, so let's purge them as well just in case. The
rate is low.
+ - method: get
+ uri: '<%= restbase_uri
%>/{{message.meta.domain}}/v1/page/summary/{decode(match.meta.uri.title)}'
+ headers:
+ cache-control: no-cache
+ query:
+ redirect: false
+ - method: get
+ uri: '<%= restbase_uri
%>/{{message.meta.domain}}/v1/page/mobile-sections/{decode(match.meta.uri.title)}'
+ headers:
+ cache-control: no-cache
+ query:
+ redirect: false
null_edit:
topic: resource_change
@@ -182,16 +196,29 @@
meta:
domain: /\.wikidata\.org$/
exec:
- method: get
- # This even comes directly from MediaWiki, so title is
encoded in MW-specific way.
- # Re-encode the title in standard `encodeURIComponent`
encoding.
- uri: '<%= restbase_uri
%>/{{message.meta.domain}}/v1/page/html/{decode(match.meta.uri.title)}'
- headers:
- cache-control: no-cache
- if-unmodified-since: '{{date(message.meta.dt)}}'
- query:
- redirect: false
-
+ - method: get
+ # This even comes directly from MediaWiki, so title is
encoded in MW-specific way.
+ # Re-encode the title in standard `encodeURIComponent`
encoding.
+ uri: '<%= restbase_uri
%>/{{message.meta.domain}}/v1/page/html/{decode(match.meta.uri.title)}'
+ headers:
+ cache-control: no-cache
+ if-unmodified-since: '{{date(message.meta.dt)}}'
+ query:
+ redirect: false
+ # The HTML might not change but sometimes editors use a
purge to drop incorrectly rendered summary/MCS
+ # content, so let's purge them as well just in case. The
rate is low.
+ - method: get
+ uri: '<%= restbase_uri
%>/{{message.meta.domain}}/v1/page/summary/{decode(match.meta.uri.title)}'
+ headers:
+ cache-control: no-cache
+ query:
+ redirect: false
+ - method: get
+ uri: '<%= restbase_uri
%>/{{message.meta.domain}}/v1/page/mobile-sections/{decode(match.meta.uri.title)}'
+ headers:
+ cache-control: no-cache
+ query:
+ redirect: false
page_edit:
topic: mediawiki.revision-create
limiters:
--
To view, visit https://gerrit.wikimedia.org/r/399692
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I4580bfab99f4df6c3f27bb12e6383718579bf4b7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/change-propagation/deploy
Gerrit-Branch: master
Gerrit-Owner: Ppchelko <[email protected]>
Gerrit-Reviewer: Mobrovac <[email protected]>
Gerrit-Reviewer: Ppchelko <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits