Webhooks Failing #3542

Closed
opened 2025-12-29 18:29:47 +01:00 by adam · 1 comment
Owner

Originally created by @robduffy2010 on GitHub (Apr 6, 2020).

Environment

  • Python version: 3.6.10
  • NetBox version: 2.7.11

Steps to Reproduce

  1. Create a webhook without any custom body or headers
  2. Edit device (I've only tested with devices but may also happen with other objects)
  3. Observe webhook failing

Expected Behavior

Webhook will succeed.

Observed Behavior

Webhooks fail and raise the following exception.

Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/rq/worker.py", line 884, in perform_job
rv = job.perform()
File "/usr/local/lib/python3.6/dist-packages/rq/job.py", line 664, in perform
self._result = self._execute()
File "/usr/local/lib/python3.6/dist-packages/rq/job.py", line 670, in _execute
return self.func(*self.args, **self.kwargs)
File "/opt/netbox/netbox/extras/webhooks_worker.py", line 32, in process_webhook
headers.update(webhook.render_headers(context))
AttributeError: 'Webhook' object has no attribute 'render_headers'

Originally created by @robduffy2010 on GitHub (Apr 6, 2020). ### Environment * Python version: 3.6.10 * NetBox version: 2.7.11 ### Steps to Reproduce 1. Create a webhook without any custom body or headers 2. Edit device (I've only tested with devices but may also happen with other objects) 3. Observe webhook failing ### Expected Behavior Webhook will succeed. ### Observed Behavior Webhooks fail and raise the following exception. Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/rq/worker.py", line 884, in perform_job rv = job.perform() File "/usr/local/lib/python3.6/dist-packages/rq/job.py", line 664, in perform self._result = self._execute() File "/usr/local/lib/python3.6/dist-packages/rq/job.py", line 670, in _execute return self.func(*self.args, **self.kwargs) File "/opt/netbox/netbox/extras/webhooks_worker.py", line 32, in process_webhook headers.update(webhook.render_headers(context)) AttributeError: 'Webhook' object has no attribute 'render_headers'
adam closed this issue 2025-12-29 18:29:47 +01:00
Author
Owner

@jeremystretch commented on GitHub (Apr 6, 2020):

Unable to replicate this on v2.7.11. Ensure that you've restarted the rqworker process since the last upgrade. If you need further assistance, please post to the mailing list.

@jeremystretch commented on GitHub (Apr 6, 2020): Unable to replicate this on v2.7.11. Ensure that you've restarted the rqworker process since the last upgrade. If you need further assistance, please post to the [mailing list](https://groups.google.com/forum/#!forum/netbox-discuss).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3542