Change package_manager_test_event_logger\EventSubscriber to log to a file to simplify it and code which asserts against it

Created on 2 August 2023, over 1 year ago

Problem/Motivation

\Drupal\package_manager_test_event_logger\EventSubscriber\EventLogSubscriber::logEventInfo logs to the drupal logger and then we need check this via the drupal UI in \Drupal\Tests\package_manager\Build\TemplateProjectTestBase::assertExpectedStageEventsFired . This is very complicated and hard to read.

If we instead logged to just a file it would be much easier to check.

Also it would solve a problem in πŸ“Œ For web server dependent unattended updates run the entire life cycle in a separate process that will not be affected by hosting time limits Fixed which is that it is hard to wait for cron updates in detached process to finish. This is issue is major because it blocks that issue

Steps to reproduce

Proposed resolution

  1. Change \Drupal\package_manager_test_event_logger\EventSubscriber\EventLogSubscriber::logEventInfo log to a json file that would have sub elements for each event that fired and which stage was associated
  2. Change \Drupal\Tests\package_manager\Build\TemplateProjectTestBase::assertExpectedStageEventsFired assert the contents of the file.

Remaining tasks

After this issue is committed
In πŸ“Œ For web server dependent unattended updates run the entire life cycle in a separate process that will not be affected by hosting time limits Fixed change \Drupal\Tests\automatic_updates\Build\CoreUpdateTest::waitForStageToBeDestroyed to wait for expected events to have been fired

User interface changes

API changes

Data model changes

πŸ“Œ Task
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States tedbow Ithaca, NY, USA

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

Comments & Activities

Production build 0.71.5 2024