-
Notifications
You must be signed in to change notification settings - Fork 19
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
Tests failing with composer 2 #152
Comments
Me too @andybroomfield I've been trying to untangle the dependencies to get it working with composer 2, no joy as yet. |
Guessing it's this line if we want to install composer 1.x https://github.com/localgovdrupal/drupal-container/blob/master/Dockerfile#L56 |
I tried this, it didn't work: |
This issue was fixed here localgovdrupal/drupal-container#10 by installing Composer v1 in to the Docker container and using this to run any composer operations. The problem with this solution is that we need to update the Github CI configuration for all repos. Unfortunately, I'm not aware of a way to fix this problem without making some changes to all the GitHub Ci config. @Adnan-cds points to some workarounds here: actions/runner-images#1924, but they will still need changes to all Github CI config files. The advantage of using the version installed in the Docker container used to run the tests is we can use Composer 2 later on without having to make changes to all the Github CI later on: https://github.com/localgovdrupal/drupal-container/blob/847d8773550bcdb3dea22b9037f536ff5563fcd7/Dockerfile#L56 The disadvantage being is maybe quite a bit slower, although if this is a concern we should benchmark this. |
I have tried to compile a list below for the three available options:
So clearly, the one from the build VM performs best. This leaves us with two future options:
|
If this is only an issue with drupal/console then I vote to drop it until it supports Composer v2. |
Apart from drupal/console, we also need to tell the localgov_project's composer.json to use "drupal/core*: ^8.9.7" but that should be easy. I was thinking perhaps we can make drupal/console a suggested package of localgovdrupal/localgov rather than a required one. |
For reference, this is the issue that will add Composer 2 support to Drupal Console hechoendrupal/drupal-console-extend-plugin#23 and this is the pull request hechoendrupal/drupal-console-extend-plugin#25 |
Following your suggestions @stephen-cox and @Adnan-cds - I've tested removing drupal/console and upping core to 8.9. Here's a couple of PRs to help test it: #153 What do you think? |
Oooh - this is good: https://www.drupal.org/docs/develop/using-composer/preparing-your-site-for-composer-2 |
Useful link. Thanks a lot. We are using two Composer plugins from the given list AFAIK:
So looks like we should be good :) |
I am having that "Back on the road feeling": https://github.com/localgovdrupal/localgov/runs/1354189654 :D The "Create LocalGovDrupal project" task has finished in 1min 15sec under Composer 2 which is neither an improvement nor a loss. |
Is there a way we can pin this back to use composer 1 for now?
Getting errors when testing pull requests into localgov_services.
The tests exit after 30 seconds.
The text was updated successfully, but these errors were encountered: