A more specific state variable should be used for storing the last run time

Created on 15 February 2024, over 1 year ago
Updated 6 March 2024, over 1 year ago

Problem/Motivation

While working on πŸ› State should be cleaned on uninstall Fixed I found that the module stores the time it last ran in the state variable 'last_run'. This is not namespaced in any way, such that other Drupal code can also see a variable called 'last_run'. This is because in #2902571: `last_run` should be a part of state, not config β†’ , the variable was moved from config to state, but in a way where it was previously "namespaced" in the module's configuration, but now entered into the global state store.

Steps to reproduce/verify

  • In your favourite database tool, find the value of the entry in the key_value table from collection state and name last_run
  • Using a unix timestamp converter, verify that its value corresponds to the last run time report in this module's main screen
  • Run a scan (feel free to disable time-consuming scans)
  • Verify that the value in the database was updated to reflect the current time

Proposed resolution

Rename the variable to security_review.last_run.

Remaining tasks

  • Review
  • Merge

User interface changes

None.

API changes

I don't think the variable should be considered an API, so none.

Data model changes

None.

πŸ“Œ Task
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡³πŸ‡±Netherlands eelkeblok Netherlands πŸ‡³πŸ‡±

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024