Drush build test symlinks Drush, and does not install any of its dependencies

Created on 22 June 2023, over 1 year ago
Updated 5 July 2023, over 1 year ago

Problem/Motivation

Working on πŸ“Œ For web server dependent unattended updates run the entire life cycle in a separate process that will not be affected by hosting time limits Fixed

I found that \Drupal\Tests\automatic_updates\Build\CoreUpdateTest::testDrushUpdate requires drush via
$this->runComposer('composer require drush/drush', 'project');
Since it doesn't use "COMPOSER_MIRROR_PATH_REPOS=1" it actually symlinks drush. Looking that project made for the build test using $destroyBuild = FALSE, I noticed that none of drush's dependencies are actually in the vendor directory.

If I change to use $this->runComposer('COMPOSER_MIRROR_PATH_REPOS=1 composer require drush/drush', 'project');

The testDrushUpdate fails with

Fatal error: Uncaught Error: Class "Consolidation\Config\Util\ConfigOverlay" not found in /private/tmp/build_workspace_b88551db587cca7e09d6b4b3f191d747eW80mu/project/vendor/drush/drush/src/Config/DrushConfig.php:17

This is one of drush's dependencies and is not vendor directory for the build test project.

I assume it is only working now because somehow symlinking allows loading classes from the actual core clone

Steps to reproduce

Proposed resolution

Don't symlink the drush package in the build test and make sure it's dependencies are also present

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States tedbow Ithaca, NY, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024