StackStorm / st2

StackStorm (aka "IFTTT for Ops") is event-driven automation for auto-remediation, incident responses, troubleshooting, deployments, and more for DevOps and SREs. Includes rules engine, workflow, 160 integration packs with 6000+ actions (see https://exchange.stackstorm.org) and ChatOps. Installer at https://docs.stackstorm.com/install/index.html
https://stackstorm.com/
Apache License 2.0
5.96k stars 741 forks source link

Pack rule operator exists / nexists should not have criteria pattern mandatory #6197

Open mishra-abhishek-salesforce opened 1 month ago

mishra-abhishek-salesforce commented 1 month ago

SUMMARY

When using exists / nexists rule operator, we need to provide a criteria pattern which is not correct, as the value of this pattern needs to be null / should not be there.

STACKSTORM VERSION

st2 3.7.0, on Python 3.6.8

OS, environment, install method

Running on Docker in Mackbook Pro (x86)

Steps to reproduce the problem

Use exists / nexists rule operator in criteria section. Omit the value of criteria pattern (as it is not needed for this operator).

criteria:
  trigger.org_id:
    type: exists

Expected Results

The pack should get installed correctly as all information is available.

Actual Results

Pack installation fails and we need to add a pattern field unnecessarily.

criteria:
  trigger.org_id:
    type: exists
    pattern: "placeholder"

Making sure to follow these steps will guarantee the quickest resolution possible.

Thanks!