Add option to disable ECA programmatically

Created on 22 May 2025, 12 days ago

Problem/Motivation

We're having a case where we need to disable the ECA process or on runtime:

  • For debugging purposes
  • For testing
  • And possible actions, like saving an entity without ECA being active.

Steps to reproduce

Proposed resolution

Add a public API to the processor service to disable it.

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Active

Version

2.1

Component

Code

Created by

🇩🇪Germany mxh Offenburg

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

Merge Requests

Comments & Activities

  • Issue created by @mxh
  • 🇩🇪Germany mxh Offenburg
  • Pipeline finished with Success
    12 days ago
    Total: 626s
    #503968
  • 🇩🇪Germany jurgenhaas Gottmadingen

    We already have a kill switch for ECA, which is implemented in \Drupal\eca\EventSubscriber\DynamicSubscriber::onEvent. Would it be possible to move the suggested kill-switch from this MR into that context as well? That way, we have the same purpose combined in the same location, certainly better for long term maintainability.

  • 🇩🇪Germany mxh Offenburg

    Yeah, this might work too. Or move the logic from the event into the Processor. DynamicSubscriber should be as "dump" as possible and only serve one purpose. Feels a bit odd to disable the processor there.

  • 🇩🇪Germany jurgenhaas Gottmadingen

    The intention back then has been to provide a kill switch that disables all of ECA as early as possible. And that's in the subscriber, where it comes with no overhead except for that 1 line to check if the switch is set or not.

  • 🇩🇪Germany jurgenhaas Gottmadingen
Production build 0.71.5 2024