Script result page omits Job-level failure reasons
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 74/100
Research direction
Start at the Script result page code that reads job.data['log'], then compare it with the Job runner’s use of job.log_entries and the Job Log tab. Update the result page to show the Job-level messages alongside the script log, and check that the disabled-script failure reason and other Job messages appear on the result page.
Written by the indexing model from the issue text.
Description
Plugin Version
v0.0.1
NetBox Version
v4.7.1
Python Version
3.12
Steps to Reproduce
- Upload and activate a Project with a Script File, for example
deploy.py:from netbox_scripts import Script class Hello(Script): def run(self, data, commit): self.log_success('Hello.') - From the Script's Run tab, schedule a run a few minutes in the future.
- Disable the Script before the scheduled run starts.
- After the Job has run, refresh its result page.
Expected Behavior
The result page explains why the Job failed, even if the Script never started:
"Hello" was disabled after this run was requested, so it was not run.
Observed Behavior
The result page shows Failed, but the log is empty and no failure reason is displayed.
The reason is recorded in the Job's own log, accessible through the Script's Jobs tab and the Job's Log tab.
The result page currently reads only job.data['log'], while the Job runner records its messages in job.log_entries. This also hides other Job-level messages, including revision information, execution refusals, Script loading failures, and final failure summaries.
Reproduced on main (4a65dfe) and the #122 development tree with NetBox v4.7.1.
Related to #41 and #122, but separate from both.
- Dominant language
- Python
- Stars
- 8
- Forks
- 0
- Avg merge
- 12h 34m
- Merged PRs (30d)
- 57
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from netbox-community/netbox-scripts
-
app: scripts severity: low status: backlog type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
netbox-community/netbox-scripts#164 ·
Maintainers usually reply within 1 day
-
Committed `runcustomscript` runs do not deliver Event Rule actionsPossibly taken @pheus claimed this 1 day ago. Openapp: scripts Bucket: KTLO severity: medium status: accepted type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
netbox-community/netbox-scripts#152 · 1 assignee ·
Maintainers usually reply within 1 day
-
app: scripts severity: low status: backlog type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
netbox-community/netbox-scripts#146 ·
Maintainers usually reply within 1 day
-
app: scripts status: backlog type: documentation
Difficulty 1/5 Under an hour Newbie friendliness 91/100
netbox-community/netbox-scripts#137 ·
Maintainers usually reply within 1 day
-
app: scripts severity: low status: backlog type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
netbox-community/netbox-scripts#134 ·
Maintainers usually reply within 1 day
All issues in netbox-community/netbox-scripts
Similar issues
-
namespace
Difficulty 1/5 Under an hour Newbie friendliness 68/100
EclipseFdn/open-vsx.org#15604 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 5 days
-
Public function to read participants.tsvPossibly taken @bruAristimunha claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 1/5 1-3 hours Newbie friendliness 85/100
huggingface/tau#799 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
allenai/open-instruct#2245 ·
Maintainers usually reply within 1 day