-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
severity: mediumResults in substantial degraded or broken functionality for specfic workflowsResults in substantial degraded or broken functionality for specfic workflowsstatus: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtopic: event rulesFor issues related to the Event Rules featureFor issues related to the Event Rules featuretype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application
Description
Deployment Type
Self-hosted
NetBox Version
v3.7.0
Python Version
3.11
Steps to Reproduce
Setup:
- Create a webhook: Name = Test, URL = http://127.0.0.1:9000
- Create event rule 1:
- Name = Rule 1
- Content types = Prefix
- select Updates
- Condition =
{ "and": [{"attr": "status.value", "value": "deprecated"}]} - Action type = Webhook
- Webhook = Test
- Create event rule 2:
- Name = Rule 2
- Content types = Prefix
- select Updates
- Condition =
{ "and": [{"attr": "status.value", "value": "active"}]} - Action type = Webhook
- Webhook = Test
- Start webhook receiver (
python manage.py webhook_receiver), or observe the webhooks happen in some other way
(Sorry, couldn't figure out the correct condition syntax without using the "and" operator)
Demo:
- Create a prefix, like 10.1.2.0/24, status = Active (the defaults)
- Edit the prefix: change its status to Deprecated
- Edit the prefix again: change its status to Active
Expected Behavior
Webhook is run twice: first when prefix status was changed to Deprecated (step 6), second when changed to Active again (step 7).
Observed Behavior
Webhook is run only once, that's in step 6, but not in step 7.
Additionally: If Rule 1 is disabled, and steps 6 and 7 are executed again, now the webhook is run in step 7.
Looks like only the first enabled event rule is run for a specific object type.
Metadata
Metadata
Assignees
Labels
severity: mediumResults in substantial degraded or broken functionality for specfic workflowsResults in substantial degraded or broken functionality for specfic workflowsstatus: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtopic: event rulesFor issues related to the Event Rules featureFor issues related to the Event Rules featuretype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application