Mobrovac has submitted this change and it was merged.

Change subject: Added separate rules to process transcludes-derived events
......................................................................


Added separate rules to process transcludes-derived events

Bug: T145804
Change-Id: Iaa4d9225204f0d59c3a50da697bcb5f60881b4fc
---
M scap/templates/config.yaml.j2
1 file changed, 47 insertions(+), 37 deletions(-)

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



diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index 6eb84b6..c458ba3 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -93,45 +93,47 @@
                   concurrency: <%= concurrency %>
                   startup_delay: 60000
                   templates:
-                    summary_rerender:
+                    summary_definition_rerender: 
&summary_definition_rerender_spec
                       topic: resource_change
-                      match:
-                        meta:
-                          uri: 
'/^https?:\/\/[^\/]+\/api\/rest_v1\/page\/html\/([^\/]+)$/'
-                        tags:
-                          - restbase
-                      match_not:
-                        meta:
-                          domain: '/wiktionary\.org$/'
-                      exec:
-                        method: get
-                        # Don't encode title since it should be already encoded
-                        uri: '<%= restbase_uri 
%>/{{message.meta.domain}}/v1/page/summary/{{match.meta.uri[1]}}'
-                        query:
-                          redirect: false
-                        headers:
-                          cache-control: no-cache
+                      cases:
+                        - match:
+                            meta:
+                              uri: 
'/^https?:\/\/[^\/]+\/api\/rest_v1\/page\/html\/([^\/]+)$/'
+                            tags:
+                              - restbase
+                          match_not:
+                            meta:
+                              domain: '/wiktionary\.org$/'
+                          exec:
+                            method: get
+                            # Don't encode title since it should be already 
encoded
+                            uri: '<%= restbase_uri 
%>/{{message.meta.domain}}/v1/page/summary/{{match.meta.uri[1]}}'
+                            query:
+                              redirect: false
+                            headers:
+                              cache-control: no-cache
+                        - match:
+                            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|\/).)+)$/'
+                              domain: '/^en\.wiktionary\.org$/'
+                            tags:
+                              - restbase
+                          exec:
+                            method: get
+                            # Don't encode title since it should be already 
encoded
+                            uri: '<%= restbase_uri 
%>/{{message.meta.domain}}/v1/page/definition/{{match.meta.uri[1]}}'
+                            query:
+                              redirect: false
+                            headers:
+                              cache-control: no-cache
 
-                    definition_rerender:
-                      topic: resource_change
-                      match:
-                        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|\/).)+)$/'
-                          domain: '/^en\.wiktionary\.org$/'
-                        tags:
-                          - restbase
-                      exec:
-                        method: get
-                        # Don't encode title since it should be already encoded
-                        uri: '<%= restbase_uri 
%>/{{message.meta.domain}}/v1/page/definition/{{match.meta.uri[1]}}'
-                        query:
-                          redirect: false
-                        headers:
-                          cache-control: no-cache
+                    summary_definition_rerender_transcludes:
+                      <<: *summary_definition_rerender_spec
+                      topic: change-prop.transcludes.resource-change
 
-                    mobile_rerender:
+                    mobile_rerender: &mobile_rerender_spec
                       topic: resource_change
                       match:
                         meta:
@@ -147,7 +149,11 @@
                         headers:
                           cache-control: no-cache
 
-                    purge_varnish:
+                    mobile_rerender_transcludes:
+                      <<: *mobile_rerender_spec
+                      topic: change-prop.transcludes.resource-change
+
+                    purge_varnish: &purge_varnish_spec
                       topic: resource_change
                       match:
                         meta:
@@ -161,6 +167,10 @@
                           - meta:
                               uri: 
'//{{message.meta.domain}}/api/rest_v1/{{match.meta.uri.title}}'
 
+                    purge_varnish_transcludes:
+                      <<: *purge_varnish_spec
+                      topic: change-prop.transcludes.resource-change
+
                     # RESTBase update jobs
                     mw_purge:
                       topic: resource_change

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaa4d9225204f0d59c3a50da697bcb5f60881b4fc
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