1
0
Fork 0
mirror of https://gitlab.wikimedia.org/ladsgroup/Phabricator-maintenance-bot synced 2024-11-24 13:02:38 +01:00

Merge pull request #63 from ZabeMath/sync-world

Use sync-world durign wiki creation
This commit is contained in:
Amir Sarabadani 2023-08-21 17:12:35 +02:00 committed by GitHub
commit cb73e2751e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -421,10 +421,6 @@ def get_db_name(wiki_spec, parts):
return db_name return db_name
def sync_file(path, summary):
return '`scap sync-file {} "{}"`'.format(path, summary)
def add_create_instructions(parts, shard, language_code, db_name, task_tid): def add_create_instructions(parts, shard, language_code, db_name, task_tid):
add_text('\n-------') add_text('\n-------')
add_text('**Step by step commands**:') add_text('**Step by step commands**:')
@ -445,20 +441,10 @@ def add_create_instructions(parts, shard, language_code, db_name, task_tid):
family=parts[1], family=parts[1],
db=db_name, db=db_name,
url='.'.join(parts))) url='.'.join(parts)))
summary = 'Creating {db_name} ({phab})'.format(
db_name=db_name, phab=task_tid)
add_text('On deployment host:') add_text('On deployment host:')
if shard != "s3": add_text('`scap sync-world "Creating {db_name} ({phab})"`'.format(
add_text(sync_file('wmf-config/db-production.php', summary)) db_name=db_name, phab=task_tid))
add_text(sync_file('dblists', summary))
add_text('`scap sync-wikiversions "{}"`'.format(summary))
if parts[1] == 'wikimedia':
add_text(sync_file('multiversion/MWMultiVersion.php', summary))
add_text(sync_file('static/images/project-logos/', summary))
add_text(sync_file('wmf-config/logos.php', summary))
add_text(sync_file('wmf-config/InitialiseSettings.php', summary))
if parts[1] != 'wikimedia':
add_text(sync_file('langlist', summary))
add_text('On mwmaint1002:') add_text('On mwmaint1002:')
add_text('`{search_path} --wiki={dbname} --cluster=all 2>&1 | tee {log}`'.format( add_text('`{search_path} --wiki={dbname} --cluster=all 2>&1 | tee {log}`'.format(