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

Script Rest API has no results #13167

Closed
jiuka opened this issue Jul 12, 2023 · 0 comments · Fixed by #13250
Closed

Script Rest API has no results #13167

jiuka opened this issue Jul 12, 2023 · 0 comments · Fixed by #13250
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

@jiuka
Copy link

jiuka commented Jul 12, 2023

NetBox version

v3.5.6

Python version

3.11

Steps to Reproduce

As reported in #13061 not only the UI had this issue but the Rest API too.

  1. Save this script into a file called bug.py
from extras.scripts import *


class Bug13061(Script):

    class Meta:
        name = "Demo for Bug13061"
        description = "Demo for Bug13061"

    def run(self, data, commit):
        self.log_success(f"Demo for Bug13061")
  1. Go to https://netbox.example.com/extras/scripts/add/
  2. Upload the bug.py file.
  3. Got to https://netbox.example.com/extras/scripts/bug/Bug13061/
  4. Click on Run Script
  5. Go to https://netbox.example.com/api/extras/scripts/bug.Bug13061/

Expected Behavior

The result should be job result like in the reports endpoint.

Observed Behavior

It is always null.

The job.name is just the name of the script class. When search for the result the script.name
is used and not the class_name therefore no results are found, unless the name ist set to the same value as the class_name.

@jiuka jiuka added the type: bug A confirmed report of unexpected behavior in the application label Jul 12, 2023
@abhi1693 abhi1693 added status: needs owner This issue is tentatively accepted pending a volunteer committed to its implementation severity: medium Results in substantial degraded or broken functionality for specfic workflows labels Jul 12, 2023
@kkthxbye-code kkthxbye-code 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 Jul 24, 2023
@kkthxbye-code kkthxbye-code self-assigned this Jul 24, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 26, 2023
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.

3 participants