-
Notifications
You must be signed in to change notification settings - Fork 71
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
Upgrade Composer to Composer 2 #3303
Comments
Pinned to Composer now in (internal) https://github.com/department-of-veterans-affairs/devops/pull/7853. |
All of these Composer plugins will need to have their dependency on composer-plugin-api updated to 2.0 and refactored to use it in a PR on those upstreams. We can either wait for this or create the issues ourselves.
|
@cweagans released a Composer 2 compatible version of composer-patches as well, 1.7.0 > cweagans/composer-patches#332 (comment) > https://github.com/cweagans/composer-patches/releases/tag/1.7.0. |
drupal-composer/drupal-scaffold is deprecated and it says to use https://github.com/drupal/core-composer-scaffold now. |
We are likely going to need to make a PR to https://packagist.org/packages/mouf/nodejs-installer as it is locked at composer-plugin-api 1.0.0 and hasn't seen an update for 2 years > https://github.com/thecodingmachine/nodejs-installer/blob/1.0/composer.json#L17. Update: I created an upstream issue for the nodejs-installer. thecodingmachine/nodejs-installer#41 |
oomphinc/composer-installers-extender does have a 2.0.0 release just made https://github.com/oomphinc/composer-installers-extender/blob/2.0.0/composer.json |
yaml-tests will need to be updated to yaml-tasks (was in progress in #1303) as well, PR will need to be made > https://github.com/opendevshop/devshop/blob/1.x/src/DevShop/Component/YamlTasks/composer.json#L20 |
drupal-console-extend-plugin has a PR ready to merge for an update, tested and working. hechoendrupal/drupal-console-extend-plugin#23 (comment) |
So in summary the two that require actual work are:
I added all of these comments as task items and made this an epic, don't really know if each should be it's own story, but some of them definitely could be their own. |
I created Composer v2 support PR for nodejs-installer and added it to this epic. |
I created Create PR with composer2 support for yaml-tasks and added it to this epic. |
nodejs-installer now supports composer2. |
W00t! Thank you @acrollet!! I assigned this to you just because you did some of the work. It is not meant to assign all the work to you though. |
compser2 support has been added to yaml-tasks in 6c7d645336115fd8122126b6dbb1eeb210c5c5f9 |
(moved to #4109 (comment)) |
Thanks for digging into this @acrollet. One other negative to add is that updating the library requires changes outside of our dependency management system (composer), which isn't a deal breaker but was a nice convenience. Another is that we will also need to refactor in the way we pull in the .env file into the environment for tests to use. |
Added to the summary above.
Hmm, can you expand on this? |
Oh nice, would be good to add that to the Positives! |
Seeing these warnings on a local composer install. Our composer.json has "optimize_autoloader: true` in it so this is running on all environments and will need to be addressed.
|
Baseline for composer v1 install, run on tugboat. first run:
second run:
third run:
|
composer v2 install, run on tugboat. first run:
second run:
third run:
Not a huge improvement, but every run was better than composer 1. |
The download of Drupal source code is probably at least 10-20 seconds of this and might normalize these two runs. We really need to remove that soon in #drupal in #4498. |
Regarding this AC:
Here are the current errors:
There was a previous error caused by Of the remaining errors, all except the drush command error are caused by testing files, and should not affect the application. The drush error should be resolved when #4590 is merged, I'll follow up if not. |
DevOps PR here > https://github.com/department-of-veterans-affairs/devops/pull/8669 |
Composer 2 app PR #4599 and devops PR https://github.com/department-of-veterans-affairs/devops/pull/8669 have been built and deployed successfully to https://test.dev.cms.va.gov/, no errors on the build or deploy. CMS-TEST DEV (BRD) says:
Looks like tests failed as I still need to find/replace some things in devops/BRD. Might get to that tonight still but tomorrow morning is more likely. |
Confirmed that the drush error is resolved. |
Updated in #3303, testing now. |
Upgrade Composer to Composer 2.
Drupal 9 requires Composer 2 https://git.drupalcode.org/project/drupal/-/blob/9.1.x/composer.json#L21
See comments below for more details on each:
switch to Composer 2 is not blocking Tugboat release on Demo envs.Tugboat released 🎉The text was updated successfully, but these errors were encountered: