Problem/Motivation
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
Issue fork automatic_updates-3368741
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
tedbowthis issue is major because it blocks #3357969: For web server dependent unattended updates run the entire life cycle in a separate process that will not be affected by hosting time limits
Comment #4
tedbowComment #5
tedbowPushed commit that fixed the test locally. will see if drupalci is fixed
Comment #6
phenaproximaLooks good if tests pass.
Comment #7
phenaproximaComment #8
phenaproximaKicking back for failure on 10.0.x. :(
Comment #9
tedbowOk think the build tests will pass now on both branches
Comment #10
phenaproximaComment #12
phenaproximaComment #13
wim leersWhy?
Why? These are not dependencies of https://github.com/drush-ops/drush/blob/12.x/composer.json?
I cannot find the answers in the code nor in this issue 😅
Comment #14
phenaproximaTo answer your questions:
Comment #15
wim leersThanks!
So I was hoping that what's written in #14 would be shipped with the code in the form of comments, because otherwise it'll be really hard to track down once this gets into core 😅 (i.e. to answer )
I am just trying to make things simpler for our future selves!
Comment #16
tedbow@Wim Leers thanks for asking these questions. Sounds at least like we need follow-up to at least add some code comments. Likely we would get these questions on our core review
Comment #18
tedbow@phenaproxima thanks for adding comments in the new MR. I think they looks good
Comment #20
phenaproxima