Problem/Motivation
We are noticing automated tests being unable to run due to composer errors. The errors started occurring some time in the start of 2023. The errors were encountered even when tests were run without any code changes, the same tests that were passing earlier.
https://www.drupal.org/project/lingotek/issues/3261217
https://www.drupal.org/project/lingotek/issues/3338717
Steps to reproduce
Run the failing automated tests here
https://www.drupal.org/project/lingotek/issues/3261217
https://www.drupal.org/project/lingotek/issues/3338717
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #18 | 3344857-resolve-cweagan-error-40x.patch | 1.16 KB | jeromeroberts |
| #16 | 3344857-resolve-cweagan-error-v2.patch | 2.62 KB | jeromeroberts |
| #13 | 3344857-attempt-fix-composer-1.patch | 2.09 KB | jeromeroberts |
| #8 | composer_changes_3_x.patch | 408 bytes | npaudyal001 |
| #6 | changes_on_drupalci.patch | 1.34 KB | npaudyal001 |
Comments
Comment #2
jahanzaib_at_straker commentedtesting this patch to address the composer error noticed in the dispatcher.
Comment #3
npaudyal001 commentedTesting a new fix
Comment #4
npaudyal001 commentedComment #5
npaudyal001 commentedSaw no effect on composure.json changes. Testing the drupalci.yml commands.
Comment #6
npaudyal001 commentedComment #8
npaudyal001 commentedComment #12
damienmckennaDid you mean to commit the changes to the 3.9.x branch and not the 4.0.x branch?
Comment #13
jeromeroberts commentedAttempting a patch to update the drupalci build file. - start with 3.9.x as not 100% sure this will work.
During investigation of Nick's patch to set allow-plugin true for cweagans, it was noted that the build was failing before even attempting to set allow-plugin true.
I've found some references that suggest we may be able to add the entire build file with unset default values which will enable us to move Nick's commands further up the build file and thus running within the assemble_codebase step before composer install.
Creating this build file on my local drupalci instance resolved the cweagan error.
I found once the testing commenced, there were some failing tests though - likely unrelated.
Comment #14
jeromeroberts commentedYeah - so cannot patch the drupalci.yml file. Because Jenkins loads this file before the patch is applied and therefor not honoured by the Jenkins test.
To test this change, you'd need to apply the changes directly to repo branch rather than a patch. Rollback/reset the commit if it does not work.
Comment #16
jeromeroberts commentedTrying a different approach to last time.
cweagans is included via the acquia/cohesion package. This change instead attempts to allow-plugin for for cweagans and then install the dev/require-dev package after.
If this works, it would mean acquia/cohesion composer dev dependency will need to be managed through drupalci.yml rather than composer.json.
Just try 3.9.x branch first.
Comment #17
damienmckennaAll current work is going into the 4.0.x branch, shouldn't you focus your efforts there instead of 3.9.
Comment #18
jeromeroberts commentedOkay - now we know that moved things along. Here's the same patch changes for the latest 4.0.x branch.
Comment #20
npaudyal001 commented@jeromeroberts, With the patch it seems to build fine, but after the commit tests on other patches are throwing composer config error. I am reverting this commit to test if the error is coming from here.
Comment #22
npaudyal001 commented