Problem/Motivation

See https://www.drupal.org/pift-ci-job/2572275

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Command icon 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

alexpott created an issue. See original summary.

alexpott’s picture

Status: Active » Needs review
StatusFileSize
new1.19 KB

Hopefully this will fix DrupalCI.

alexpott’s picture

StatusFileSize
new1.19 KB
alexpott’s picture

StatusFileSize
new1.36 KB

Another idea...

alexpott’s picture

StatusFileSize
new1.42 KB
alexpott’s picture

StatusFileSize
new1.35 KB

Okay... I think this will work but it will need to be committed to prove it because of the way that DrupalCI works with custom drupalci.yml files...

  • Berdir committed 8f98b6bf on 8.x-3.x authored by alexpott
    Issue #3334914 by alexpott: Testing is broken because simplesamlphp/...
berdir’s picture

Status: Needs review » Needs work

Committed, but doesn't seem to work either, both the on-commit test and a manual retest failed. I'm not seeing a second composer step happening.

A found a bunch of exsamples that do something similar, but they all do it later, which is too late for us I think. For example http://grep.xnddx.ru/node/33571933.

alexpott’s picture

Status: Needs work » Needs review
StatusFileSize
new576 bytes

Maybe because we have a drupalci.yml file now we can test changing it...

alexpott’s picture

Turns out you can only customise the assessment stage - see https://www.drupal.org/drupalorg/docs/drupal-ci/customizing-drupalci-tes...

So this is not going to work and we're going to need to fix DrupalCI :(

alexpott’s picture

Project: simpleSAMLphp Authentication » DrupalCI: Test Runner
Version: 8.x-3.x-dev »
Component: Code » Testrunner Codebase

Moving to the DrupalCI: Test Runner queue as this can only be fixed there. Not sure at all how to fix this - maybe:

  • add --no-plugins to the composer install in the gather_dependencies step (not sure if this will work tbh)
  • allow projects to add a list plugins to allow or deny as they see fit.
alexpott’s picture

Alternatively maybe we move simpleSAMLphp Authentication to gitlab ci and see if we can fix this there.

wim leers’s picture

Ran into this problem too over at #3334243-12: CDN 4.x requires PHP >=8.1 but composer does not respect it due to bug in d.o composer facade. Pity that tweaking drupalci.yml does not work at all per #10, but at least I don't have to experiment with that now thanks to @alexpott in #10 😔

Apparently nobody reported the need for allow-plugins support at: https://www.drupal.org/project/issues/project_issue_file_test?text=allow... 🤯

Then discovered that #3265092: [META] Define a default .gitlab-ci.yml template that projects can inherit has been silent for >11 months … so not very hopeful about the GitLab CI approach either. But trying it anyway: #3334243-14: CDN 4.x requires PHP >=8.1 but composer does not respect it due to bug in d.o composer facade.

berdir’s picture

Category: Bug report » Feature request
Priority: Critical » Normal

FWIW, the drupalspoons template which seems to be pretty much the only thing out there at the moment only just hardcodes a bunch of specific plugins: https://gitlab.com/drupalspoons/composer-plugin/-/raw/master/bin/setup. To customize that, you would need to copy that whole file and add your own?

I think the only reason that "works" for you Wim is that it doesn't include any of the magic that DrupalCI does and does not actually automatically include require-dev dependencies.

Changing to a feature request, as commented in #3265092: [META] Define a default .gitlab-ci.yml template that projects can inherit, can't we just allow all plugins and move on? The security aspect of that seems irrelevant, as we're running literally any PHP code that's in the repository that's being tested.

berdir’s picture

If I understand this correctly, we'd need to add the allow-all plugins to https://git.drupalcode.org/project/drupalci_testbot/-/blob/dev/src/Drupa..., before the composer require of the project.

so, run this command there:

composer config allow-plugins true

Created that as a merge request, but the integration doesn't seem to fully work here, so I did that manually, directly in Gitlab and its Web IDE. Obviously entirely untested :)

https://git.drupalcode.org/project/drupalci_testbot/-/merge_requests/9

moshe weitzman’s picture

FWIW, the drupalspoons template which seems to be pretty much the only thing out there at the moment only just hardcodes a bunch of specific plugins: https://gitlab.com/drupalspoons/composer-plugin/-/raw/master/bin/setup. To customize that, you would need to copy that whole file and add your own?

You an allow whatever plugins you want in your project's composer.json and those will be honored/used by DrupalSpoons. The nones you saw there are auto-allowed so that projects dont *have* to explicitly allow them.

hestenet made their first commit to this issue’s fork.

hestenet’s picture

Merged into drupalci_testbot:production - sorry for such a long delay on a straightforward change. Many different priorities swirling around and I simply lost track. Thanks to those who pinged in Slack for an update.

Before marking fixed - would someone please test this on an affected issue and confirm it is resolved?

joseph.olstad’s picture

Thanks for the fix

cmlara’s picture

Note it appears this might have broken testing on PHP 7.4 images, due to a bug in composer, see #3381247: Composer config failure when running functional tests