Mobrovac has submitted this change and it was merged.

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


Purge Varnish on page deletion

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

Approvals:
  Mobrovac: Verified; Looks good to me, approved



diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index c458ba3..ead1f45 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}}/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: merged
Gerrit-Change-Id: Id1c8b1ddc725692ff3cd3da0e530dc991f5a47ff
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/services/change-propagation/deploy
Gerrit-Branch: master
Gerrit-Owner: Ppchelko <ppche...@wikimedia.org>
Gerrit-Reviewer: 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