Page MenuHomePhabricator

Wikimedia\Rdbms\DBQueryError from line 1230 of /srv/mediawiki-staging/php-master/includes/libs/rdbms/database/Database.php: Error 1049: Unknown database 'testcommonswiki'
Closed, ResolvedPublic

Description

Started on the run before this

https://integration.wikimedia.org/ci/job/beta-update-databases-eqiad/82876/console

01:22:16 Command failed: echo 'testwiki'
01:22:16             /usr/local/bin/mwscript update.php                 --wiki=testwiki --doshared --quick --skip-config-validation
01:22:16 testwiki
01:22:16 MediaWiki 1.44.0-alpha Updater
01:22:16 
01:22:16 Your composer.lock file is up to date with current dependencies!
01:22:16 Going to run database updates for testwiki
01:22:16 Depending on the size of your database this may take a while!
01:22:16 ...collations up-to-date.
01:22:16 ...rd_title in table redirect already modified by patch patch-redirect-rd_title-varbinary.sql.
01:22:16 ...pl_title field does not exist in pagelinks table, skipping modify field patch.
01:22:16 ...tl_title field does not exist in templatelinks table, skipping modify field patch.
01:22:16 ...il_to in table imagelinks already modified by patch patch-imagelinks-il_to-varbinary.sql.
01:22:16 ...ll_title in table langlinks already modified by patch patch-langlinks-ll_title-varbinary.sql.
01:22:16 ...iwl_title in table iwlinks already modified by patch patch-iwlinks-iwl_title-varbinary.sql.
01:22:16 ...cat_title in table category already modified by patch patch-category-cat_title-varbinary.sql.
01:22:16 ...qc_title in table querycache already modified by patch patch-querycache-qc_title-varbinary.sql.
01:22:16 ...qcc_title in table querycachetwo already modified by patch patch-querycachetwo-qcc_title-varbinary.sql.
01:22:16 ...wl_title in table watchlist already modified by patch patch-watchlist-wl_title-varbinary.sql.
01:22:16 ...user_last_timestamp in table user_newtalk already modified by patch patch-user_newtalk-user_last_timestamp-binary.sql.
01:22:16 ...pt_title in table protected_titles already modified by patch patch-protected_titles-pt_title-varbinary.sql.
01:22:16 ...ir_type in table ipblocks_restrictions already modified by patch patch-ipblocks_restrictions-ir_type.sql.
01:22:16 ...index wl_namespace_title already set on watchlist table.
01:22:16 ...job_title in table job already modified by patch patch-job-job_title-varbinary.sql.
01:22:16 ...job_timestamp in table job already modified by patch patch-job_job_timestamp.sql.
01:22:16 ...job_token_timestamp in table job already modified by patch patch-job_job_token_timestamp.sql.
01:22:16 ...wl_notificationtimestamp in table watchlist already modified by patch patch-watchlist-wl_notificationtimestamp.sql.
01:22:16 ...role_id in table slot_roles already modified by patch patch-slot_roles-role_id.sql.
01:22:16 ...model_id in table content_models already modified by patch patch-content_models-model_id.sql.
01:22:16 ...cl_to in table categorylinks already modified by patch patch-categorylinks-cl_to-varbinary.sql.
01:22:16 ...log_title in table logging already modified by patch patch-logging-log_title-varbinary.sql.
01:22:16 ...us_timestamp in table uploadstash already modified by patch patch-uploadstash-us_timestamp.sql.
01:22:16 ...index up_property already set on user_properties table.
01:22:16 ...index site_global_key already set on sites table.
01:22:16 ...index log_type_time already set on logging table.
01:22:16 ...fa_name in table filearchive already modified by patch patch-filearchive-fa_name.sql.
01:22:16 ...oi_name in table oldimage already modified by patch patch-oldimage-oi_name-varbinary.sql.
01:22:16 ...exptime in table objectcache already modified by patch patch-objectcache-exptime-notnull.sql.
01:22:16 ...index ar_name_title_timestamp already set on archive table.
01:22:16 ...img_name in table image already modified by patch patch-image-img_name-varbinary.sql.
01:22:16 ...img_timestamp in table image already modified by patch patch-image-img_timestamp.sql.
01:22:16 ...index si_key already set on site_identifiers table.
01:22:16 ...rc_title in table recentchanges already modified by patch patch-recentchanges-rc_title-varbinary.sql.
01:22:16 ...rc_timestamp in table recentchanges already modified by patch patch-recentchanges-rc_timestamp.sql.
01:22:16 ...rc_id in table recentchanges already modified by patch patch-recentchanges-rc_id.sql.
01:22:16 ...index rc_new_name_timestamp already set on recentchanges table.
01:22:16 ...ar_title in table archive already modified by patch patch-archive-ar_title-varbinary.sql.
01:22:16 ...page_title in table page already modified by patch patch-page-page_title-varbinary.sql.
01:22:16 ...user_name in table user already modified by patch patch-user_table-updates.sql.
01:22:16 ...index rev_page_timestamp already set on revision table.
01:22:16 ...have modtoken field in objectcache table.
01:22:16 ...index oi_timestamp already set on oldimage table.
01:22:16 ...index page_name_title already set on page table.
01:22:16 ...index ct_rc_tag_id already set on change_tag table.
01:22:16 ...page_restrictions table does not contain pr_user field.
01:22:16 ...fa_id in table filearchive already modified by patch patch-filearchive-fa_id.sql.
01:22:16 ...img_major_mime in table image already modified by patch patch-image-img_major_mime-default.sql.
01:22:16 ...linktarget table already exists.
01:22:16 ...rev_page_id key doesn't exist.
01:22:16 ...pr_page in table page_restrictions already modified by patch patch-page_restrictions-pr_page.sql.
01:22:16 ...pp_page in table page_props already modified by patch patch-page_props-pp_page.sql.
01:22:16 ...ir_value in table ipblocks_restrictions already modified by patch patch-ipblocks_restrictions-ir_value.sql.
01:22:16 ...have tl_target_id field in templatelinks table.
01:22:16 ...user_autocreate_serial table already exists.
01:22:16 ...ir_ipb_id in table ipblocks_restrictions already modified by patch patch-ipblocks_restrictions-ir_ipb_id.sql.
01:22:16 ...ipblocks table does not exist, skipping modify field patch.
01:22:16 ...user_editcount in table user already modified by patch patch-user-user_editcount.sql.
01:22:16 Running MigrateRevisionActorTemp...
01:22:16 ...Update 'MigrateRevisionActorTemp' already logged as completed. Use --force to run it again.
01:22:16 done.
01:22:16 ...revision_actor_temp doesn't exist.
01:22:16 Running UpdateRestrictions...
01:22:16 Migration is not needed.
01:22:16 done.
01:22:16 ...page table does not contain page_restrictions field.
01:22:16 ...templatelinks table has already been migrated.
01:22:16 ...tl_namespace field does not exist in templatelinks table, skipping modify field patch.
01:22:16 ...templatelinks table does not contain tl_title field.
01:22:16 ...have el_to_path field in externallinks table.
01:22:16 ...have user_is_temp field in user table.
01:22:16 Running MigrateRevisionCommentTemp...
01:22:16 ...Update 'MigrateRevisionCommentTemp' already logged as completed. Use --force to run it again.
01:22:16 done.
01:22:16 ...revision_comment_temp doesn't exist.
01:22:16 Running MigrateExternallinks...
01:22:16 ...Update 'MigrateExternallinks' already logged as completed. Use --force to run it again.
01:22:16 done.
01:22:16 ...el_to field does not exist in externallinks table, skipping modify field patch.
01:22:16 ...have pl_target_id field in pagelinks table.
01:22:16 ...externallinks table does not contain el_to field.
01:22:16 Running FixInconsistentRedirects...
01:22:16 ...Update 'FixInconsistentRedirects' already logged as completed. Use --force to run it again.
01:22:16 done.
01:22:16 ...img_size in table image already modified by patch patch-image-img_size_to_bigint.sql.
01:22:16 ...fa_size in table filearchive already modified by patch patch-filearchive-fa_size_to_bigint.sql.
01:22:16 ...oi_size in table oldimage already modified by patch patch-oldimage-oi_size_to_bigint.sql.
01:22:16 ...us_size in table uploadstash already modified by patch patch-uploadstash-us_size_to_bigint.sql.
01:22:16 ...have uas_year field in user_autocreate_serial table.
01:22:16 ...block_target table already exists.
01:22:16 ...cl_collation_ext key doesn't exist.
01:22:16 Running PopulateUserIsTemp...
01:22:16 ...Update 'PopulateUserIsTemp' already logged as completed. Use --force to run it again.
01:22:16 done.
01:22:16 ...site_type key doesn't exist.
01:22:16 ...iwl_prefix_from_title key doesn't exist.
01:22:16 ...pagelinks table has already been migrated.
01:22:16 ...rev_id in table revision already modified by patch patch-revision-cleanup.sql.
01:22:16 ...rc_id in table recentchanges already modified by patch patch-recentchanges-rc_id-bigint.sql.
01:22:16 ...ct_rc_id in table change_tag already modified by patch patch-change_tag-ct_rc_id.sql.
01:22:16 Running MigrateBlocks...
01:22:16 ...Update 'MigrateBlocks' already logged as completed. Use --force to run it again.
01:22:16 done.
01:22:16 ...ipblocks doesn't exist.
01:22:16 ...pagelinks table does not contain pl_title field.
01:22:16 ...page_links_updated in table page already modified by patch patch-page-page_links_updated-noinfinite.sql.
01:22:16 ...searchindex table has already been migrated.
01:22:16 ...file table already exists.
01:22:16 ...have cl_target_id field in categorylinks table.
01:22:16 ...collation table already exists.
01:22:16 ...module_deps doesn't exist.
01:22:16 ...thread table already exists.
01:22:16 ...thread_root_2 key doesn't exist.
01:22:16 ...thread_created in table thread already modified by patch /srv/mediawiki-staging/php-master/extensions/LiquidThreads/sql/mysql/patch-thread-timestamps.sql.
01:22:16 ...ums_read_timestamp in table user_message_state already modified by patch /srv/mediawiki-staging/php-master/extensions/LiquidThreads/sql/mysql/patch-user_message_state-ums_read_timestamp.sql.
01:22:16 ...th_timestamp in table thread_history already modified by patch /srv/mediawiki-staging/php-master/extensions/LiquidThreads/sql/mysql/patch-thread_history-th_timestamp.sql.
01:22:16 ...thread_root_2 key doesn't exist.
01:22:16 ...thread_root_page key doesn't exist.
01:22:16 ...transcode table already exists.
01:22:16 ...transcode_time_error in table transcode already modified by patch /srv/mediawiki-staging/php-master/extensions/TimedMediaHandler/sql/patch-transcode-transcode_timestamp.sql.
01:22:16 ...global_block_whitelist table already exists.
01:22:16 ...gbw_address field does not exist in global_block_whitelist table, skipping modify field patch.
01:22:16 ...global_block_whitelist table does not contain gbw_address field.
01:22:16 ...global_block_whitelist table does not contain gbw_target_central_id field.
01:22:16 ...gbw_expiry in table global_block_whitelist already modified by patch /srv/mediawiki-staging/php-master/extensions/GlobalBlocking/includes/../sql/mysql/patch-global_block_whitelist-gbw_expiry-type.sql.
01:22:16 ...securepoll_entity table already exists.
01:22:16 ...el_end_date in table securepoll_elections already modified by patch /srv/mediawiki-staging/php-master/extensions/SecurePoll/sql/mysql/patch-securepoll_elections-timestamps.sql.
01:22:16 ...vote_timestamp in table securepoll_votes already modified by patch /srv/mediawiki-staging/php-master/extensions/SecurePoll/sql/mysql/patch-securepoll_votes-timestamp.sql.
01:22:16 ...st_timestamp in table securepoll_strike already modified by patch /srv/mediawiki-staging/php-master/extensions/SecurePoll/sql/mysql/patch-securepoll_strike-timestamp.sql.
01:22:16 ...cm_timestamp in table securepoll_cookie_match already modified by patch /srv/mediawiki-staging/php-master/extensions/SecurePoll/sql/mysql/patch-securepoll_cookie_match-timestamp.sql.
01:22:16 ...spmsg_entity key doesn't exist.
01:22:16 ...sppr_entity key doesn't exist.
01:22:16 ...spoofuser table already exists.
01:22:16 ...index su_normname_idx already set on spoofuser table.
01:22:16 ...table spoofuser already modified by patch /srv/mediawiki-staging/php-master/extensions/AntiSpoof/includes/../sql/mysql/patch-change-spoofuser-binary.sql.
01:22:16 ...api_feature_usage table already exists.
01:22:16 ...cn_notices table already exists.
01:22:16 ...cn_notice_regions table already exists.
01:22:16 ...have tmp_is_template field in cn_templates table.
01:22:16 ...tmp_is_template in table cn_templates already modified by patch /srv/mediawiki-staging/php-master/extensions/CentralNotice/includes/../sql/mysql/patch_template_banners_field_update.sql.
01:22:16 ...have not_type field in cn_notices table.
01:22:16 ...have notlog_begin_type field in cn_notice_log table.
01:22:16 ...not_end in table cn_notices already modified by patch /srv/mediawiki-staging/php-master/extensions/CentralNotice/includes/../sql/mysql/patch-cn_notices-timestamps.sql.
01:22:16 ...notlog_end_end in table cn_notice_log already modified by patch /srv/mediawiki-staging/php-master/extensions/CentralNotice/includes/../sql/mysql/patch-cn_notice_log-timestamps.sql.
01:22:16 ...nl_notice_id_language key doesn't exist.
01:22:16 ...np_notice_id_project key doesn't exist.
01:22:16 ...nc_notice_id_country key doesn't exist.
01:22:16 ...nr_notice_id_region key doesn't exist.
01:22:16 ...default known devices already added
01:22:16 ...abuse_filter table already exists.
01:22:16 ...index afl_ip_timestamp already set on abuse_filter_log table.
01:22:16 ...index afl_wiki_timestamp already set on abuse_filter_log table.
01:22:16 ...skipping: index filter_timestamp doesn't exist.
01:22:16 ...abuse_filter_log table does not contain afl_filter field.
01:22:16 ...have af_actor field in abuse_filter table.
01:22:16 ...have afh_actor field in abuse_filter_history table.
01:22:16 Running MediaWiki\Extension\AbuseFilter\Maintenance\MigrateActorsAF...
01:22:16 ...Update 'MediaWiki\Extension\AbuseFilter\Maintenance\MigrateActorsAF' already logged as completed. Use --force to run it again.
01:22:16 done.
01:22:16 ...abuse_filter table does not contain af_user field.
01:22:16 ...abuse_filter_history table does not contain afh_user field.
01:22:16 ...globalimagelinks table already exists.
01:22:16 ...globalimagelinks_to_wiki_page key doesn't exist.
01:22:16 ...uw_campaigns table already exists.
01:22:16 ...uw_campaigns_enabled field does not exist in uw_campaigns table, skipping modify field patch.
01:22:16 ...betafeatures_user_counts table already exists.
01:22:16 ...linter table already exists.
01:22:16 ...have linter_namespace field in linter table.
01:22:16 ...have linter_template field in linter table.
01:22:16 ...linter_params in table linter already modified by patch /srv/mediawiki-staging/php-master/extensions/Linter/sql/mysql/patch-linter-fix-params-null-definition.sql.
01:22:16 ...wikilove_log table already exists.
01:22:16 ...wll_timestamp in table wikilove_log already modified by patch /srv/mediawiki-staging/php-master/extensions/WikiLove/patches/patch-wikilove_log-cleanup.sql.
01:22:16 ...mathoid doesn't exist.
01:22:16 ...mathlatexml doesn't exist.
01:22:16 ...babel table already exists.
01:22:16 ...babel_lang in table babel already modified by patch /srv/mediawiki-staging/php-master/extensions/Babel/sql/babel-babel_lang-length-type.sql.
01:22:16 ...babel_level in table babel already modified by patch /srv/mediawiki-staging/php-master/extensions/Babel/sql/babel-babel_level-type.sql.
01:22:16 ...bounce_records table already exists.
01:22:16 ...br_timestamp in table bounce_records already modified by patch /srv/mediawiki-staging/php-master/extensions/BounceHandler/sql/mysql/patch-bounce_records-br_timestamp.sql.
01:22:16 ...translate_sections table already exists.
01:22:16 ...revtag table already exists.
01:22:16 ...translate_groupstats table already exists.
01:22:16 ...translate_reviews table already exists.
01:22:16 ...translate_groupreviews table already exists.
01:22:16 ...translate_tms table already exists.
01:22:16 ...translate_metadata table already exists.
01:22:16 ...translate_messageindex table already exists.
01:22:16 ...translate_stash table already exists.
01:22:16 ...translate_translatable_bundles table already exists.
01:22:16 ...tgr_group in table translate_groupreviews already modified by patch /srv/mediawiki-staging/php-master/extensions/Translate/sql/mysql/translate_groupreviews-alter-varbinary.sql.
01:22:16 ...tmi_key key doesn't exist.
01:22:16 ...tms_sid_lang key doesn't exist.
01:22:16 ...rt_type_page_revision key doesn't exist.
01:22:16 ...table revtag already modified by patch /srv/mediawiki-staging/php-master/extensions/Translate/sql/mysql/patch-revtag-int-to-bigint-unsigned.sql.
01:22:16 ...table translate_reviews already modified by patch /srv/mediawiki-staging/php-master/extensions/Translate/sql/mysql/patch-translate_reviews-unsigned.sql.
01:22:16 ...pagetriage_tags table already exists.
01:22:16 ...default pagetriage tags already added
01:22:16 ...ptrpt_page_tag_id key doesn't exist.
01:22:16 ...ptrp_reviewed_updated in table pagetriage_page already modified by patch /srv/mediawiki-staging/php-master/extensions/PageTriage/includes/HookHandlers/../../sql/patch-pagetriage_page-timestamps.sql.
01:22:16 ...pagetriage_log doesn't exist.
01:22:16 ...ptrp_tags_updated in table pagetriage_page already modified by patch /srv/mediawiki-staging/php-master/extensions/PageTriage/includes/HookHandlers/../../sql/mysql/patch_ptrp_tags_updated_nullable.sql.
01:22:16 ...geo_tags table already exists.
01:22:16 ...have gt_lon_int field in geo_tags table.
01:22:16 ...echo_event table already exists.
01:22:16 ...echo_push_provider table already exists.
01:22:16 ...echo_push_subscription table already exists.
01:22:16 ...echo_push_topic table already exists.
01:22:16 ...index eps_user already set on echo_push_subscription table.
01:22:16 ...echo_push_subscription_token key doesn't exist.
01:22:16 ...index eps_token already set on echo_push_subscription table.
01:22:16 ...have eps_topic field in echo_push_subscription table.
01:22:16 ...echo_event table does not contain event_variant field.
01:22:16 ...flow_revision table already exists.
01:22:16 ...ref_src_wiki in table flow_wiki_ref already modified by patch /srv/mediawiki-staging/php-master/extensions/Flow/sql/mysql/patch-increase-varchar-flow_wiki_ref-ref_src_wiki.sql.
01:22:16 ...ref_src_wiki in table flow_ext_ref already modified by patch /srv/mediawiki-staging/php-master/extensions/Flow/sql/mysql/patch-increase-varchar-flow_ext_ref-ref_src_wiki.sql.
01:22:16 ...rev_mod_timestamp in table flow_revision already modified by patch /srv/mediawiki-staging/php-master/extensions/Flow/sql/mysql/patch-flow_revision-rev_mod_timestamp.sql.
01:22:16 ...discussiontools_subscription table already exists.
01:22:16 ...discussiontools_items table already exists.
01:22:16 ...wbc_entity_usage table does not contain eu_touched field.
01:22:16 ...page_assessments_projects table already exists.
01:22:16 ...have pap_parent_id field in page_assessments_projects table.
01:22:16 ...ores_classification table already exists.
01:22:16 ...index oresc_model_class_prob already set on ores_classification table.
01:22:16 ...oresc_rev_predicted_model key doesn't exist.
01:22:16 ...nl_newsletters table already exists.
01:22:16 ...table nl_newsletters already modified by patch /srv/mediawiki-staging/php-master/extensions/Newsletter/includes/../sql/mysql/patch-drop-unique-indices.sql.
01:22:16 ...ipinfo_ip_changes doesn't exist.
01:22:16 ...urlshortcodes table already exists.
01:22:16 ...have usc_deleted field in urlshortcodes table.
01:22:16 ...globalblocks table already exists.
01:22:16 ...gb_target_central_id field exists in globalblocks table, skipping obsolete patch /srv/mediawiki-staging/php-master/extensions/GlobalBlocking/includes/../sql/mysql/patch-globalblocks-timestamps.sql.
01:22:16 ...have gb_target_central_id field in globalblocks table.
01:22:16 ...gb_by field does not exist in globalblocks table, skipping modify field patch.
01:22:16 ...globalblocks table does not contain gb_by field.
01:22:16 ...have gb_create_account field in globalblocks table.
01:22:16 ...have gb_enable_autoblock field in globalblocks table.
01:22:16 ...have gb_autoblock_parent_id field in globalblocks table.
01:22:16 ...index gb_address_autoblock_parent_id already set on globalblocks table.
01:22:16 Running MediaWiki\Extension\GlobalBlocking\Maintenance\UpdateAutoBlockParentIdColumn...
01:22:16 ...Update 'MediaWiki\Extension\GlobalBlocking\Maintenance\UpdateAutoBlockParentIdColumn' already logged as completed. Use --force to run it again.
01:22:16 done.
01:22:16 ...gb_autoblock_parent_id in table globalblocks already has the required properties.
01:22:16 ...globaluser table already exists.
01:22:16 Running MediaWiki\Extension\CentralAuth\Maintenance\MigrateGuSalt...
01:22:16 ...Update 'MigrateGuSalt' already logged as completed. Use --force to run it again.
01:22:16 done.
01:22:16 ...have rq_type field in renameuser_queue table.
01:22:16 ...globaluser table does not contain gu_salt field.
01:22:16 ...translate_message_group_subscriptions table already exists.
01:22:16 ...translate_cache table already exists.
01:22:16 ...tc_key in table translate_cache already modified by patch /srv/mediawiki-staging/php-master/extensions/Translate/sql/mysql/translate_cache-alter-varbinary.sql.
01:22:16 ...translate_message_group_subscriptions table does not contain tmgs_subscription_id field.
01:22:16 ...loginnotify_seen_net table already exists.
01:22:16 Wikimedia\Rdbms\DBQueryError from line 1230 of /srv/mediawiki-staging/php-master/includes/libs/rdbms/database/Database.php: Error 1049: Unknown database 'testcommonswiki'
01:22:16 Function: Wikimedia\Rdbms\DatabaseMySQL::doSelectDomain
01:22:16 Query: USE `testcommonswiki`
01:22:16 
01:22:16 #0 /srv/mediawiki-staging/php-master/includes/libs/rdbms/database/Database.php(1214): Wikimedia\Rdbms\Database->getQueryException('Unknown databas...', 1049, 'USE `testcommon...', 'Wikimedia\\Rdbms...')
01:22:16 #1 /srv/mediawiki-staging/php-master/includes/libs/rdbms/database/Database.php(1188): Wikimedia\Rdbms\Database->getQueryExceptionAndLog('Unknown databas...', 1049, 'USE `testcommon...', 'Wikimedia\\Rdbms...')
01:22:16 #2 /srv/mediawiki-staging/php-master/includes/libs/rdbms/database/DatabaseMySQL.php(204): Wikimedia\Rdbms\Database->reportQueryError('Unknown databas...', 1049, 'USE `testcommon...', 'Wikimedia\\Rdbms...')
01:22:16 #3 /srv/mediawiki-staging/php-master/includes/libs/rdbms/database/Database.php(1529): Wikimedia\Rdbms\DatabaseMySQL->doSelectDomain(Object(Wikimedia\Rdbms\DatabaseDomain))
01:22:16 #4 /srv/mediawiki-staging/php-master/includes/libs/rdbms/loadbalancer/LoadBalancer.php(906): Wikimedia\Rdbms\Database->selectDomain(Object(Wikimedia\Rdbms\DatabaseDomain))
01:22:16 #5 /srv/mediawiki-staging/php-master/includes/libs/rdbms/loadbalancer/LoadBalancer.php(796): Wikimedia\Rdbms\LoadBalancer->reuseOrOpenConnectionForNewRef(0, Object(Wikimedia\Rdbms\DatabaseDomain), 0)
01:22:16 #6 /srv/mediawiki-staging/php-master/includes/libs/rdbms/loadbalancer/LoadBalancer.php(788): Wikimedia\Rdbms\LoadBalancer->getServerConnection(0, 'testcommonswiki', 0)
01:22:16 #7 /srv/mediawiki-staging/php-master/includes/libs/rdbms/database/DBConnRef.php(111): Wikimedia\Rdbms\LoadBalancer->getConnectionInternal(-2, Array, 'testcommonswiki', 0)
01:22:16 #8 /srv/mediawiki-staging/php-master/includes/libs/rdbms/database/DBConnRef.php(125): Wikimedia\Rdbms\DBConnRef->ensureConnection()
01:22:16 #9 /srv/mediawiki-staging/php-master/includes/libs/rdbms/database/DBConnRef.php(401): Wikimedia\Rdbms\DBConnRef->__call('tableExists', Array)
01:22:16 #10 /srv/mediawiki-staging/php-master/includes/installer/DatabaseUpdater.php(853): Wikimedia\Rdbms\DBConnRef->tableExists('globaljsonlinks', 'MediaWiki\\Insta...')
01:22:16 #11 /srv/mediawiki-staging/php-master/includes/installer/DatabaseUpdater.php(599): MediaWiki\Installer\DatabaseUpdater->addTable('globaljsonlinks', '/srv/mediawiki-...', true)
01:22:16 #12 /srv/mediawiki-staging/php-master/includes/installer/DatabaseUpdater.php(557): MediaWiki\Installer\DatabaseUpdater->runUpdates(Array, true, true)
01:22:16 #13 /srv/mediawiki-staging/php-master/maintenance/update.php(197): MediaWiki\Installer\DatabaseUpdater->doUpdates(Array)
01:22:16 #14 /srv/mediawiki-staging/php-master/maintenance/includes/MaintenanceRunner.php(695): UpdateMediaWiki->execute()
01:22:16 #15 /srv/mediawiki-staging/php-master/maintenance/run.php(51): MediaWiki\Maintenance\MaintenanceRunner->run()
01:22:16 #16 /srv/mediawiki-staging/multiversion/MWScript.php(156): require_once('/srv/mediawiki-...')
01:22:16 #17 {main}

Event Timeline

Reedy triaged this task as High priority.Feb 27 2025, 1:25 AM
Reedy updated the task description. (Show Details)

Almost certainly caused by https://gerrit.wikimedia.org/r/c/mediawiki/extensions/JsonConfig/+/1111690 in conjunction with

if ( $wmgUseJsonConfig ) {
	wfLoadExtension( 'JsonConfig' );

	if ( $wgDBname === 'testwiki' || $wgDBname === 'testcommonswiki' ) {
		$jsonWiki = 'testcommonswiki';
		// T379199 - temporary deployment of tracking tables on testcommonswiki
		$wgTrackGlobalJsonLinks = true;
		// cf T385917 - this test table is deprecated and won't get the schema update
		$wgTrackGlobalJsonLinksNamespace = false;
		$wgVirtualDomainsMapping['virtual-globaljsonlinks'] = [
			'db' => 'testcommonswiki'
		];
	}

Added in rOMWC43992e52f032: DB config for testcommonswiki deployment for Charts

For testwiki (in production, and beta), it's trying to set a virtual domain wiki to a database that doesn't exist!

^ In some way or another, there should potentially be some guard of $wmgRealm === 'production' around probably the virtual domain?

Change #1123067 had a related patch set uploaded (by Reedy; author: Reedy):

[operations/mediawiki-config@master] CommonSettings: Guard JsonConfig VirtualDomainMapping on realm

https://gerrit.wikimedia.org/r/1123067

Change #1123067 merged by jenkins-bot:

[operations/mediawiki-config@master] CommonSettings: Guard JsonConfig VirtualDomainMapping on realm

https://gerrit.wikimedia.org/r/1123067

Mentioned in SAL (#wikimedia-operations) [2025-02-27T01:48:46Z] <reedy@deploy2002> Synchronized wmf-config/CommonSettings.php: T387417 (duration: 09m 02s)

Reedy claimed this task.

To clarify -- are there "testwiki" wikis in different realms that don't both contain "testcommonswiki" wikis?

(I may have been misinformed about how beta wikis are named/placed?)

There should be a separate setup for production and beta for this, although it's being merged together in a config patch: https://gerrit.wikimedia.org/r/c/operations/mediawiki-config/+/1122711 so if that's still being merged I don't see why a beta site would be seeing this config in CommonSettings.php?

Am I wrong and CommonSettings.php is actually executed for every beta site, and that production sites and beta sites can exist with the same wiki database names, causing the beta sites to take settings meant for production only?

To clarify -- are there "testwiki" wikis in different realms that don't both contain "testcommonswiki" wikis?

Yeah, so:

https://noc.wikimedia.org/conf/highlight.php?file=dblists/all-labs.dblist vs https://noc.wikimedia.org/conf/highlight.php?file=dblists/all.dblist

Not all the wikis that exist in WMF production doesn't exist in labs. 50 in labs/beta, over a thousand in prod.

Wikis in beta will have the same dbname, because they're designed to (mostly) emulate their production counterpart. Therefore it is mostly expected that config set to one will affect the other.

I don't believe any wiki exists in labs/beta only...

There should be a separate setup for production and beta for this, although it's being merged together in a config patch: https://gerrit.wikimedia.org/r/c/operations/mediawiki-config/+/1122711 so if that's still being merged I don't see why a beta site would be seeing this config in CommonSettings.php?

Am I wrong and CommonSettings.php is actually executed for every beta site, and that production sites and beta sites can exist with the same wiki database names, causing the beta sites to take settings meant for production only?

As is documented at the top of https://noc.wikimedia.org/conf/highlight.php?file=CommonSettings-labs.php:

# This file holds common overrides specific to Beta Cluster.
# For per-wiki overrides, see InitialiseSettings-labs.php.
#
# This for BETA and MUST NOT be loaded for production.
#
# Effective load order:
# - multiversion
# - mediawiki/DefaultSettings.php
# - wmf-config/*Services.php
# - wmf-config/InitialiseSettings.php
# - wmf-config/InitialiseSettings-labs.php
# - wmf-config/CommonSettings.php
# - wmf-config/CommonSettings-labs.php [THIS FILE]
#
# Included from: wmf-config/CommonSettings.php.
#

If something is the same for both, it can and does exist in CommonSettings.php.

Which is why CommonSettings-labs.php doesn't have a wfLoadExtension( 'JsonConfig' );, for example:

	if ( $wmgUseJsonConfig ) {
		// T374746 cache invalidation issues for globaljsonlinks;
		// globaljsonlinks* shared tables are not live on beta cluster
		// as of 2024-11-14.
		// Override the enabling for testwiki and testcommonswiki
		// so their beta equivalents can run without breaking links
		// updates and cache invalidation propagation.
		$wgTrackGlobalJsonLinks = false;
		$wgTrackGlobalJsonLinksNamespace = false;
	}

But CommonSettings.php does:

if ( $wmgUseJsonConfig ) {
	wfLoadExtension( 'JsonConfig' );

	if ( $wgDBname === 'testwiki' || $wgDBname === 'testcommonswiki' ) {
		$jsonWiki = 'testcommonswiki';
		// T379199 - temporary deployment of tracking tables on testcommonswiki
		$wgTrackGlobalJsonLinks = true;
		// cf T385917 - this test table is deprecated and won't get the schema update
		$wgTrackGlobalJsonLinksNamespace = false;

		// T387417 - beta has no testcommonswiki
		if ( $wmgRealm === 'production' ) {
			$wgVirtualDomainsMapping['virtual-globaljsonlinks'] = [
				'db' => 'testcommonswiki'
			];
		}
	} else {
		$jsonWiki = 'commonswiki';
		// T379689 - deployment to Commons for pages + x1 for globaljsonlinks
		$wgTrackGlobalJsonLinks = true;
		// T385917 - after deployment of patch-gjl_namespace_text.sql on x1.commonswiki,
		// set this to true to enable use of the new field.
		$wgTrackGlobalJsonLinksNamespace = false;
		$wgVirtualDomainsMapping['virtual-globaljsonlinks'] = [
			'cluster' => 'extension1',
			'db' => 'commonswiki'
		];
	}

	if ( $wmgUseGraphWithJsonNamespace ) {
		$wgJsonConfigModels['Json.JsonConfig'] = null;
		$wgJsonConfigs['Json.JsonConfig'] = [
			'namespace' => 486,
			'nsName' => 'Data',
			'isLocal' => true,
			'pattern' => '/^Json:./',
			'cacheKey' => $jsonWiki,
		];
	}

	unset( $jsonWiki );
}

You'll see a few other references to $wmgRealm as part of conditionals in CommonSettings.php. In some cases these should really be moved to InitialiseSettings/InitialiseSettings-labs as appropriate, but that's another issue.


But basically, until the patch that started using the virtual domains was merged, the code in CommonSettings.php was a no-op.

The next run after deploying my patch worked:

[02:31:20] <wmf-insecte> Yippee, build fixed!
[02:31:20] <wmf-insecte> Project beta-update-databases-eqiad build #82877: FIXED in 11 min: https://integration.wikimedia.org/ci/job/beta-update-databases-eqiad/82877/