Mobrovac has uploaded a new change for review.

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

Change subject: Config: React to page-properties event
......................................................................

Config: React to page-properties event

Bug: T147516
Change-Id: I9ccdbdd34ba36dc1734662873c27cb9631e0e1f7
---
M scap/templates/config.yaml.j2
1 file changed, 30 insertions(+), 1 deletion(-)


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

diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index 5eb4a48..fd6a321 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -600,4 +600,33 @@
                         headers:
                           cache-control: no-cache
                         query:
-                          redirect: false
\ No newline at end of file
+                          redirect: false
+                    # the rule replacing the one above, to be phased out
+                    page_images_change:
+                      topic: mediawiki.page-properties-change
+                      # We don't support 'OR' in the match section, so 
workaround it by 2 cases with identical exec
+                      cases:
+                        - match:
+                            meta:
+                              uri: '/^https?:\/\/[^\/]+\/wiki\/(?<title>.+)$/'
+                            added_properties:
+                              page_image: '/.+/' # Regex that matches anything 
just to check the prop is set
+                          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>.+)$/'
+                            removed_properties:
+                              page_image: '/.+/' # Regex that matches anything 
just to check the prop is set
+                          exec:
+                            method: get
+                            uri: '<%= restbase_uri 
%>/{{message.meta.domain}}/v1/page/summary/{{match.meta.uri.title}}'
+                            headers:
+                              cache-control: no-cache
+                            query:
+                              redirect: false

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

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

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

Reply via email to