Mailing List Archive

[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Only rerender summary after mobile-sections were rerendered.
Ppchelko has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406058 )

Change subject: Only rerender summary after mobile-sections were rerendered.
......................................................................

Only rerender summary after mobile-sections were rerendered.

Bug: T184753
Change-Id: I610611f2a64997e72d9049b8c10da44c19ade2ce
---
M scap/templates/config.yaml.j2
1 file changed, 21 insertions(+), 54 deletions(-)


git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/change-propagation/deploy refs/changes/58/406058/1

diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index db503d3..96ba6e4 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -72,9 +72,10 @@
cases:
- match:
meta:
- uri: '/^https?:\/\/[^\/]+\/api\/rest_v1\/page\/html\/([^\/]+)$/'
+ uri: '/^https?:\/\/[^\/]+\/api\/rest_v1\/page\/mobile-sections\/([^\/]+)$/'
tags:
- restbase
+ - mobile-sections
match_not:
- meta:
domain: '/wiktionary\.org$/'
@@ -92,10 +93,11 @@
meta:
# These URIs are coming from RESTBase, so we know that article titles will be normalized
# and main namespace articles will not have : (uri-encoded, so %3a or %3A)
- uri: '/^https?:\/\/[^\/]+\/api\/rest_v1\/page\/html\/((?:(?!%3a|%3A|\/).)+)$/'
+ uri: '/^https?:\/\/[^\/]+\/api\/rest_v1\/page\/mobile-sections\/((?:(?!%3a|%3A|\/).)+)$/'
domain: '/^en\.wiktionary\.org$/'
tags:
- restbase
+ - mobile-sections
exec:
method: get
# Don't encode title since it should be already encoded
@@ -112,7 +114,6 @@
match:
meta:
uri: '/^https?:\/\/[^\/]+\/api\/rest_v1\/page\/html\/([^/]+)$/'
- domain: '/\.wikipedia\.org$/'
tags:
- restbase
exec:
@@ -164,14 +165,8 @@
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
+ # The HTML might not change but sometimes editors use a purge to drop incorrectly rendered 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:
@@ -205,14 +200,8 @@
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
+ # The HTML might not change but sometimes editors use a purge to drop incorrectly rendered 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:
@@ -661,38 +650,20 @@
on_wikidata_description_change:
topic: change-prop.wikidata.resource-change
cases:
- - match:
- meta:
- uri: '/https?:\/\/[^\/]+\/wiki\/(?<title>.+)/'
- domain: '/\.wikipedia\.org$/'
- tags: [ 'wikidata' ]
- exec:
- - method: get
- uri: '<%= restbase_uri %>/{{message.meta.domain}}/v1/page/summary/{{match.meta.uri.title}}'
- headers:
- cache-control: no-cache
- query:
- redirect: false
- - method: get
- uri: '<%= restbase_uri %>/{{message.meta.domain}}/v1/page/mobile-sections/{{match.meta.uri.title}}'
- headers:
- cache-control: no-cache
- query:
- redirect: false
- - match:
- meta:
- uri: '/https?:\/\/[^\/]+\/wiki\/(?<title>.+)/'
- tags: [ 'wikidata' ]
- exec:
- - method: get
- uri: '<%= restbase_uri %>/{{message.meta.domain}}/v1/page/summary/{{match.meta.uri.title}}'
- headers:
- cache-control: no-cache
- query:
- redirect: false
+ match:
+ meta:
+ uri: '/https?:\/\/[^\/]+\/wiki\/(?<title>.+)/'
+ tags: [ 'wikidata' ]
+ exec:
+ method: get
+ uri: '<%= restbase_uri %>/{{message.meta.domain}}/v1/page/mobile-sections/{{match.meta.uri.title}}'
+ headers:
+ cache-control: no-cache
+ query:
+ redirect: false

- # Rerender summary when pageimages page property change
- page_images_summary:
+ # Rerender mobile-sections when pageimages page property change
+ page_images_mobile:
topic: mediawiki.page-properties-change
# We don't support 'OR' in the match section, so workaround it by 2 cases with identical exec
cases:
@@ -708,7 +679,7 @@
page_namespace: 120
exec:
method: get
- uri: '<%= restbase_uri %>/{{message.meta.domain}}/v1/page/summary/{message.page_title}'
+ uri: '<%= restbase_uri %>/{{message.meta.domain}}/v1/page/mobile-sections/{message.page_title}'
headers:
cache-control: no-cache
query:
@@ -725,7 +696,7 @@
page_namespace: 120
exec:
method: get
- uri: '<%= restbase_uri %>/{{message.meta.domain}}/v1/page/summary/{message.page_title}'
+ uri: '<%= restbase_uri %>/{{message.meta.domain}}/v1/page/mobile-sections/{message.page_title}'
headers:
cache-control: no-cache
query:
@@ -736,8 +707,6 @@
# We don't support 'OR' in the match section, so workaround it by 2 cases with identical exec
cases:
- match:
- meta:
- domain: '/\.wikipedia\.org$/'
added_properties:
page_image: '/.+/' # Regex that matches anything just to check the prop is set
exec:
@@ -748,8 +717,6 @@
query:
redirect: false
- match:
- meta:
- domain: '/\.wikipedia\.org$/'
removed_properties:
page_image: '/.+/' # Regex that matches anything just to check the prop is set
exec:

--
To view, visit https://gerrit.wikimedia.org/r/406058
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I610611f2a64997e72d9049b8c10da44c19ade2ce
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/change-propagation/deploy
Gerrit-Branch: master
Gerrit-Owner: Ppchelko <ppchelko@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits