Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to trigger a webhook via script execution #14382

Closed
jeremystretch opened this issue Nov 29, 2023 · 3 comments
Closed

Unable to trigger a webhook via script execution #14382

jeremystretch opened this issue Nov 29, 2023 · 3 comments
Assignees
Labels
severity: medium Results in substantial degraded or broken functionality for specfic workflows status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Milestone

Comments

@jeremystretch
Copy link
Member

NetBox version

v3.6.5

Python version

3.10

Steps to Reproduce

  1. Upload a simple script that executes cleanly. (It doesn't have to do anything.)
  2. Create a webhook.
    • Content types: Extras > Script
    • Events: Job executions, job terminations
    • URL: Where you have a receiver running (can use the webhook_receiver management command locally)
  3. Ensure the RQ worker process is running.
  4. Run the script you uploaded and verify that it completes successfully.

Expected Behavior

Two webhooks should be sent: One when the script starts, and another when it ends.

Observed Behavior

The webhook is not triggered for either event. This is because the content type with which the webhook is associated (extras.Script) differs from the job's object type (extras.ScriptModule). This can be confirmed by inspecting the completed job under operations > jobs.

@jeremystretch jeremystretch added type: bug A confirmed report of unexpected behavior in the application status: under review Further discussion is needed to determine this issue's scope and/or implementation severity: medium Results in substantial degraded or broken functionality for specfic workflows labels Nov 29, 2023
@jeremystretch
Copy link
Member Author

Blocked by #14438

@jeremystretch jeremystretch added status: blocked Another issue or external requirement is preventing implementation and removed status: under review Further discussion is needed to determine this issue's scope and/or implementation labels Dec 5, 2023
@arthanson arthanson self-assigned this Feb 15, 2024
@jeremystretch jeremystretch added this to the v4.0 milestone Feb 23, 2024
@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation and removed status: blocked Another issue or external requirement is preventing implementation labels Feb 23, 2024
@jeremystretch
Copy link
Member Author

Unblocking this as #14438 has been completed for the upcoming v4.0 release.

@arthanson
Copy link
Collaborator

This is fixed in NB 4.0 due to the changes in #14438 so closing. Tested in NB 4, webhooks are successfully sent.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
severity: medium Results in substantial degraded or broken functionality for specfic workflows status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

2 participants