acquia / blt

Acquia's toolset for automating Drupal 8 and 9 development, testing, and deployment.
https://docs.acquia.com/blt/
GNU General Public License v2.0
442 stars 394 forks source link

DX-5187: Fatal error: Uncaught Error: Call to undefined method Composer\XdebugHandler\XdebugHandler::isXdebugActive() #4625

Closed fiasco closed 1 year ago

fiasco commented 1 year ago

This bug was picked up in Code Studio which doesn't appear to have Xdebug present. The Inspector for Robo doesn't correctly check if the composer XdebugHandler class is present.

Describe the bug

00:21
[Code Studio AutoDevOps] Creating artifact and pushing to Cloud 
00:01
Fatal error: Uncaught Error: Call to undefined method Composer\XdebugHandler\XdebugHandler::isXdebugActive() in /builds/josh.waihi/Acquia-Drutiny-Repository/vendor/acquia/blt/src/Robo/Inspector/Inspector.php:603
Stack trace:
#0 /builds/josh.waihi/Acquia-Drutiny-Repository/vendor/acquia/blt/src/Robo/Inspector/Inspector.php([58](https://code.acquia.com/josh.waihi/Acquia-Drutiny-Repository/-/jobs/199848#L58)0): Acquia\Blt\Robo\Inspector\Inspector->warnIfXdebugActive()
#1 /builds/josh.waihi/Acquia-Drutiny-Repository/vendor/acquia/blt/src/Robo/Hooks/CommandEventHook.php(43): Acquia\Blt\Robo\Inspector\Inspector->issueEnvironmentWarnings()
#2 /builds/josh.waihi/Acquia-Drutiny-Repository/vendor/consolidation/annotated-command/src/Hooks/Dispatchers/CommandEventHookDispatcher.php(40): Acquia\Blt\Robo\Hooks\CommandEventHook->issueWarnings()
#3 /builds/josh.waihi/Acquia-Drutiny-Repository/vendor/consolidation/annotated-command/src/Hooks/HookManager.php(424): Consolidation\AnnotatedCommand\Hooks\Dispatchers\CommandEventHookDispatcher->callCommandEventHooks()
#4 /builds/josh.waihi/Acquia-Drutiny-Repository/vendor/symfony/event-dispatcher/EventDispatcher.php(2[64](https://code.acquia.com/josh.waihi/Acquia-Drutiny-Repository/-/jobs/199848#L64)): Consolidation\AnnotatedCommand\Hooks\HookManager->callCommandEventHooks()
#5 /builds/josh.waihi/Acquia-Drutiny-Repository/vendor/symfony/event-dispatcher/EventDispatcher.php(239): Symfony\Component\EventDispatcher\EventDispatcher->doDispatch()
#6 /builds/josh.waihi/Acquia-Drutiny-Repository/vendor/symfony/event-dispatcher/EventDispatcher.php(73): Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
#7 /builds/josh.waihi/Acquia-Drutiny-Repository/vendor/symfony/console/Application.php(1036): Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
#8 /builds/josh.waihi/Acquia-Drutiny-Repository/vendor/acquia/blt/src/Robo/Application.php(31): Symfony\Component\Console\Application->doRunCommand()
#9 /builds/josh.waihi/Acquia-Drutiny-Repository/vendor/symfony/console/Application.php(275): Acquia\Blt\Robo\Application->doRunCommand()
#10 /builds/josh.waihi/Acquia-Drutiny-Repository/vendor/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun()
#11 /builds/josh.waihi/Acquia-Drutiny-Repository/vendor/consolidation/robo/src/Runner.php(282): Symfony\Component\Console\Application->run()
#12 /builds/josh.waihi/Acquia-Drutiny-Repository/vendor/acquia/blt/src/Robo/Blt.php(264): Robo\Runner->run()

To Reproduce Run a BLT (13.5.3) build through Code Studio to deploy to Acquia Cloud. CI/CD fails at deploy step.

Expected behavior Deploy successfully occurs.

Detailed error output See above.

BLT doctor output Cannot acquire since it is inside the CI/CD env.

System information

fiasco commented 1 year ago

This function is present in the latest version of composer/xdebughandler which suggests Code Studio isn't up to date.

mikemadison13 commented 1 year ago

@fiasco are you running the stock code studio build, or did you end up customizing yours? i haven't seen this failure.

mikemadison13 commented 1 year ago

this was introduced in #4601