From b138bf38733487d95d26537a4c56313b23a3ac57 Mon Sep 17 00:00:00 2001 From: Francesco Negri Date: Fri, 20 Dec 2024 12:34:13 +0100 Subject: [PATCH] Create subtask for wikireplicas view creation --- new_wikis_handler.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/new_wikis_handler.py b/new_wikis_handler.py index 931891a..f9227ca 100644 --- a/new_wikis_handler.py +++ b/new_wikis_handler.py @@ -54,6 +54,7 @@ class PostCreationHandler(object): self._check_cx, self._check_analytics, self._check_pywikibot, + self._check_wikireplicas, self._check_wikidata, ] self.handlers = [ @@ -61,6 +62,7 @@ class PostCreationHandler(object): self._handle_cx, self._handle_analytics, self._handle_pywikibot, + self._handle_wikireplicas, self._handle_wikidata, self._handle_wikistats, self._handle_incubator, @@ -185,6 +187,11 @@ class PostCreationHandler(object): self.post_ticket_phid, 'Add support for {} to Pywikibot'.format(self.db_name)) + def _check_wikireplicas(self): + url = 'https://replag.toolforge.org/' + wikireplicas_replag_page = requests.get().text + self.add_checklist(url, 'Wiki Replicas', self.db_name in wikireplicas_replag_page) + def _check_wikidata(self): url = 'https://www.wikidata.org/w/api.php' wikidata_help_page = requests.get(url, params={ @@ -193,6 +200,13 @@ class PostCreationHandler(object): }).text self.add_checklist(url, 'Wikidata', self.db_name in wikidata_help_page) + def _handle_wikireplicas(self): + client.createSubtask( + 'Follow the procedure at https://wikitech.wikimedia.org/wiki/Portal:Data_Services/Admin/Wiki_Replicas#Adding_a_wiki', [ + 'PHID-PROJ-d3h5oaspnvdwfjklmivl/', # cloud-services-team + 'PHID-PROJ-bj6y6ks7ampcwcignhce' # Data-Services + ], self.post_ticket_phid, '[wikireplicas] Create views for new wiki {}'.format(self.db_name)) + def _handle_wikidata(self): client.createSubtask( 'Per https://wikitech.wikimedia.org/wiki/Add_a_wiki once the wiki has been created', @@ -247,7 +261,6 @@ def handle_subticket_for_cloud(task_details, db_name, wiki_status): client.createSubtask("The new wiki's visibility will be: **%s**." % wiki_status, [ 'PHID-PROJ-hwibeuyzizzy4xzunfsk', # DBA - 'PHID-PROJ-bj6y6ks7ampcwcignhce' # Data services ], task_details['phid'], 'Prepare and check storage layer for ' + db_name) def handle_ticket_for_wikistats(task_details, db_name):