1
0
Fork 0
mirror of https://gitlab.wikimedia.org/ladsgroup/Phabricator-maintenance-bot synced 2025-01-03 00:10:58 +01:00

new_wikis_handler: Adopt the checklist to make config patches

Reduces the chance of typos and oopsies
This commit is contained in:
Amir Sarabadani 2024-12-13 19:26:30 +01:00
parent eaf75ce919
commit 3af446ee71

View file

@ -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**')