From 3af446ee71403958eeab4246b9ad78ec8914d885 Mon Sep 17 00:00:00 2001 From: Amir Sarabadani Date: Fri, 13 Dec 2024 19:26:30 +0100 Subject: [PATCH] new_wikis_handler: Adopt the checklist to make config patches Reduces the chance of typos and oopsies --- new_wikis_handler.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/new_wikis_handler.py b/new_wikis_handler.py index 468de1d..931891a 100644 --- a/new_wikis_handler.py +++ b/new_wikis_handler.py @@ -411,12 +411,14 @@ def get_db_name(wiki_spec, parts): return db_name -def add_create_instructions(parts, shard, language_code, db_name, task_tid): +def add_create_instructions(language_code, db_name, family, visibility): add_text('\n-------') add_text('**Step by step commands**:') + add_text('Locally (in mediawiki-config repo):') + add_text('`composer manage-dblist prepare {db_name} {lang_code} {family} {visibility}`'.format( + db_name=db_name, lang_code=language_code, family=family, visibility=visibility)) add_text('On deployment host:') - add_text('`scap sync-world "Creating {db_name} ({phab})"`'.format( - db_name=db_name, phab=task_tid)) + add_text('`scap backport #patch-id`') add_text('On maintenance host:') addwiki_path = 'mwscript extensions/WikimediaMaintenance/addWiki.php' @@ -424,8 +426,12 @@ def add_create_instructions(parts, shard, language_code, db_name, task_tid): '`{addwiki_path} --wiki={db}`'.format( addwiki_path=addwiki_path, db=db_name)) + + add_text('Locally (in mediawiki-config repo):') + add_text('`composer manage-dblist activate {db_name}`'.format(db_name=db_name)) add_text('On deployment host:') + add_text('`scap backport #patch-id`') add_text('`scap update-interwiki-cache`') @@ -507,7 +513,7 @@ def handle_task(task_details): handler = PostCreationHandler(task_details['phid'], db_name, url, language_code, parts) handler.handle() - add_create_instructions(parts, shard, language_code, db_name, task_tid) + add_create_instructions(language_code, db_name, parts[1], visibility) add_text('\n**End of automatic output**')