[SOLVED] Replaying a Rule Runs for Unrelated Content Records (Again)

I have…

  • Checked the logs and have uploaded a log file and provided a link because I found something suspicious there. Please do not post the log file in the topic because very often something important is missing.
    (We don’t currently have logs for this issue but can re-create and provide if helpful)

I’m submitting a…

  • Regression (a behavior that stopped working in a new release)

Current behavior

When a rule is replayed via the menu option:


It is running for a lot more content records than it should do, including ones in other schemas that the rule is not configured to use.
The schema is only configured on the “bank-holidays” schema:

but when replayed it’s picking up contents from other schemas and trying to use those:

Expected behavior

We would expect only that one rule to be run with only the data from the schemas related to that rule

Minimal reproduction of the problem

  • Create a schema called ‘Schema1’
  • Create a schema called ‘Schema2’
  • Create a rule with an email action on ‘Schema1’
  • Create a rule with a comment action on ‘Schema2’
  • Create a content in ‘Schema1’
  • Verify an email is sent
  • Create a content in ‘Schema2’
  • Verify a comment is added
  • Replay the email rule
  • 2 emails are sent

Environment

  • Self hosted with docker
  • Cloud version

Version: 7.20.0 plus code customisations but also verified on cloud.squidex.io in minimal example as above.

Browser:

  • Chrome (desktop)

Others:
This is a re-occurrence of [SOLVED] Replaying a Rule Runs for Unrelated Content Records

Hi @Sebastian
Can you let us know what the solution to this is please.
I know this looks like a repeat report but the same issue has re-occurred in a later version after it was fixed in a previous version.
Many Thanks
Simon

Because the code underwent a big change, nothing special here. Tests could be better, but this is always the case

Thanks for the reply.
Last time this bug happened there was a fix made.
Will one be made this time or is this now how it operates?
Thanks.

Sorry, it has been fixed already. The core service of the rules returns “jobs” with a skip-reason, e.g. WrongEvent. This reason is needed for debugging and events with such a reason should be ignored, which was not the case.

Hi @sebastien,

Our QAs are facing the same issue, that is, “replay one rule, all rules get replayed”

It continues to replicate on the cloud version - please push the fix?

Many thanks

In the cloud version? I have to test it, it has not got the update of the rule system, which reintroduced the problem.

Yes. Cloud is currently on version: 7.0.0.0

Bug still replicates as of one hour ago.

Hi @Sebastian

Since you have already confirmed the fix is ready in the codebase, could you please deploy the latest stable version to the Cloud environment?

Updating the Cloud will allow us to immediately compare the behaviour of the rule replay feature between the updated Cloud system and our current setup.

Thanks for your help and patience in getting this resolved.

Not in the next 1.5 weeks. I have not deployed the new rule system to the cloud and would like to have the focus to monitor it closely.