hashar added a subscriber: hashar.
hashar added a comment.

To test extensions we load them from their PHP entry point such as foo/foo.php.

Wikidata is a bit specific since it has several components and originally had 
no entry point (iirc). So there a hack to detect which Jenkins job is running 
and use different settings:

So it looks at the JOB_NAME being 'mwext-Wikidata-testextension':

  if ( PHP_SAPI === 'cli' && strpos( getenv( 'JOB_NAME' ), 
'mwext-Wikidata-testextension' ) !== false ) {
      // in future, run as non-experimental
      if ( !defined( 'WB_EXPERIMENTAL_FEATURES' ) || !WB_EXPERIMENTAL_FEATURES 
) {
          define( 'WB_EXPERIMENTAL_FEATURES', true );
      }
  
      $wmgUseWikibaseRepo = true;
      $wmgUseWikibaseClient = true;
  }

The two $wmg settings loads different components:

  if ( !empty( $wmgUseWikibaseRepo ) ) {
      include_once "$wgWikidataBaseDir/extensions/Wikibase/repo/Wikibase.php";
      include_once "$wgWikidataBaseDir/extensions/Wikidata.org/WikidataOrg.php";
      include_once 
"$wgWikidataBaseDir/extensions/PropertySuggester/PropertySuggester.php";
  }
  
  if ( !empty( $wmgUseWikibaseClient ) ) {
      include_once 
"$wgWikidataBaseDir/extensions/Wikibase/client/WikibaseClient.php";
  }

So by changing the job name, those includes are not realized..

Note: Wikibase has a similar hack though based on $wgWikimediaJenkinsCI.


TASK DETAIL
  https://phabricator.wikimedia.org/T95897

REPLY HANDLER ACTIONS
  Reply to comment or attach files, or !close, !claim, !unsubscribe or !assign 
<username>.

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: hashar
Cc: hashar, Legoktm, JanZerebecki, Aklapper, Wikidata-bugs, aude



_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to