YAML Parse Failure, Model Continues Processing

Created on 11 May 2025, 1 day ago

Problem/Motivation

This issue occurs when writing a Expirable Key Value Store with the format of the value is set to be YAML. If the supplied value fails YAML parsing, the model processing continues despite the failure. There is a message in the ECA log of: Tried parsing a value as YAML format, but parsing failed.. As this is executed in KeyValueStoreBase.php, the same issue occurs for Key Value Store.

Steps to reproduce

Create a model with the following:

  • Custom event to trigger on
  • Add the action of EXPIRABLE KEY VALUE STORE: WRITE
  • Set Interpret above value as YAML format to yes
  • Set the value to incorrectly formatted YAML
  • Add an action to display a message (to show continued processing)

Trigger the event.

Proposed resolution

As with other actions which cause failure and processing stops, the same should be true here.

🐛 Bug report
Status

Active

Version

2.1

Component

Code

Created by

🇨🇦Canada bdunphy

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

Comments & Activities

  • Issue created by @bdunphy
  • 🇩🇪Germany jurgenhaas Gottmadingen

    I see, where you're coming from. However, this was a deliberate design decision as this yaml parsing is happening all over ECA in this way, not just in cache writing.

    I can only see 2 options moving forward, since changing the behavior would break existing models:

    • Add a new option to the drop-down to have a choice whether to fail or not for yaml parsing; or a separate checkbox
    • Add a condition that validates the yaml before using it in any of the actions

    I would actually vote for the second on in any case, and wonder if we then even require the first one.

    Changed to feature request since this is operating as intended.

  • 🇨🇦Canada bdunphy

    I agree with the second option of validating the YAML before use. This falls in line with programming standards where we want to validate before usage.

Production build 0.71.5 2024