Support dry run concept

Created on 9 March 2024, 7 months ago
Updated 10 August 2024, about 2 months ago

Problem/Motivation

It would be nice when executing a script via drush or the UI to be able to choose a dry-run option that would do all the operations by never pull the trigger on the actual save. That would be ideal, but I think that would make it largely up to the script writer to include that logic inside their processOne() method.

The simpler more reliable option, though less helpful would be to never call processOne() if the dry-run flag is set. This could allow outputting what item would have been processed, to at least confirm the getItems() returned the expected results.

Steps to reproduce

Proposed resolution

  • Support a dry-run flag that when set, outputs the details of the items gathered to the BatchOpLog, but does not run processOne()
  • dry-run option added to drush run command
  • dry-run option added to running the batch via UI.
  • documentation updated

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States swirt Florida

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

Comments & Activities

  • Issue created by @swirt
  • πŸ‡ΊπŸ‡ΈUnited States swirt Florida

    This might not be needed if the UI for running the scripts actually shows the counts of items to be impacted.

  • Status changed to Postponed 6 months ago
  • πŸ‡ΊπŸ‡ΈUnited States swirt Florida

    Marking this as postponed because I think it won't be needed once the UI is up and running.

  • Status changed to Active about 2 months ago
  • πŸ‡ΊπŸ‡ΈUnited States swirt Florida

    After thinking about this some more, I think it would be useful to log the list of items gathered without processing them. This would allow auditing what is about to be processed and the ability to validate the gatherItemsToProcess() query(s).

  • πŸ‡ΊπŸ‡ΈUnited States swirt Florida

    After thinking about this some more, I think it would be useful to log the list of items gathered without processing them. This would allow auditing what is about to be processed and the ability to validate the gatherItemsToProcess() query(s).

Production build 0.71.5 2024