Add option to enable JIT for CI PHP images

Created on 20 September 2023, over 1 year ago
Updated 29 July 2024, 5 months ago

Problem/Motivation

PHP 8.0 introduced JIT https://php.watch/articles/jit-in-depth which was polished in PHP 8.2 so tests can benefit using it in Apache

Proposed resolution

Add setting for Apache and cli configuration and decide to set default
Find a way to collect metrics of resource usage

Remaining tasks

- find where to add the setting
- create a new pipeline for core in https://git.drupalcode.org/project/drupal/-/merge_requests/7756

User interface changes

API changes

Data model changes

📌 Task
Status

Active

Component

PHP Containers

Created by

🇫🇷France andypost

Live updates comments and jobs are added and updated live.
  • PHP 8.1

    The issue particularly affects sites running on PHP version 8.1.0 or later.

Sign in to follow issues

Comments & Activities

  • Issue created by @andypost
  • 🇫🇷France andypost

    With curtrent 8.3 and 11.x core 2 failures if JIT enabled for Apache (not in CLI)

    
    ---- Drupal\Tests\migrate\Unit\MigrationTest ----
    
    
    Status    Group      Filename          Line Function                            
    --------------------------------------------------------------------------------
    [31mFail      Other      MigrationTest.php   36 Drupal\Tests\migrate\Unit\Migration
    [0m    Drupal\Tests\migrate\Unit\MigrationTest::testMigrationDependenciesInConstructor
        with data set "invalid key" (array(array()))
        This test did not perform any assertions
        
        /builds/issue/drupal-3386474/core/tests/Drupal/Tests/Listeners/DrupalListener.php:62
        /builds/issue/drupal-3386474/vendor/phpunit/phpunit/src/Framework/TestResult.php:453
        /builds/issue/drupal-3386474/vendor/phpunit/phpunit/src/Framework/TestResult.php:981
        /builds/issue/drupal-3386474/vendor/phpunit/phpunit/src/Framework/TestSuite.php:685
        /builds/issue/drupal-3386474/vendor/phpunit/phpunit/src/Framework/TestSuite.php:685
        /builds/issue/drupal-3386474/vendor/phpunit/phpunit/src/TextUI/TestRunner.php:651
        /builds/issue/drupal-3386474/vendor/phpunit/phpunit/src/TextUI/Command.php:146
        /builds/issue/drupal-3386474/vendor/phpunit/phpunit/src/TextUI/Command.php:99
    [32mPass      Other      MigrationTest.php   36 Drupal\Tests\migrate\Unit\Migration
    
    ---- Drupal\Tests\Scripts\TestSiteApplicationTest ----
    
    
    Status    Group      Filename          Line Function                            
    --------------------------------------------------------------------------------
    [33mException Other      phpunit-653.xml      0 Drupal\Tests\Scripts\TestSiteApplic
    [0m    PHPUnit Test failed to complete; Error: PHPUnit 9.6.19 by Sebastian
        Bergmann and contributors.
        
        Testing Drupal\Tests\Scripts\TestSiteApplicationTest
        ..IEE.I                                                             7 / 7
        (100%)
        
        Time: 00:15.738, Memory: 8.00 MB
        
        There were 2 errors:
        
        1) Drupal\Tests\Scripts\TestSiteApplicationTest::testInstallScript
        GuzzleHttp\Exception\ConnectException: cURL error 52: Empty reply from
        server (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for
        http://localhost/subdirectory/test-page
        
        /builds/issue/drupal-3386474/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:210
        /builds/issue/drupal-3386474/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:158
        /builds/issue/drupal-3386474/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:110
        /builds/issue/drupal-3386474/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php:47
        /builds/issue/drupal-3386474/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php:28
        /builds/issue/drupal-3386474/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php:48
        /builds/issue/drupal-3386474/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php:35
        /builds/issue/drupal-3386474/vendor/guzzlehttp/guzzle/src/Middleware.php:31
        /builds/issue/drupal-3386474/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php:71
        /builds/issue/drupal-3386474/vendor/guzzlehttp/guzzle/src/Middleware.php:66
        /builds/issue/drupal-3386474/vendor/guzzlehttp/guzzle/src/HandlerStack.php:75
        /builds/issue/drupal-3386474/vendor/guzzlehttp/guzzle/src/Client.php:333
        /builds/issue/drupal-3386474/vendor/guzzlehttp/guzzle/src/Client.php:106
        /builds/issue/drupal-3386474/vendor/guzzlehttp/guzzle/src/Client.php:124
        /builds/issue/drupal-3386474/core/tests/Drupal/Tests/Scripts/TestSiteApplicationTest.php:113
        /builds/issue/drupal-3386474/vendor/phpunit/phpunit/src/Framework/TestResult.php:729
        
        2)
        Drupal\Tests\Scripts\TestSiteApplicationTest::testInstallInDifferentLanguage
        GuzzleHttp\Exception\ConnectException: cURL error 52: Empty reply from
        server (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for
        http://localhost/subdirectory/test-page
        
        /builds/issue/drupal-3386474/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:210
        /builds/issue/drupal-3386474/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:158
        /builds/issue/drupal-3386474/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:110
        /builds/issue/drupal-3386474/vendor/guzzlehttp/guzzle/src/Handler/CurlHandler.php:47
        /builds/issue/drupal-3386474/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php:28
        /builds/issue/drupal-3386474/vendor/guzzlehttp/guzzle/src/Handler/Proxy.php:48
        /builds/issue/drupal-3386474/vendor/guzzlehttp/guzzle/src/PrepareBodyMiddleware.php:35
        /builds/issue/drupal-3386474/vendor/guzzlehttp/guzzle/src/Middleware.php:31
        /builds/issue/drupal-3386474/vendor/guzzlehttp/guzzle/src/RedirectMiddleware.php:71
        /builds/issue/drupal-3386474/vendor/guzzlehttp/guzzle/src/Middleware.php:66
        /builds/issue/drupal-3386474/vendor/guzzlehttp/guzzle/src/HandlerStack.php:75
        /builds/issue/drupal-3386474/vendor/guzzlehttp/guzzle/src/Client.php:333
        /builds/issue/drupal-3386474/vendor/guzzlehttp/guzzle/src/Client.php:106
        /builds/issue/drupal-3386474/vendor/guzzlehttp/guzzle/src/Client.php:124
        /builds/issue/drupal-3386474/core/tests/Drupal/Tests/Scripts/TestSiteApplicationTest.php:209
        /builds/issue/drupal-3386474/vendor/phpunit/phpunit/src/Framework/TestResult.php:729
        
        ERRORS!
        Tests: 7, Assertions: 7, Errors: 2, Incomplete: 2.
    [31mFail      run-tests. Unknown              0 Unknown                            
    [0m    FATAL Drupal\Tests\Scripts\TestSiteApplicationTest: test runner returned a
        non-zero error code (2).
    
  • 🇫🇷France andypost

    and a set of functional tests https://git.drupalcode.org/issue/drupal-3386474/-/jobs/1435606

    3) Drupal\Tests\media\Functional\Rest\MediaJsonAnonTest::testPatch
    GuzzleHttp\Exception\ConnectException: cURL error 52: Empty reply from
    server (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for
    http://localhost/subdirectory/
  • 🇫🇷France andypost

    First green-run on CI

Production build 0.71.5 2024