Document that validators comparing state between stage life cycle operations must store that state out-of-band, not on the object

Created on 11 May 2023, over 1 year ago
Updated 13 December 2023, about 1 year ago

Problem/Motivation

While reviewing πŸ“Œ Package Manager should keep an audit log of changes it applied to the active codebase Fixed , I realized that our validators today They don't, but the new one being written at #3355628 does!

But for any validator that stores state during an earlier event to use that during a later event, that’s going to be a problem as soon as πŸ“Œ 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 lands. And in fact … it’s already a problem when installing updates by hand, because \Drupal\automatic_updates_extensions\Form\UpdateReady::submitForm() already puts different phases of the stage life cycle in different (batch operation) requests!

I see that LockFileValidator and StagedDatabaseUpdateValidator specifically take care of that. And they're the only ones that store state between operations πŸ‘

But this is something we should document in package_manager.api.php as a gotcha.

Steps to reproduce

N/A

Proposed resolution

Documentation!

Remaining tasks

None.

User interface changes

None.

API changes

Data model changes

πŸ› Bug report
Status

Closed: outdated

Version

3.0

Component

Documentation

Created by

πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

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

Comments & Activities

Production build 0.71.5 2024