Ppchelko has uploaded a new change for review.

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

Change subject: Purge Varnish on page deletion
......................................................................

Purge Varnish on page deletion

Change-Id: Id1c8b1ddc725692ff3cd3da0e530dc991f5a47ff
---
M scap/templates/config.yaml.j2
1 file changed, 26 insertions(+), 6 deletions(-)


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

diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index c458ba3..7a45bb4 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -245,12 +245,32 @@
                           - 404 # 404 is a normal response for page deletion
                           - 412
                       exec:
-                        method: get
-                        uri: '<%= restbase_uri 
%>/{{message.meta.domain}}/v1/page/title/{message.page_title}'
-                        headers:
-                          cache-control: no-cache
-                        query:
-                          redirect: false
+                        - method: get
+                          uri: '<%= restbase_uri 
%>/{{message.meta.domain}}/api/rest_v1/page/title/{message.page_title}'
+                          headers:
+                            cache-control: no-cache
+                          query:
+                            redirect: false
+                        # For page deletion RESTBase doesn't emit 
resource_change events, and to go through
+                        # the normal purge chain (html update -> html 
resource_change -> summary update -> summary resource_change)
+                        # we need to add many workarounds/shortcurst in 
RESTBase. So having this list here is an OK compromise.
+                        - method: post
+                          uri: '/sys/purge/'
+                          body:
+                            - meta:
+                                uri: 
'//{{message.meta.domain}}/api/rest_v1/page/html/{message.page_title}'
+                            - meta:
+                                uri: 
'//{{message.meta.domain}}/api/rest_v1/page/html/{message.page_title}/{{message.rev_id}}'
+                            - meta:
+                                uri: 
'//{{message.meta.domain}}/api/rest_v1/page/summary/{message.page_title}'
+                            - meta:
+                                uri: 
'//{{message.meta.domain}}/api/rest_v1/page/definition/{message.page_title}'
+                            - meta:
+                                uri: 
'//{{message.meta.domain}}/api/rest_v1/page/mobile-sections/{message.page_title}'
+                            - meta:
+                                uri: 
'//{{message.meta.domain}}/api/rest_v1/page/mobile-sections-lead/{message.page_title}'
+                            - meta:
+                                uri: 
'//{{message.meta.domain}}/api/rest_v1/page/mobile-sections-remaining/{message.page_title}'
 
                     page_restore:
                       topic: mediawiki.page-undelete

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

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

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

Reply via email to