(Try to) fix the GitLab CI

Created on 23 October 2023, 4 months ago
Updated 12 February 2024, 12 days ago

Problem/Motivation

See #3190024: Problem with test dependencies when testing issue forks

Proposed resolution

Instead of depending on search_api_autocomplete and language_fallback_fix, just download and unpack them.

Remaining tasks

None.

User interface changes

None.

API changes

None.

Data model changes

None.

📌 Task
Status

RTBC

Version

1.0

Component

General code

Created by

🇷🇴Romania claudiu.cristea Arad 🇷🇴

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @claudiu.cristea
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.1 & sqlite-3.27
    last update 4 months ago
    run-tests.sh fatal error
  • @claudiucristea opened merge request.
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.1 & sqlite-3.27
    last update 4 months ago
    run-tests.sh fatal error
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.1 & sqlite-3.27
    last update 4 months ago
    run-tests.sh fatal error
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.1 & sqlite-3.27
    last update 4 months ago
    run-tests.sh fatal error
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.1 & sqlite-3.27
    last update 4 months ago
    run-tests.sh fatal error
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.1 & sqlite-3.27
    last update 4 months ago
    Composer require-dev failure
  • Pipeline finished with Failed
    4 months ago
    Total: 303s
    #36799
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.1 & sqlite-3.27
    last update 4 months ago
    run-tests.sh fatal error
  • Pipeline finished with Failed
    4 months ago
    Total: 1370s
    #36815
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.1 & sqlite-3.27
    last update 4 months ago
    run-tests.sh fatal error
  • Pipeline finished with Canceled
    4 months ago
    Total: 528s
    #36843
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.1 & sqlite-3.27
    last update 4 months ago
    run-tests.sh fatal error
  • 🇷🇴Romania claudiu.cristea Arad 🇷🇴

    Fix IS

  • Pipeline finished with Success
    4 months ago
    Total: 1369s
    #36848
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.1 & sqlite-3.27
    last update 4 months ago
    527 pass, 8 fail
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.1 & sqlite-3.27
    last update 4 months ago
    527 pass, 8 fail
  • Pipeline finished with Canceled
    4 months ago
    Total: 208s
    #36856
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.1 & sqlite-3.27
    last update 4 months ago
    527 pass, 8 fail
  • Pipeline finished with Canceled
    4 months ago
    Total: 1061s
    #36857
  • Pipeline finished with Canceled
    4 months ago
    #36860
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.1 & sqlite-3.27
    last update 4 months ago
    527 pass, 8 fail
  • Pipeline finished with Canceled
    4 months ago
    Total: 554s
    #36865
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.1 & sqlite-3.27
    last update 4 months ago
    527 pass, 8 fail
  • Pipeline finished with Failed
    4 months ago
    Total: 388s
    #36871
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.1 & sqlite-3.27
    last update 4 months ago
    527 pass, 8 fail
  • Pipeline finished with Failed
    4 months ago
    Total: 529s
    #36905
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.1 & sqlite-3.27
    last update 4 months ago
    534 pass, 5 fail
  • Pipeline finished with Failed
    4 months ago
    Total: 358s
    #36920
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.1 & sqlite-3.27
    last update 4 months ago
    534 pass, 5 fail
  • Pipeline finished with Canceled
    4 months ago
    Total: 243s
    #36932
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.1 & sqlite-3.27
    last update 4 months ago
    534 pass, 5 fail
  • Pipeline finished with Failed
    4 months ago
    Total: 477s
    #36934
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.1 & sqlite-3.27
    last update 4 months ago
    543 pass, 1 fail
  • Pipeline finished with Success
    4 months ago
    Total: 418s
    #37249
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.1 & sqlite-3.27
    last update 4 months ago
    543 pass, 1 fail
  • Pipeline finished with Success
    4 months ago
    #37261
  • Pipeline finished with Failed
    4 months ago
    Total: 534s
    #37272
  • Pipeline finished with Canceled
    4 months ago
    #37328
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.1 & sqlite-3.27
    last update 4 months ago
    543 pass, 1 fail
  • Pipeline finished with Success
    4 months ago
    Total: 480s
    #37331
  • Pipeline finished with Success
    4 months ago
    Total: 634s
    #37332
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.1 & sqlite-3.27
    last update 4 months ago
    544 pass
  • Pipeline finished with Success
    4 months ago
    #37336
  • Status changed to Needs review 4 months ago
  • 🇷🇴Romania claudiu.cristea Arad 🇷🇴

    What has been done.

    Caveats

    • As now the test dependencies are downloaded, a developer working on the module should manually get the two modules
    • With Drupal 9.5, there are 2 deprecation errors that are not because of Search API (spotted also in #3292775: Drupal 10 compatibility ). There’s nothing we can do about it that, so in the Drupal 9.5 scheduled test, we need disable check of deprecations by setting value of _PHPUNIT_EXTRA env var to --suppress-deprecations. Also in legacy Drupal CI, deprecations were silenced.

    What's next

    After committing, scheduled tests needs to be setup (needs proper permissions)

  • Interesting ran the tests locally just to see what is depricated. And I only get one Javascript Depreciation error for AjaxTest::testAjax. This was tested on 9.5.11.

    That said it would be amazing if this gets merged and fully set up soon.

  • 🇦🇹Austria drunken monkey Vienna, Austria

    Thanks for your work on this! I agree with @admirlju, would be amazing to finally get this fixed. (Though working with MRs on d.o still seems like a lot more work than with patches, unfortunately.)

    A few notes, though:

    • As deprecations didn’t fail the tests before, I don’t think we should change that. Especially, I do not want to remove testing for deprecated code (i.e., hooks) that a lot of people are still using. Seems we should just always set _PHPUNIT_EXTRA: --suppress-deprecations?
    • Agreed, converting LocalTasksTest to a Kernel test does make sense.
    • PHPUnit added several unrelated list(…) = ---> [] = changes.
    • DeprecationHelper looks great, wasn’t aware of that but looks like a great tool for the future. However, as it seems it was only introduced in 10.1.3, I don’t think we can use it before we depend on 10.2, actually, not 10.1 as you wrote in the @todo comment. Also, I don’t quite understand why you can’t use an import for the Drupal Core class in DeprecationHelper::backwardsCompatibleCall()?
    • I think I’m against removing all the comments from .gitlab-ci.yml. Is there a specific reason you did that? I think it’s always great when config files are properly documented. Additionally, it would be great to get an explanatory comment for _PHPUNIT_CONCURRENT. I surmise this tells PhpUnit to run concurrently, which a) improves speed by a lot and b) luckily doesn’t pose any problems for our specific test suite? The comment should just explain that.

    Getting test run times down would, in any case, be great.

  • Status changed to Needs work 4 months ago
  • 🇦🇹Austria drunken monkey Vienna, Austria
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.4 + Environment: PHP 8.2 & sqlite-3.34
    last update about 2 months ago
    Composer require-dev failure
  • Status changed to Needs review about 2 months ago
  • 🇦🇹Austria drunken monkey Vienna, Austria

    Attempted a different fix based on drumm’s comment in #3190024-11: Problem with test dependencies when testing issue forks . Let’s see how it goes.

  • 🇦🇹Austria drunken monkey Vienna, Austria

    OK, this did help GitLab CI, but failed to do anything for DrupalCI.
    So, maybe it could work in combination with the MR by @claudiu.cristea? I’ll give it a try.

  • Open on Drupal.org →
    Core: 10.1.4 + Environment: PHP 8.2 & sqlite-3.34
    last update about 2 months ago
    Not currently mergeable.
  • Open on Drupal.org →
    Core: 10.1.4 + Environment: PHP 8.2 & sqlite-3.34
    last update about 2 months ago
    Not currently mergeable.
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.4 + Environment: PHP 8.2 & sqlite-3.34
    last update about 2 months ago
    Composer require-dev failure
  • 🇦🇹Austria drunken monkey Vienna, Austria

    Hm, no, couldn’t figure out how to do it. I didn’t find a way to set the COMPOSER_ROOT_VERSION environment variable for DrupalCI, but if we don’t use the fix for both CI systems then we can’t keep the dev dependencies in the composer.json file.

    Does anyone know whether/how we can set custom environment variable values in DrupalCI?

  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.4 + Environment: PHP 8.2 & sqlite-3.34
    last update about 2 months ago
    Composer require-dev failure
  • 🇷🇴Romania claudiu.cristea Arad 🇷🇴

    Sorry, I didn't find some time to look at your remarks. I'm trying to take a look next week

  • 🇦🇺Australia acbramley

    OK, this did help GitLab CI, but failed to do anything for DrupalCI.

    Is there a reason to keep both? DrupalCI is essentially dead now and we really should be trying to just run everything in gitlab CI.

    I'm happy to help get this over the line as I've opened a couple of MRs over the past week but noticed gitlab CI is broken.

  • 🇦🇹Austria drunken monkey Vienna, Austria

    Is there a reason to keep both? DrupalCI is essentially dead now and we really should be trying to just run everything in gitlab CI.

    No, you’re probably right – if we get GitLab CI working reliably (and with a minimum of seemingly unrelated changes) that’s probably good enough.

  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.4 + Environment: PHP 8.2 & sqlite-3.34
    last update 21 days ago
    Composer require-dev failure
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.4 + Environment: PHP 8.2 & sqlite-3.34
    last update 21 days ago
    Composer require-dev failure
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.1.4 + Environment: PHP 8.2 & sqlite-3.34
    last update 21 days ago
    Composer require-dev failure
  • 🇦🇹Austria drunken monkey Vienna, Austria

    Alright, looking great!
    While Drupal CI still refuses to busge, GitLab CI now passes flawlessly, so if we are prepared to just disable DrupalCI completely (except for patches, for the next few months, I guess) this might already be ready to go.

    All the code style problems reported by stylelint and phpstan can and should be addressed in a follow-up, in my opinion.

    Please test/review and we can finally get this resolved!

    Also, once again many thanks to @claudiu.cristea for his amazing work on this! While I’ve discarded most of your changes in my MR, your branch was still a valuable resource for resolving all the little problems I encountered.

  • 🇦🇹Austria drunken monkey Vienna, Austria

    Would be great if someone could review.

  • Status changed to RTBC 12 days ago
  • 🇦🇺Australia acbramley

    Looking great, nice work

Production build https://api.contrib.social 0.61.6-2-g546bc20