Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modernise CI #105

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open

Modernise CI #105

wants to merge 21 commits into from

Conversation

paladox
Copy link
Contributor

@paladox paladox commented Jan 5, 2025

  • Adds CI for MW 1.43
  • Uses gesinn-it-pub/docker-compose-ci for CI
  • Runs linting, phpcs and more
  • Fixes some phpcs errors - although not all.

Fixes #103

* Adds CI for MW 1.43
* Uses gesinn-it-pub/docker-compose-ci for CI
* Runs linting, phpcs and more
* Fixes some phpcs errors - although not all.

Fixes #103
@paladox
Copy link
Contributor Author

paladox commented Jan 5, 2025

@gesinn-it-gea / @gesinn-it-ilm requires gesinn-it-pub/docker-compose-ci#9 to be merged.

@paladox
Copy link
Contributor Author

paladox commented Jan 5, 2025

Hmm even with that it is still throwing "Fatal error: Uncaught ExtensionDependencyError: SemanticScribunto requires Scribunto to be installed."

@paladox
Copy link
Contributor Author

paladox commented Jan 5, 2025

Oh I missed a few places in gesinn-it-pub/docker-compose-ci#9. Although I think it has to be published for things to take affect? idk.

@paladox
Copy link
Contributor Author

paladox commented Jan 5, 2025

Have no idea how to fix:

[e716f232d4cd70a1ff19f141] [no req]   MediaWiki\Extension\Scribunto\ScribuntoException: Lua error: Internal error: The interpreter has terminated with signal "5".
Backtrace:
from /var/www/html/extensions/Scribunto/includes/ScribuntoEngineBase.php(147)
#0 /var/www/html/extensions/Scribunto/includes/engines/LuaStandalone/LuaStandaloneInterpreter.php(675): MediaWiki\Extension\Scribunto\ScribuntoEngineBase->newException(string, array)
#1 /var/www/html/extensions/Scribunto/includes/engines/LuaStandalone/LuaStandaloneInterpreter.php(485): MediaWiki\Extension\Scribunto\Engines\LuaStandalone\LuaStandaloneInterpreter->handleIOError()
#2 /var/www/html/extensions/Scribunto/includes/engines/LuaStandalone/LuaStandaloneInterpreter.php(440): MediaWiki\Extension\Scribunto\Engines\LuaStandalone\LuaStandaloneInterpreter->receiveMessage()
#3 /var/www/html/extensions/Scribunto/includes/engines/LuaStandalone/LuaStandaloneInterpreter.php(326): MediaWiki\Extension\Scribunto\Engines\LuaStandalone\LuaStandaloneInterpreter->dispatch(array)
#4 /var/www/html/extensions/Scribunto/includes/engines/LuaCommon/LuaEngine.php(187): MediaWiki\Extension\Scribunto\Engines\LuaStandalone\LuaStandaloneInterpreter->registerLibrary(string, array)
#5 /var/www/html/extensions/Scribunto/includes/engines/LuaCommon/LuaEngine.php(156): Scribunto_LuaEngine->registerInterface(string, array)
#6 /var/www/html/extensions/Scribunto/includes/engines/LuaStandalone/LuaStandaloneEngine.php(23): Scribunto_LuaEngine->load()
#7 /var/www/html/extensions/Scribunto/includes/engines/LuaCommon/LuaEngine.php(235): MediaWiki\Extension\Scribunto\Engines\LuaStandalone\LuaStandaloneEngine->load()
#8 /var/www/html/extensions/Scribunto/tests/phpunit/engines/LuaCommon/LuaEngineTestHelper.php(69): Scribunto_LuaEngine->getInterpreter()
#9 /var/www/html/extensions/Scribunto/tests/phpunit/engines/LuaCommon/LuaEngineTestBase.php(72): Scribunto_LuaEngineTestBase::makeSuite(string)
#10 [internal function]: Scribunto_LuaEngineTestBase::suite(string)
#11 /var/www/html/vendor/phpunit/phpunit/src/Framework/TestSuite.php(462): ReflectionMethod->invoke(NULL, string)
#12 /var/www/html/vendor/phpunit/phpunit/src/Framework/TestSuite.php(481): PHPUnit\Framework\TestSuite->addTestFile(string)
#13 /var/www/html/vendor/phpunit/phpunit/src/Util/Configuration.php(1034): PHPUnit\Framework\TestSuite->addTestFiles(array)
#14 /var/www/html/vendor/phpunit/phpunit/src/Util/Configuration.php(910): PHPUnit\Util\Configuration->getTestSuite(DOMElement, array)
#15 /var/www/html/vendor/phpunit/phpunit/src/TextUI/Command.php(973): PHPUnit\Util\Configuration->getTestSuiteConfiguration(string)
#16 /var/www/html/vendor/phpunit/phpunit/src/TextUI/Command.php(203): PHPUnit\TextUI\Command->handleArguments(array)
#17 /var/www/html/tests/phpunit/phpunit.php(101): PHPUnit\TextUI\Command->run(array, boolean)
#18 /var/www/html/tests/phpunit/phpunit.php(153): PHPUnitMaintClass->execute()
#19 {main}

@paladox
Copy link
Contributor Author

paladox commented Jan 5, 2025

@gesinn-it-ilm @gesinn-it-gea not sure how to resolve ^? Unless it doesn't work on my Mac in docker. (I have a M1 Mac).

The error in GitHub ci is because the gesinn-it-pub/docker-compose-ci#9 needs merging. For some reason it doesn't use the current build checkout.

@paladox
Copy link
Contributor Author

paladox commented Jan 7, 2025

MediaWiki has been successfully installed. You can now visit <http://localhost:8080> to view your wiki. If you have questions, check out our frequently asked questions list: <https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ> or use one of the support forums linked on that page.
Fatal error: Uncaught ExtensionDependencyError: SemanticScribunto requires Scribunto to be installed.
 in /var/www/html/includes/registration/ExtensionRegistry.php:432
Stack trace:
#0 /var/www/html/includes/registration/ExtensionRegistry.php(276): ExtensionRegistry->readFromQueue(Array)
#1 /var/www/html/includes/Setup.php(278): ExtensionRegistry->loadFromQueue()
#2 /var/www/html/maintenance/doMaintenance.php(83): require_once('/var/www/html/i...')
#3 /var/www/html/maintenance/update.php(319): require_once('/var/www/html/m...')
#4 {main}
  thrown in /var/www/html/includes/registration/ExtensionRegistry.php on line 432
make: *** [build/Makefile:100: .install] Error 255

is still happening. I dunno if there's suppose to be a deployment of that change (CI?)

@gesinn-it-gea
Copy link
Member

For another repo I implemented a workflow to schedule automatic updates of docker-compose-ci: https://github.com/gesinn-it-pub/IDProvider/blob/master/.github/workflows/update-submodules.yml

If you like this approach, you can add it to other repos as well. Instead of running this only on one day, we can run it daily

@gesinn-it-gea
Copy link
Member

I'm not using SemanticScribuntu. Maybe the way it is installed by docker-compose-ci needs to be changed (e.g. using composer to get the deps). Or make the deps being installable via docker-compose-ci

@paladox
Copy link
Contributor Author

paladox commented Jan 8, 2025

I'm not using SemanticScribuntu. Maybe the way it is installed by docker-compose-ci needs to be changed (e.g. using composer to get the deps). Or make the deps being installable via docker-compose-ci

I’m not sure. It works locally hence the error about lua returning that status number.

@paladox
Copy link
Contributor Author

paladox commented Jan 8, 2025

I see that REL1_39 isn’t being supplied to where it fetches Scribunto which would be a problem.

@paladox
Copy link
Contributor Author

paladox commented Jan 8, 2025

For some reason phpunit is now in an infinite loop. I don't know why.

@paladox
Copy link
Contributor Author

paladox commented Jan 8, 2025

@gesinn-it-ilm dunno how we fix:

1) SMW\Scribunto\Integration\JSONScript\SemanticScribuntoJsonTestCaseScriptRunnerTest::testCaseFile with data set "ask-001.json" ('/var/www/html/extensions/Sema...1.json')
RuntimeException: Can't create user on real database
/var/www/html/tests/phpunit/includes/TestUser.php:35
/var/www/html/tests/phpunit/includes/TestUser.php:42
/var/www/html/tests/phpunit/includes/TestUserRegistry.php:82
/var/www/html/tests/phpunit/MediaWikiIntegrationTestCase.php:276
/var/www/html/extensions/SemanticMediaWiki/tests/phpunit/SMWIntegrationTestCase.php:84
/var/www/html/extensions/SemanticMediaWiki/tests/phpunit/JSONScriptTestCaseRunner.php:67
/var/www/html/extensions/SemanticMediaWiki/tests/phpunit/JSONScriptServicesTestCaseRunner.php:63
/var/www/html/extensions/SemanticScribunto/tests/phpunit/Integration/JSONScript/SemanticScribuntoJsonTestCaseScriptRunnerTest.php:33
/var/www/html/extensions/SemanticMediaWiki/tests/phpunit/SMWIntegrationTestCase.php:203

Seems related to your change switching to MW integration class.

Also dunno how we fix:

7) SMW\Scribunto\Integration\JSONScript\SemanticScribuntoJsonTestCaseScriptRunnerTest::testCaseFile with data set "info-001.json" ('/var/www/html/extensions/Sema...1.json')
RuntimeException: Tracking is already enabled
/var/www/html/includes/libs/rdbms/ChangedTablesTracker.php:29
/var/www/html/tests/phpunit/MediaWikiIntegrationTestCase.php:694
/var/www/html/tests/phpunit/MediaWikiIntegrationTestCase.php:624
/var/www/html/extensions/SemanticMediaWiki/tests/phpunit/SMWIntegrationTestCase.php:203

@paladox
Copy link
Contributor Author

paladox commented Jan 8, 2025

@paladox
Copy link
Contributor Author

paladox commented Jan 8, 2025

SemanticMediaWiki/SemanticMediaWiki@3f6d154#diff-04a0eaaa6a686fdb4e98911c7ce0f7f294f06950dcb3839cabaac007ba86f3ccL29

Looks like we re-added it under the new name cc @gesinn-it-gea / @gesinn-it-ilm . I guess things need to be fixed to conform to MW Integration test class?

@gesinn-it-gea
Copy link
Member

@paladox
Copy link
Contributor Author

paladox commented Jan 8, 2025

@gesinn-it-gea do you mean changing to JSONScriptTestCaseRunnerTest? Not too sure that will help much here. We can try it.

@paladox
Copy link
Contributor Author

paladox commented Jan 8, 2025

Doesn't fix the problem. MW 1.39 it's just a infinite recursion and in mw 1.42 it at least show the errors (the same one).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move repo to use gesinn-it-pub/docker-compose-ci for CI
2 participants