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

Job results are not available when executing custom scripts via the runscript command #14549

Closed
erikastr opened this issue Dec 18, 2023 · 2 comments · Fixed by #14569
Closed
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

Comments

@erikastr
Copy link

Deployment Type

Self-hosted

NetBox Version

v3.6.6

Python Version

3.11

Steps to Reproduce

  1. Create/upload any custom script (e.g. the example script from documentation)
  2. Try to execute the script via runscript command
/opt/netbox/venv/bin/python /opt/netbox/netbox/manage.py runscript example.NewBranchScript --commit --loglevel debug --data '{"site_name": "testing", "switch_count": 1, "switch_model": 11}'

Expected Behavior

Script is completed and job results are available

Observed Behavior

Script gets completed, but a KeyError exception gets raised when trying to access the job results
image

It seems that an incorrect name tries to get accessed when the script is ran through the runscript command, as compared to running the script via the GUI

image
@erikastr erikastr added the type: bug A confirmed report of unexpected behavior in the application label Dec 18, 2023
@jeffgdotorg jeffgdotorg added status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation severity: low Does not significantly disrupt application functionality, or a workaround is available severity: medium Results in substantial degraded or broken functionality for specfic workflows and removed severity: low Does not significantly disrupt application functionality, or a workaround is available labels Dec 19, 2023
@jeffgdotorg
Copy link
Collaborator

Thanks for your report. The team will get to work on it as capacity allows.

@kprince28
Copy link
Contributor

Can anyone please assign this to me ?

@abhi1693 abhi1693 added status: accepted This issue has been accepted for implementation and removed status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation labels Dec 20, 2023
kprince28 added a commit to Onemind-Services-LLC/netbox that referenced this issue Dec 20, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 20, 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

Successfully merging a pull request may close this issue.

4 participants