In Core build tests have core module change a service class constructor

Created on 12 June 2023, over 1 year ago
Updated 26 June 2023, over 1 year ago

Problem/Motivation

Discovered in 🐛 [DrupalCon] Automatic Updates alpha test result Needs work

From @wim leers

Actually, no, the root cause here is simpler: 🐛 Stampedes and cold cache performance issues with css/js aggregation Fixed landed a change in August 2022, which indeed added a new required argument to \Drupal\big_pipe\Render\BigPipeResponseAttachmentsProcessor::__construct().

The fact that this error message appears then leaves only one possible conclusion: the dependency injection container is not being rebuilt immediately after copying the files from "stage" to "active": at least one request is getting through to "active" before the container is rebuilt, which is causing this error message. 🫣

Steps to reproduce

Proposed resolution

We should add coverage in our build tests for code changes like this

  1. Create test module that has 2 version. The updated version should have a change in constructor for a class that is registered as a service. We may be able to just use package_manager/tests/fixtures/build_test_projects/updated_module for this.
  2. Move this module into core/modules for our Automatic Updates build tests. Put the updated version in the target codebase
  3. Enable this module in the Automatic Update build tests. Probably in \Drupal\Tests\automatic_updates\Build\UpdateTestBase::createTestProject
  4. Ensure there is no error reported from the the module changing

Remaining tasks

User interface changes

API changes

Data model changes

📌 Task
Status

Active

Version

3.0

Component

Code

Created by

🇺🇸United States tedbow Ithaca, NY, USA

Live updates comments and jobs are added and updated live.
  • Needs manual testing

    The change/bugfix cannot be fully demonstrated by automated testing, and thus requires manual testing in a variety of environments.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024